MLMetrics | R Documentation |
This function estimates over 40 Metrics for assessing the quality of Machine Learning Models. The purpose is to provide a wrapper which brings all the metrics on the table and makes it easier to use them to select a model.
MLMetrics(Observed, yvalue, Model, K, Name, Form, kutuf, TTy)
Observed |
The Observed data in a data frame format |
yvalue |
The Response variable of the estimated Model |
Model |
The Estimated Model (Model = a + bx) |
K |
The number of variables in the estimated Model to consider |
Name |
The Name of the Models that need to be specified. They are ARIMA, Values if the model computes the fitted value without estimation like Essembles, SMOOTH (smooth.spline), Logit, Ensembles based on weight - EssemWet, QUADRATIC polynomial, SPLINE polynomial. |
Form |
Form of the Model Estimated (LM, ALM, GLM, N-LM, ARDL) |
kutuf |
Cutoff for the Estimated values (defaults to 0.5 if not specified) |
TTy |
Type of response variable (Numeric or Response - like binary) |
A list with the following components:
Absolute Error |
of the Model. |
Absolute Percent Error |
of the Model. |
Accuracy |
of the Model. |
Adjusted R Square |
of the Model. |
`Akaike's` Information Criterion AIC |
of the Model. |
Area under the ROC curve (AUC) |
of the Model. |
Average Precision at k |
of the Model. |
Bias |
of the Model. |
Brier score |
of the Model. |
Classification Error |
of the Model. |
F1 Score |
of the Model. |
fScore |
of the Model. |
GINI Coefficient |
of the Model. |
kappa statistic |
of the Model. |
Log Loss |
of the Model. |
`Mallow's` cp |
of the Model. |
Matthews Correlation Coefficient |
of the Model. |
Mean Log Loss |
of the Model. |
Mean Absolute Error |
of the Model. |
Mean Absolute Percent Error |
of the Model. |
Mean Average Precision at k |
of the Model. |
Mean Absolute Scaled Error |
of the Model. |
Median Absolute Error |
of the Model. |
Mean Squared Error |
of the Model. |
Mean Squared Log Error |
of the Model. |
Model turning point error |
of the Model. |
Negative Predictive Value |
of the Model. |
Percent Bias |
of the Model. |
Positive Predictive Value |
of the Model. |
Precision |
of the Model. |
R Square |
of the Model. |
Relative Absolute Error |
of the Model. |
Recall |
of the Model. |
Root Mean Squared Error |
of the Model. |
Root Mean Squared Log Error |
of the Model. |
Root Relative Squared Error |
of the Model. |
Relative Squared Error |
of the Model. |
`Schwarz's` Bayesian criterion BIC |
of the Model. |
Sensitivity |
of the Model. |
specificity |
of the Model. |
Squared Error |
of the Model. |
Squared Log Error |
of the Model. |
Symmetric Mean Absolute Percentage Error |
of the Model. |
Sum of Squared Errors |
of the Model. |
True negative rate |
of the Model. |
True positive rate |
of the Model. |
library(splines)
Model <- lm(states ~ bs(sequence, knots = c(30, 115)), data = Data)
MLMetrics(Observed = Data, yvalue = Data$states, Model = Model, K = 2,
Name = "Linear", Form = "LM", kutuf = 0, TTy = "Number")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.