Computes statistics to assess the quality of binary predictions and prints out a report.


out = binaryClassMetrics(y_true, y_predict);


Nx1 vector of 0's and 1's, with the true class labels.
Nx1 vector of 0's and 1's, with the predicted class labels.


binaryClassQuality structure, with the following members:
  out.confusionMatrix 2x2 matrix, containing the computed confusion matrix.
  out.accuracy Scalar, range 0-1, the accuracy of the predicted labels.
  out.precision Scalar, (tp / (tp + fp)).
  out.recall Scalar, (tp / (tp + fn)).
  out.fScore Scalar, ((b^2 + 1) * tp) / ((b^2 + 1) * tp + b^2 * fn + fp) (b = 1) .
  out.specificity Scalar, (tp / (fp + tn)).
  out.auc Scalar, 0.5 * ((tp / (tp + fn) + (tp / (fp + tn)).
Note: This is NOT the area under the roc curve, which requires requires predicted probabilities for its computation, rather than predicted class labels.

tp = True positive.
tn = True negative.
fp = False positive.
fn = False negative.

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.

Try GAUSS for 30 days for FREE

See what GAUSS can do for your data

© Aptech Systems, Inc. All rights reserved.

Privacy Policy