capaulson / pyKriging

Welcome to the User Friendly Python Kriging Toolbox!
http://www.pykriging.com
MIT License
379 stars 113 forks source link

predicterr_normalized calculation #32

Closed BrentCraven closed 6 years ago

BrentCraven commented 6 years ago

Hi,

A quick question on the calculation of predicted error in the "predicterr_normalized" function. After digging into the code a bit, I am still a bit hazy on exactly what this function is returning. As far as I can tell it seems to be returning the normalized root mean squared error. Is this correct?

Thanks! And, nice work!

capaulson commented 6 years ago

Yes, that is correct. To walk through the calculation a bit, your observation data gets normalized as soon as the Kriging instance is created. These normalized data are used throughout the calculation. When the error is calculated, it uses these normalized values. The y min and max values are stored in ynormRange, so it should be fairly easy to convert these normalized RMS errors back. Does this help/answer the question?

BrentCraven commented 6 years ago

I think that makes sense. Two quick follow-on questions just to clarify:

1.) So, if I understand the "predicterrnormalized" function is computing the root mean squared error (RMSE) normalized by the range of the observed data (y{max} - y_{min})?

2.) When using the 'mse' infill criterion, it looks like the "infill_objective_mse" function is using "predicterr_normalized" and is, thus, using the normalized RMSE for infill and not an absolute mean squared error (MSE), which is what I originally thought. Is that correct?

Sorry to ask these subtleties. But, I am trying to understand the details of the code a little better so that I can describe what I am doing with it in a manuscript where I leverage this excellent library (with proper attribution, of course).

Thanks again!

capaulson commented 6 years ago

1) Yes, that's correct. 2) That is also correct.