Performance Metrics

Performance metrics provide insights into how well a model is performing.

Suppose you have following Model,





Confusion Matrix:



TP : True Positive
FP : False Positive
FN : False Negative
TN : True Negative

So, for above example, confusion matrix will look like:

  1. Accuracy (ACC): ACC measures the ratio of correctly predicted instances to the total instances: ACC=++++


    = 4/8
    ~ 50%

  2. Precision (PREC): PREC measures the ratio of correctly predicted positive observations to the total predicted positives. [From predicted +ve, see Actual +ve]: PREC=+


    ex, spam cassification

  3. Recall (Sensitivity): RECALL measures the ratio of correctly predicted positive observations to all actual positives [From Actual +ve, see predicted +ve]: RECALL=+

    ex, has cancer or not

  4. F Score: F Score is the harmonic mean of PREC and RECALL, balancing both metrics: ex, "Tomorrow stock market will crash", has different answer from company and user pov. So, we can't make decision for Precision & Recall. In this case, we use F score, F-Beta
    F
    β
    =
    (1+β2)×(β2×Precision)+RecallPrecision×Recall

    Beta = 1, indicates F1 Score. F1 Score=2××+

  5. If FP is more important than FN, decrease Beta value. beta=0.5 F0.5 Score If FN is more important than FP, increase Beta value. beta = 2 F2 Score 5. Specificity (SPEC): SPEC measures the ratio of correctly predicted negative observations to all actual negatives: SPEC=+

  6. ROC-AUC: ROC-AUC measures the area under the Receiver Operating Characteristic (ROC) curve, indicating how well the model distinguishes between classes. A higher AUC suggests a better model. For more details, go through below link : https://developers.google.com/machine-learning/crash-course/classification/roc-and-auc

  7. Mean Absolute Error (MAE) and Mean Squared Error (MSE): For regression problems, MAE and MSE are used. MAE is the average of the absolute differences between predicted and actual values, while MSE is the average of the squared differences.


Comments

Popular posts from this blog

Extracting Tables and Text from Images Using Python

Getting Started with ML

Linear Regression