Wednesday, July 18, 2018

F1 Score - Machine Learning

F1 Score is an useful metric of classification models rather than regression machine learning models. It is an useful metrics for models that also go well with confusion matrix. F1 score is an useful machine learning metrics aka performance score that is also frequently used in statistical analysis. You can read more about F1 score on the wikipedia page and also the sklearn F1 score documentation below:

F1 Score and Accuracy scores are both used in classification tasks. Accuracy score has some shortfalls. For example, if the dataset is obviously biased. For example, if most of the input data is negative (of the negative class only), say 99.99%. Then the machine does not need to explicitly learn anything intelligent. It can just guess "negative"every time, it will still be 99.99% accurate. F1 score is a shorthand to measure a composite score of the confusion matrix - true positive, true negative, false positive, false negative.

F1 score is a combination of recall and precision. It also a shorthand to measure how accurate and useful the result is.

Accuracy is a simple fraction of correctly classified objects over total number of objects.

It can be misleading to only focus on accuracy, especially when data labels are imbalanced, even if data is representative. Certain scenarios are simply more prevalent in the population data. For example, by definition orphan diseases are the minority data points in the real world. 

1 comment:

Machine Learning for Beginners Resources

Uniqtech guide to Machine Learning. This guide explains the difference between machine learning, traditional programming, machine learning w...