STOR-i / GaussianProcesses.jl

A Julia package for Gaussian Processes
https://stor-i.github.io/GaussianProcesses.jl/latest/
Other
308 stars 53 forks source link

Training data with known uncertainties #214

Closed stefanocovino closed 1 year ago

stefanocovino commented 2 years ago

Hi!

Is there any way to train a model with data with known errors (i.e. x, y, ey)? Often, with other packages, this is done adding the variance of the training points to the covariance matrix. Do you plan to implement anything like that or, maybe, is it already possible and I missed it?

Thanks anyway, Stefano

chris-nemeth commented 2 years ago

Hi @stefanocovino. If I understand your question correctly, then it seems like what you're asking is related to this issue.

When you say "this is done adding the variance of the training points to the covariance matrix" are you thinking of a sum kernel? So if you're using a squared exponential kernel, for example, then your kernel would be K = SE + noise, where the noise kernel is a diagonal kernel with your fixed error term? If so, then we do have a noise kernel that handles this.

stefanocovino commented 2 years ago

Hi Chris,

I see you have already dealt with the problem. It seems to work. I had to declare "noise=false" in the optimization and use "predict_f" rather than "predict_y". However, I have a problem in running a MCMC since it asks priors for the logObsNoise. Apparently, I need to tell mcmc that this is not a variable but a fixed parameter. I run the mcmc with the "noise=false" option. Is that correct?

Please, my apologies if my questions are trivial. By the way, a mention in the doc to this case (heteroscedastic regression) might be useful.

Thanks a lot anyway, Stefano

Il giorno dom 20 feb 2022 alle ore 22:37 Chris Nemeth < @.***> ha scritto:

Hi @stefanocovino https://github.com/stefanocovino. If I understand your question correctly, then it seems like what you're asking is related to this issue https://github.com/STOR-i/GaussianProcesses.jl/issues/70.

When you say "this is done adding the variance of the training points to the covariance matrix" are you thinking of a sum kernel? So if you're using a squared exponential kernel, for example, then your kernel would be K = SE + noise, where the noise kernel is a diagonal kernel with your fixed error term? If so, then we do have a noise kernel that handles this.

— Reply to this email directly, view it on GitHub https://github.com/STOR-i/GaussianProcesses.jl/issues/214#issuecomment-1046325915, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGVYHCMRR2S7ZRHDDU67PTU4FNJFANCNFSM5NFNZ4YA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

-- ——————————————————————————————————

Non puoi trasformare un problema scientifico in una storia d'amore.

Dr. Snaut (Jüri Järvet) - Solaris (Andrej Tarkovskij, 1972)


Stefano Covino INAF / Osservatorio Astronomico di Brera Via Emilio Bianchi 46, 23807 Merate (LC) - Italy Tel.: +39 02 72320475 (office) FAX: +39 02 72320401 Cell: +39 331 6748534 E-mail: @.*** URL: http://www.merate.mi.astro.it/∼covino

maximerischard commented 1 year ago

Hi @stefanocovino. I'm going to close this issue as it seems mostly resolved and it has been a while now. If you still need help with your follow-up, please re-open the issue and ask.