Title: | Metrics and Plots for Model Evaluation |
---|---|
Description: | Functions for metrics and plots for model evaluation. Based on vectors of observed and predicted values. Method: Kristin Piikki, Johanna Wetterlind, Mats Soderstrom and Bo Stenberg (2021). <doi:10.1111/SUM.12694>. |
Authors: | Kristin Piikki [aut, cre, cph], Johanna Wetterlind [aut, cph], Mats Soderstrom [aut, cph], Bo Stenberg [aut, cph] |
Maintainer: | Kristin Piikki <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.0.0 |
Built: | 2025-03-19 05:16:51 UTC |
Source: | https://github.com/cran/valmetrics |
Calculates the Agreement coefficient (AC) from observed and predicted values.
ac(o, p)
ac(o, p)
o |
A numeric vector. Observed values. |
p |
A numeric vector. Predicted values. |
Interpretation: larger is better.
Agreement coefficient (AC).
Kristin Piikki, Johanna Wetterlind, Mats Soderstrom and Bo Stenberg, E-mail: [email protected]
Piikki K., Wetterlind J., Soderstrom M., Stenberg B. (2021). Perspectives on validation in digital soil mapping of continuous attributes. A review. Soil Use and Management. doi:10.1111/sum.12694
Willmott, C. J. (1984). On the evaluation of model performance in physical geography. In Spatial statistics and models. Springer, Dordrecht, Netherlands.
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) ac(o=obs, p=pred)
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) ac(o=obs, p=pred)
Calculates the Adjusted R2 (adjr2) from observed values, predicted values and the number of model parameters.
adjr2(o, p, k)
adjr2(o, p, k)
o |
A numeric vector. Observed values. |
p |
A numeric vector. Predicted values. |
k |
A number. The number of parameters in the model. Note that k includes the intercept, so for example, k is 2 for a linear regression model. |
Interpretation: larger is better. Adjusted R2 (adjr2) punishes complexity of models; a larger number of parameters (k) means a smaller adjr2 value.
Adjusted R2 (adjr2)
Kristin Piikki, Johanna Wetterlind, Mats Soderstrom and Bo Stenberg, E-mail: [email protected]
Piikki K., Wetterlind J., Soderstrom M., Stenberg B. (2021). Perspectives on validation in digital soil mapping of continuous attributes. A review. Soil Use and Management. doi:10.1111/sum.12694
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) adjr2(o=obs, p=pred, k=2)
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) adjr2(o=obs, p=pred, k=2)
Calculates the Akaike information criterion (AIC) from observed values, predicted values, the number of observations and the number of model parameters.
aic(o, p, k)
aic(o, p, k)
o |
A numeric vector. Observed values. |
p |
A numeric vector. Predicted values. |
k |
A number. The number of parameters in the model. Note that k includes the intercept, so for example, k is 2 for a linear regression model. |
Interpretation: smaller is better. Akaike information criterion (AIC) punishes complexity of models; a larger number of parameters (k) means a larger AIC value. As it is sensitive to the number of samples, AIC cannot easily be compared between datasets of different sizes.
Akaike information criterion (AIC)
Kristin Piikki, Johanna Wetterlind, Mats Soderstrom and Bo Stenberg, E-mail: [email protected]
Piikki K., Wetterlind J., Soderstrom M., Stenberg B. (2021). Perspectives on validation in digital soil mapping of continuous attributes. A review. Soil Use and Management. doi:10.1111/sum.12694
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) aic(o=obs, p=pred, k=2)
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) aic(o=obs, p=pred, k=2)
Calculates 31 different validation metrics from observed values and predicted values. For the calculation of some metrics also the number of model parameters are used.
allmetrics(o, p, k)
allmetrics(o, p, k)
o |
A numeric vector. Observed values. |
p |
A numeric vector. Predicted values. |
k |
A number. The number of parameters in the model. Note that k includes the intercept, so for example, k is 2 for a linear regression model. |
See respective functions.
A data.frame with all validation metrics for which functions are defined in this package.
Kristin Piikki, Johanna Wetterlind, Mats Soderstrom and Bo Stenberg, E-mail: [email protected]
Piikki K., Wetterlind J., Soderstrom M., Stenberg B. (2021). Perspectives on validation in digital soil mapping of continuous attributes. A review. Soil Use and Management. doi:10.1111/sum.12694
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) allmetrics(o=obs, p=pred, k=2)
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) allmetrics(o=obs, p=pred, k=2)
Calculates the Nash-Sutcliffe modelling efficiency (E) from observed and predicted values.
e(o, p)
e(o, p)
o |
A numeric vector. Observed values. |
p |
A numeric vector. Predicted values. |
Interpretation: a value of 1 means that all predicted values are equal to the observed values. A value of 0 means that the predictions explain as much of the variation in the observed values as the mean of the observed values does. A negative value means that the predictions are less accurate the mean of the observed values.
Nash-Sutcliffe modelling efficiency (E).
Kristin Piikki, Johanna Wetterlind, Mats Soderstrom and Bo Stenberg, E-mail: [email protected]
Nash, J. E., & Sutcliffe, J. V. (1970). River flow forecasting through conceptual models part I. A discussion of principles. Journal of hydrology, 10(3), 282-290.
Piikki K., Wetterlind J., Soderstrom M., Stenberg B. (2021). Perspectives on validation in digital soil mapping of continuous attributes. A review. Soil Use and Management. doi:10.1111/sum.12694
Wilks D. S. (2011) Statistical Methods in the Atmospheric Sciences, Academic Press, Oxford, UK.
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) e(o=obs, p=pred)
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) e(o=obs, p=pred)
Calculates the Inter-quartile range (IQR) from a vector of observed values.
iqr(o)
iqr(o)
o |
A numeric vector. Observed values. |
The inter-quartile range (IQR) is the difference between the 75-percentile and the 25-percentile of the observed values.
Inter-quartile range (IQR).
Kristin Piikki, Johanna Wetterlind, Mats Soderstrom and Bo Stenberg, E-mail: [email protected]
obs<-c(1:10) iqr(o=obs)
obs<-c(1:10) iqr(o=obs)
Calculates the Lack of correlation (LC) from observed and predicted values.
lc(o, p)
lc(o, p)
o |
A numeric vector. Observed values. |
p |
A numeric vector. Predicted values. |
Interpretation: smaller is better.
Lack of correlation (LC)
Kristin Piikki, Johanna Wetterlind, Mats Soderstrom and Bo Stenberg, E-mail: [email protected]
Gauch H. G., Hwang J. G., & Fick G. W. 2003. Model evaluation by comparison of model based predictions and measured values. Agronomy Journal, 95(6), 1442-1446.
Piikki K., Wetterlind J., Soderstrom M., Stenberg B. (2021). Perspectives on validation in digital soil mapping of continuous attributes. A review. Soil Use and Management. doi:10.1111/sum.12694
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) lc(o=obs, p=pred)
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) lc(o=obs, p=pred)
Calculates Lin's concordance correlation coefficient (LCCC) from observed and predicted values.
lccc(o, p)
lccc(o, p)
o |
A numeric vector. Observed values. |
p |
A numeric vector. Predicted values. |
Interpretation: Lin's concordance correlation coefficient (LCCC) can take values between -1 and 1. LCCC-values close to 1 indicate a strong concordance between predicted and observed values, while LCCC-values near -1 indicate a strong discordance. LCCC-values close to 0 indicate no concordance. In a plot of predicted values versus observed values, an LCCC-value of 1 means that the all data points are on the 1.1-line.
Lin's concordance correlation coefficient (LCCC).
Kristin Piikki, Johanna Wetterlind, Mats Soderstrom and Bo Stenberg, E-mail: [email protected]
Lawrence, I., & Lin, K. (1989). A concordance correlation coefficient to evaluate reproducibility. Biometrics, 255-268.
Piikki K., Wetterlind J., Soderstrom M., Stenberg B. (2021). Perspectives on validation in digital soil mapping of continuous attributes. A review. Soil Use and Management. doi:10.1111/sum.12694
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) lccc(o=obs, p=pred)
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) lccc(o=obs, p=pred)
Calculates the Median absolute deviation (MAD) from observed and predicted values.
mad(o, p)
mad(o, p)
o |
A numeric vector. Observed values. |
p |
A numeric vector. Predicted values. |
Interpretation: smaller is better.
Median absolute deviation (MAD)
Kristin Piikki, Johanna Wetterlind, Mats Soderstrom and Bo Stenberg, E-mail: [email protected]
Piikki K., Wetterlind J., Soderstrom M., Stenberg B. (2021). Perspectives on validation in digital soil mapping of continuous attributes. A review. Soil Use and Management. doi:10.1111/sum.12694
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) mad(o=obs, p=pred)
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) mad(o=obs, p=pred)
Calculates the Mean absolute error (MAE) from observed and predicted values.
mae(o, p)
mae(o, p)
o |
A numeric vector. Observed values. |
p |
A numeric vector. Predicted values. |
Interpretation: smaller is better. Similar to RMSE but less sensitive to large errors.
Mean absolute error (MAE).
Kristin Piikki, Johanna Wetterlind, Mats Soderstrom and Bo Stenberg, E-mail: [email protected]
Piikki K., Wetterlind J., Soderstrom M., Stenberg B. (2021). Perspectives on validation in digital soil mapping of continuous attributes. A review. Soil Use and Management. doi:10.1111/sum.12694
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) mae(o=obs, p=pred)
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) mae(o=obs, p=pred)
Calculates the Mean absolute percentage error (MAPE) from observed and predicted values.
mape(o, p)
mape(o, p)
o |
A numeric vector. Observed values. |
p |
A numeric vector. Predicted values. |
Interpretation: smaller is better.
Mean absolute percentage error (MAPE)
Kristin Piikki, Johanna Wetterlind, Mats Soderstrom and Bo Stenberg, E-mail: [email protected]
Piikki K., Wetterlind J., Soderstrom M., Stenberg B. (2021). Perspectives on validation in digital soil mapping of continuous attributes. A review. Soil Use and Management. doi:10.1111/sum.12694
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) mape(o=obs, p=pred)
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) mape(o=obs, p=pred)
Calculates the Median absolute relative error (MARE) from observed and predicted values.
mare(o, p)
mare(o, p)
o |
A numeric vector. Observed values. |
p |
A numeric vector. Predicted values. |
Interpretation: smaller is better.
Median absolute relative error (MARE)
Kristin Piikki, Johanna Wetterlind, Mats Soderstrom and Bo Stenberg, E-mail: [email protected]
Piikki K., Wetterlind J., Soderstrom M., Stenberg B. (2021). Perspectives on validation in digital soil mapping of continuous attributes. A review. Soil Use and Management. doi:10.1111/sum.12694
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) mare(o=obs, p=pred)
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) mare(o=obs, p=pred)
Calculates the Median error (MdE) from observed and predicted values.
mde(o, p)
mde(o, p)
o |
A numeric vector. Observed values. |
p |
A numeric vector. Predicted values. |
Interpretation: smaller is better. Similar to mean error (bias) but less sensitive to large errors. Sometimes called bias.
Median error (MdE)
Kristin Piikki, Johanna Wetterlind, Mats Soderstrom and Bo Stenberg, E-mail: [email protected]
Piikki K., Wetterlind J., Soderstrom M., Stenberg B. (2021). Perspectives on validation in digital soil mapping of continuous attributes. A review. Soil Use and Management. doi:10.1111/sum.12694
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) mde(o=obs, p=pred)
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) mde(o=obs, p=pred)
Calculates the Median squared error (MdSE) from observed and predicted values.
mdse(o, p)
mdse(o, p)
o |
A numeric vector. Observed values. |
p |
A numeric vector. Predicted values. |
Interpretation: smaller is better.
Median squared error (MSE).
Kristin Piikki, Johanna Wetterlind, Mats Soderstrom and Bo Stenberg, E-mail: [email protected]
Piikki K., Wetterlind J., Soderstrom M., Stenberg B. (2021). Perspectives on validation in digital soil mapping of continuous attributes. A review. Soil Use and Management. doi:10.1111/sum.12694
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) mdse(o=obs, p=pred)
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) mdse(o=obs, p=pred)
Calculates the Mean error (ME) from observed and predicted values.
me(o, p)
me(o, p)
o |
A numeric vector. Observed values. |
p |
A numeric vector. Predicted values. |
Interpretation: smaller is better. Sometimes called bias.
Mean error (ME).
Kristin Piikki, Johanna Wetterlind, Mats Soderstrom and Bo Stenberg, E-mail: [email protected]
Piikki K., Wetterlind J., Soderstrom M., Stenberg B. (2021). Perspectives on validation in digital soil mapping of continuous attributes. A review. Soil Use and Management. doi:10.1111/sum.12694
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) me(o=obs, p=pred)
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) me(o=obs, p=pred)
Calculates the Mean squared deviation ratio (msdr) from observed and predicted values.
msdr(o, p)
msdr(o, p)
o |
A numeric vector. Observed values. |
p |
A numeric vector. Predicted values. |
Interpretation: closer to 1 is better. Sometimes called standardised squared predictor error (SSPE) or scaled root mean squared error (SRMSE).
Mean squared deviation ratio (msdr)
Kristin Piikki, Johanna Wetterlind, Mats Soderstrom and Bo Stenberg, E-mail: [email protected]
Piikki K., Wetterlind J., Soderstrom M., Stenberg B. (2021). Perspectives on validation in digital soil mapping of continuous attributes. A review. Soil Use and Management. doi:10.1111/sum.12694
Voltz, M., & Webster, R. (1990). A comparison of kriging, cubic splines and classification for predicting soil properties from sample information. Journal of soil Science, 41(3), 473-490. (there called: standardized square deviation).
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) msdr(o=obs, p=pred)
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) msdr(o=obs, p=pred)
Calculates the Mean squared error (MSE) from observed and predicted values.
mse(o, p)
mse(o, p)
o |
A numeric vector. Observed values. |
p |
A numeric vector. Predicted values. |
Interpretation: smaller is better. This metric is sometimes called mean squared deviation (MSD or RMSD2).
Mean squared error (MSE).
Kristin Piikki, Johanna Wetterlind, Mats Soderstrom and Bo Stenberg, E-mail: [email protected]
Piikki K., Wetterlind J., Soderstrom M., Stenberg B. (2021). Perspectives on validation in digital soil mapping of continuous attributes. A review. Soil Use and Management. doi:10.1111/sum.12694
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) mse(o=obs, p=pred)
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) mse(o=obs, p=pred)
Calculates the Normalized mean squared error (NMSE) from observed and predicted values.
nmse(o, p)
nmse(o, p)
o |
A numeric vector. Observed values. |
p |
A numeric vector. Predicted values. |
Interpretation: smaller is better.
Normalized mean squared error (NMSE)
Kristin Piikki, Johanna Wetterlind, Mats Soderstrom and Bo Stenberg, E-mail: [email protected]
Park S. J., Vlek P. L. G. 2002. Environmental correlation of three-dimensional soil spatial variability: a comparison of three adaptive techniques. Geoderma, 109(1-2), 117-140.
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) nmse(o=obs, p=pred)
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) nmse(o=obs, p=pred)
Calculates the Normalised RMSE (NRMSE) from observed and predicted values.
nrmse(o, p)
nrmse(o, p)
o |
A numeric vector. Observed values. |
p |
A numeric vector. Predicted values. |
Interpretation: smaller is better. Normalised RMSE (NRMSE) is computed as the RMSE divided by the mean of the observed valeus. NRMSE is sometimes called Relative RMSE (rRMSE) or Root mean square standardized (RMSS).
Normalised RMSE (NRMSE)
Kristin Piikki, Johanna Wetterlind, Mats Soderstrom and Bo Stenberg, E-mail: [email protected]
Piikki K., Wetterlind J., Soderstrom M., Stenberg B. (2021). Perspectives on validation in digital soil mapping of continuous attributes. A review. Soil Use and Management. doi:10.1111/sum.12694
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) nrmse(o=obs, p=pred)
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) nrmse(o=obs, p=pred)
Calculates the Non-unity slope (NU) from observed and predicted values.
nu(o, p)
nu(o, p)
o |
A numeric vector. Observed values. |
p |
A numeric vector. Predicted values. |
Interpretation: closer to 1 is better.
Non-unity slope (NU)
Kristin Piikki, Johanna Wetterlind, Mats Soderstrom and Bo Stenberg, E-mail: [email protected]
Piikki K., Wetterlind J., Soderstrom M., Stenberg B. (2021). Perspectives on validation in digital soil mapping of continuous attributes. A review. Soil Use and Management. doi:10.1111/sum.12694
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) nu(o=obs, p=pred)
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) nu(o=obs, p=pred)
Calculates the Precision from observed and predicted values.
precision(o, p)
precision(o, p)
o |
A numeric vector. Observed values. |
p |
A numeric vector. Predicted values. |
Interpretation: smaller is better.
Precision
Kristin Piikki, Johanna Wetterlind, Mats Soderstrom and Bo Stenberg, E-mail: [email protected]
Piikki K., Wetterlind J., Soderstrom M., Stenberg B. (2021). Perspectives on validation in digital soil mapping of continuous attributes. A review. Soil Use and Management. doi:10.1111/sum.12694
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) precision(o=obs, p=pred)
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) precision(o=obs, p=pred)
Calculates the Pearson product moment correlation coefficient (r) from observed and predicted values.
r(o, p)
r(o, p)
o |
A numeric vector. Observed values. |
p |
A numeric vector. Predicted values. |
Interpretation: larger absolute value is better.
Pearson product moment correlation coefficient (r).
Kristin Piikki, Johanna Wetterlind, Mats Soderstrom and Bo Stenberg, E-mail: [email protected]
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) r(o=obs, p=pred)
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) r(o=obs, p=pred)
Calculates the Coefficient of determination (R2) from observed and predicted values.
r2(o, p)
r2(o, p)
o |
A numeric vector. Observed values. |
p |
A numeric vector. Predicted values. |
Interpretation: larger is better.
Coefficient of determination (R2)
Kristin Piikki, Johanna Wetterlind, Mats Soderstrom and Bo Stenberg, E-mail: [email protected]
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) r2(o=obs, p=pred)
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) r2(o=obs, p=pred)
Calculates the Root median squared error (RMdSE) from observed and predicted values.
rmdse(o, p)
rmdse(o, p)
o |
A numeric vector. Observed values. |
p |
A numeric vector. Predicted values. |
Interpretation: smaller is better.
Root median squared error (RMdSE).
Kristin Piikki, Johanna Wetterlind, Mats Soderstrom and Bo Stenberg, E-mail: [email protected]
Piikki K., Wetterlind J., Soderstrom M., Stenberg B. (2021). Perspectives on validation in digital soil mapping of continuous attributes. A review. Soil Use and Management. doi:10.1111/sum.12694
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) rmdse(o=obs, p=pred)
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) rmdse(o=obs, p=pred)
Calculates the Root mean square error (RMSE) from observed and predicted values.
rmse(o, p)
rmse(o, p)
o |
A numeric vector. Observed values. |
p |
A numeric vector. Predicted values. |
Interpretation: smaller is better. RMSE is sometimes abbreviated RMS, RMSD or RMSEP. A smaller value means a smaller error. RMSE is similar to mean absolute error (MAE), median absolute deviation (MAD) and root median squared error (RmdSE) but is more sensitive to large errors.
Root mean square error (RMSE)
Kristin Piikki, Johanna Wetterlind, Mats Soderstrom and Bo Stenberg, E-mail: [email protected]
Piikki K., Wetterlind J., Soderstrom M., Stenberg B. (2021). Perspectives on validation in digital soil mapping of continuous attributes. A review. Soil Use and Management. doi:10.1111/sum.12694
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) rmse(o=obs, p=pred)
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) rmse(o=obs, p=pred)
Calculates the Ratio of performance to deviation (RPD) from observed and predicted values.
rpd(o, p)
rpd(o, p)
o |
A numeric vector. Observed values. |
p |
A numeric vector. Predicted values. |
Interpretation: larger is better.
Ratio of performance to deviation (RPD).
Kristin Piikki, Johanna Wetterlind, Mats Soderstrom & Bo Stenberg [email protected]
Piikki K., Wetterlind J., Soderstrom M., Stenberg B. (2021). Perspectives on validation in digital soil mapping of continuous attributes. A review. Soil Use and Management. doi:10.1111/sum.12694
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) rpd(o=obs, p=pred)
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) rpd(o=obs, p=pred)
Calculates the Ratio of interquartile to RMSE (RPIQ) from observed and predicted values.
rpiq(o, p)
rpiq(o, p)
o |
A numeric vector. Observed values. |
p |
A numeric vector. Predicted values. |
Interpretation: Smaller is better.
Ratio of interquartile to RMSE (RPIQ)
Kristin Piikki, Johanna Wetterlind, Mats Soderstrom & Bo Stenberg [email protected]
Bellon-Maurel V., Fernandez-Ahumada E., Palagos B., Roger J. M., McBratney, A. 2010. Critical review of chemometric indicators commonly used for assessing the quality of the prediction of soil attributes by NIR spectroscopy. TrAC Trends in Analytical Chemistry, 29(9), 1073-1081.
Piikki K., Wetterlind J., Soderstrom M. Stenberg B. Perspectives on validation in digital soil mapping of continuous attributes. A review. Soil Use and Management, in press.
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) rpiq(o=obs, p=pred)
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) rpiq(o=obs, p=pred)
Calculates the Standard deviation of the error (SDE) from observed and predicted values.
sde(o, p)
sde(o, p)
o |
A numeric vector. Observed values. |
p |
A numeric vector. Predicted values. |
Interpretation: smaller is better.
Standard deviation of the error (SDE).
Kristin Piikki, Johanna Wetterlind, Mats Soderstrom and Bo Stenberg, E-mail: [email protected]
Piikki K., Wetterlind J., Soderstrom M., Stenberg B. (2021). Perspectives on validation in digital soil mapping of continuous attributes. A review. Soil Use and Management. doi:10.1111/sum.12694
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) sde(o=obs, p=pred)
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) sde(o=obs, p=pred)
Calculates the Skewness of residuals from observed and predicted values.
skew(o, p)
skew(o, p)
o |
A numeric vector. Observed values. |
p |
A numeric vector. Predicted values. |
Interpretation: smaller is better.
Skewness of residuals.
Kristin Piikki, Johanna Wetterlind, Mats Soderstrom and Bo Stenberg, E-mail: [email protected]
Piikki K., Wetterlind J., Soderstrom M., Stenberg B. (2021). Perspectives on validation in digital soil mapping of continuous attributes. A review. Soil Use and Management. doi:10.1111/sum.12694
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) skew(o=obs, p=pred)
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) skew(o=obs, p=pred)
Calculates the Symmetrical mean percentage error (SMAPE) from observed and predicted values.
smape(o, p)
smape(o, p)
o |
A numeric vector. Observed values. |
p |
A numeric vector. Predicted values. |
Interpretation: smaller is better.
Symmetrical mean percentage error (SMAPE)
Kristin Piikki, Johanna Wetterlind, Mats Soderstrom and Bo Stenberg, E-mail: [email protected]
Forkuor G., Hounkpatin O. K., Welp G., Thiel, M. 2017. High resolution mapping of soil properties using remote sensing variables in south-western Burkina Faso: a comparison of machine learning and multiple linear regression models. PloS one, 12(1), e0170478.
Piikki K., Wetterlind J., Soderstrom M., Stenberg B. (2021). Perspectives on validation in digital soil mapping of continuous attributes. A review. Soil Use and Management. doi:10.1111/sum.12694
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) smape(o=obs, p=pred)
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) smape(o=obs, p=pred)
Calculates the sum of squares for error (SSE) from observed and predicted values.
sse(o, p)
sse(o, p)
o |
A numeric vector. Observed values. |
p |
A numeric vector. Predicted values. |
Interpretation: smaller is better.
Sum of squares for error (SSE).
Kristin Piikki, Johanna Wetterlind, Mats Soderstrom and Bo Stenberg, E-mail: [email protected]
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) sse(o=obs, p=pred)
obs<-c(1:10) pred<-c(1, 1 ,3, 2, 4, 5, 6, 8, 7, 10) sse(o=obs, p=pred)
Calculates the Total sums of squares (SST) from a vector of observed values.
sst(o)
sst(o)
o |
A numeric vector. Observed values. |
Interpretation: smaller is better.
Total sums of squares (SST).
Kristin Piikki, Johanna Wetterlind, Mats Soderstrom and Bo Stenberg, E-mail: [email protected]
obs<-c(1:10) sst(o=obs)
obs<-c(1:10) sst(o=obs)
Plots predicted values versus observed values in a coordinate system with the same range of both axes.
valplot( o, p, main = NA, sub = NA, xlab = "Observed value", ylab = "Predicted value" )
valplot( o, p, main = NA, sub = NA, xlab = "Observed value", ylab = "Predicted value" )
o |
A numeric vector. Observed values. |
p |
A numeric vector. Predicted values. |
main |
A character value. The main title of the plot. |
sub |
A character value. The subtitle of the plot. |
xlab |
A character value. The x axis label. |
ylab |
A character value. The y axis label. |
Circles represent the data, dashed line represents observed = predicted and solid line represents an
A scatter plot of observed and predicted values.
Kristin Piikki, Johanna Wetterlind, Mats Soderstrom and Bo Stenberg, E-mail: [email protected]
obs<-c(1:10) pred<-c(1, 1 ,3, 5, 4, 5, 6, 8, 11, 10) t1='Measured variable (unit)' evalue<-round(e(o=obs, p=pred),2) maevalue<-round(mae(o=obs, p=pred),1) t2=paste('E = ', evalue, '; MAE = ', maevalue, ' units') valplot(o=obs, p=pred, main=t1, sub=t2)
obs<-c(1:10) pred<-c(1, 1 ,3, 5, 4, 5, 6, 8, 11, 10) t1='Measured variable (unit)' evalue<-round(e(o=obs, p=pred),2) maevalue<-round(mae(o=obs, p=pred),1) t2=paste('E = ', evalue, '; MAE = ', maevalue, ' units') valplot(o=obs, p=pred, main=t1, sub=t2)