Various ways to evaluate a machine learning model’s performance

Or a patient is having cancer (positive) or is found healthy (negative)..Some common terms to be clear with are:True positives (TP): Predicted positive and are actually positive.False positives (FP): Predicted positive and are actually negative.True negatives (TN): Predicted negative and are actually negative.False negatives (TN): Predicted negative and are actually positive.So let's get started!Confusion matrixIt’s just a representation of the above parameters in a matrix format. Better visualization is always good :)AccuracyThe most commonly used metric to judge a model and is actually not a clear indicator of the performance..The worse happens when classes are imbalanced.Take for example a cancer detection model..The chances of actually having cancer are very low..Let’s say out of 100, 90 of the patients don’t have cancer and the remaining 10 actually have it..We don’t want to miss on a patient who is having cancer but goes undetected (false negative)..Detecting everyone as not having cancer gives an accuracy of 90% straight..The model did nothing here but just gave cancer free for all the 100 predictions.We surely need better alternatives.PrecisionPercentage of positive instances out of the total predicted positive instances..Here denominator is the model prediction done as positive from the whole given dataset..Take it as to find out ‘how much the model is right when it says it is right’.Recall/Sensitivity/True Positive RatePercentage of positive instances out of the total actual positive instances..Therefore denominator (TP + FN) here is the actual number of positive instances present in the dataset..Take it as to find out ‘how much extra right ones, the model missed when it showed the right ones’.SpecificityPercentage of negative instances out of the total actual negative instances.. More details

Leave a Reply