plot_errors | R Documentation |
This function allows the representation of the difference between observed histograms and the respective predicted ones. It can be used as a tool for interpreting preditive methods (for exampe, the regression of histogrma data)
plot_errors(PRED, OBS, type = "HISTO_QUA", np = 200)
PRED |
a |
OBS |
a |
type |
a string. "HISTO_QUA" (default), if ones want to compare histograms quantile differences |
np |
number of points considered for density or quantile computation (default=200). |
A plot with functions of differences between observed and predicted histograms, and a Root Mean Squared value computing by using the L2 Wasserstein distance.
## do a regression
pars <- WH.regression.two.components(BLOOD, Yvar = 1, Xvars = c(2:3))
## predict data
PRED <- WH.regression.two.components.predict(data = BLOOD[, 2:3], parameters = pars)
## define observed data
OBS <- BLOOD[, 1]
plot_errors(PRED, OBS, "HISTO_QUA")
plot_errors(PRED, OBS, "HISTO_DEN")
plot_errors(PRED, OBS, "DENS_KDE")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.