I am trying to fit a Gaussian process model using the toolbox and I got stuck in the following problem. Assuming that I have some duplicated data points in my training data, then those will map to duplicated rows in the kernel matrix which will result in both non-invertible kernel matrix and an infinite complexity term. I end up with an infinite log marginal likelihood which I guess due to the problem I explained above. Are there any ideas that could be used to avoid such a behavior?
Your covariance function apparently does not allow for noise. Maybe your problem does not even exhibit noise, which would mean that the same two inputs would always yield the exact same outputs. In any case you may want to add e.g. a (possibly tiny) constant noise term to the diagonal of the covariance matrix for regularization.