top of page

Machine Learning Tutorial

Public·1 member

Performance Measures In Machine Learning

The performance or efficiency of a classifier is shown by various features that tells how well working the particular classifier is.


There are the various ways to check the performance of our machine learning model and why to use one in place of the other. We will discuss terms like:

  • Confusion matrix

  • Accuracy

  • Precision

  • Recall

  • Specificity

  • F1 score

  • Precision-Recall or PR curve

  • ROC (Receiver Operating Characteristics) curve

  • PR vs ROC curve.


Below some important performance measures which are used in machine learning:


Confusion matrix

This is also the same as the error matrix, by confusion matrix, it is easily shown that what percent of predictions made by our classifier was correct and where it was difficult for the classifier to predict the actual classification.


Used Terminologies


  • TP = True positive

  • TN = True negative

  • FP = False positive

  • FN = False negative


Accuracy

Accuracy = (TP + TN) / N, where N is sum of TP, TN, FN, FP.

This is the overall efficiency of the model


Sensitivity

Sensitivity can be defined as the effectiveness of classifiers to identify positive labels. This is also known as recall.

Sensitivity = (TP)/ (TP+FN)

Specificity

This is defined as the effectiveness of classifier to correctly identify negative labels.

Specificity = (TN) / (FP + TN)

Prevalence

Prevalence = (TP + FN) / N

N is the sum of all conditions i.e. TP, FN, FP, TN.


Positive predicted values

Positive_predicted_value = (Sensitivity * Prevalence) / ( (Sensitivity * prevalence) + (1 — specificity) * (1 — prevalence) )

Negative predicted values

Negative_predicted_values = Specificity *(1 — prevalence) / (((1- sensitivity)*prevalence) + (specificity * (1 — prevalence)))

Detection rate

DR = TP / N

Expected accuracy

Expected_accuracy = ( (TP + FN) * (TP+FP) + (FP+TN) * (FN+TN) ) / N

Kappa statistic

Kappa = (Observed accuracy — expected_accuracy) / (1 — expected_accuracy)

These are top and most important performance matrix which is used by every developer when predicting any machine learning algorithms.

Ref - https://medium.com/


#machineLearning #datascience #python

17 Views
bottom of page