Top Description Fields Constructors Methods
javax.visrec.ml.eval

public Class ClassificationMetrics

extends EvaluationMetrics
Class Inheritance

Commonly used metrics to estimate how good machine learning model solves some classification task.

Field Summary

Inherited from javax.visrec.ml.eval.EvaluationMetrics:
ACCURACYF1SCOREF_STATMEAN_ABSOLUTE_ERRORMEAN_SQUARED_ERRORPRECISIONR_SQUAREDRECALLRESIDUAL_SQUARE_SUMRESIDUAL_STANDARD_ERRORROOT_MEAN_SQUARED_ERROR

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public double

Returns:

classification accuracy metric
getAccuracy
()

The percent of correct predictions of a classifier in total.

public double

Returns:

classification f score
getF1score
()

The mean/balance of the recall and precision metrics.

public double

Returns:

classification precision metric
getPrecision
()

The percent of correct positive predictions.

public double

Returns:

classification recall
getRecall
()

The percent of the positive examples that were not recognized by the classifier.

Inherited from javax.visrec.ml.eval.EvaluationMetrics:
getsettoString

Constructor Detail

ClassificationMetricsback to summary
public ClassificationMetrics()

Method Detail

getAccuracyback to summary
public double getAccuracy()

The percent of correct predictions of a classifier in total. Tells how often the classifier is correct for some given test set. Note that accuracy can be a misleading metric for imbalanced data sets. Formula: Accuracy = (TP+TN) / (TP+TN+FP+FN)

Returns:double

classification accuracy metric

getF1scoreback to summary
public double getF1score()

The mean/balance of the recall and precision metrics.

Returns:double

classification f score

getPrecisionback to summary
public double getPrecision()

The percent of correct positive predictions. This metrics answers the question: when classifier gives positive prediction, how often is it correct? Formula: Precision = TP/(TP+FP)

Returns:double

classification precision metric

getRecallback to summary
public double getRecall()

The percent of the positive examples that were not recognized by the classifier. This metric answers the question: when it is actually positive class, how often does it give positive prediction Formula: Recall = TP / (TP+FN)

Returns:double

classification recall