Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variogram fitting issues with surface pressure data #129

Open
Doltrix opened this issue Sep 29, 2023 · 0 comments
Open

Variogram fitting issues with surface pressure data #129

Doltrix opened this issue Sep 29, 2023 · 0 comments

Comments

@Doltrix
Copy link

Doltrix commented Sep 29, 2023

Hello sr.
I have the following problem. I used the fit.variogram function to fit several variogram models. The problem is that the one that fits best, is not the one that shows the best performance after analyzing the cross validation results. Is this possible? This is a problem since it makes no sense to me that the method that best fits my data set is the one that shows the worst results in predictive performance tests. Considering that the Gaussian model is the best fitting but worst performing model, should I give priority to the visual fit in choosing my model or to the performance shown in the cross-validation results? Here is my code and the graph with the results and models:

v <- variogram(Val_log~1, data_krig)
#Exp
expo <- fit.variogram(v, vgm("Exp")) 
krig_expo<-krige.cv(Val_log~1,data_krig,expo)
#Sph
sph <- fit.variogram(v, vgm("Sph"))
krig_sph<-krige.cv(Val_log~1,data_krig,sph)
#Rest of the models..

rmse_expo <- sqrt(mean(krig_expo$residual^2))
mse_expo <- mean(krig_expo$residual^2)
var_expo <- var(krig_expo$residual)


rmse_sph <- sqrt(mean(krig_sph$residual^2))
mse_sph <- mean(krig_sph$residual^2)
var_sph <- var(krig_sph$residual)
#Rest of the statistics evaluation...

Imagen1

I would like to know if my code formulation is correct or why am I getting this? I should add that I am working with ERA5 - LAND surface pressure data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant