Package org.pepstock.charba.client.ml
Class RegressionScore
- java.lang.Object
-
- org.pepstock.charba.client.ml.RegressionScore
-
@JsType(isNative=true, name="ML.RegressionScore", namespace="<global>") public final class RegressionScore extends Object
When building a regression model, you need to evaluate the goodness of the model, that is how well the model fits the training data used to build the model and how accurate is the model in predicting the outcome for new unseen test observations.
It maps the most commonly known evaluation metrics.
Metrics:
- R (R), which is the proportion of variation in the outcome that is explained by the predictor variables. In multiple regression models, R corresponds to the correlation between the observed outcome values and the predicted values by the model. The Higher the R, the better the model
- R-squared (R2), which is the proportion of variation in the outcome that is explained by the predictor variables. In multiple regression models, R2 corresponds to the squared correlation between the observed outcome values and the predicted values by the model. The Higher the R-squared, the better the model
- Pearson's chi-squared (Chi2), which is the sum of differences between observed and expected outcome frequencies (that is, counts of observations), each squared and divided by the expectation
- Root Mean Squared Error (RMSE), which measures the average error performed by the model in predicting the outcome for an observation. Mathematically, the RMSE is the square root of the mean squared error (MSE), which is the average squared difference between the observed actual outcome values and the values predicted by the model
- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getChi2()
Returns the Pearson's chi-squared (Chi2) metric.double
getR()
Returns the R metric.double
getR2()
Returns the R-squared (R2) metric.double
getRmsd()
Returns the Root Mean Squared Error (RMSE) metric.
-
-
-
Method Detail
-
getR
@JsProperty public double getR()
Returns the R metric.- Returns:
- the R metric
-
getR2
@JsProperty public double getR2()
Returns the R-squared (R2) metric.- Returns:
- the R-squared (R2) metric
-
getChi2
@JsProperty public double getChi2()
Returns the Pearson's chi-squared (Chi2) metric.- Returns:
- the Pearson's chi-squared (Chi2) metric.
-
getRmsd
@JsProperty public double getRmsd()
Returns the Root Mean Squared Error (RMSE) metric.- Returns:
- the Root Mean Squared Error (RMSE) metric.
-
-