Evaluation Metrics for the ML

Written by andy12290 | Published 2017/08/03
Tech Story Tags: machine-learning | data-science | python-programming

TLDRvia the TL;DR App

Today we are going to discuss the importance of evaluation metrics.However, before diving into the evaluation metrics. first, we need to understand the problem statement and which category it’s in supervised regression or classification. In the supervised binary classification problem, we used confusion matrix to evaluate the model.

Confusion Matrix:

Let me put some mathematical formulae here.

1. accuracy = TP+TN/ Total

2. error / Misclassification rate = 1- Accuracy

3. false positive rate = FP/ Actual No(60)

4. false negative rate = FN/Actual Yes(105)

5. true positive rate/Sensitivity = TP/ Actual Yes

Regression Problem:

  1. Mean Absolute Error
  2. Root Mean squared Error

We are going to see how we can define the functions to measure the MAE and RMSE.

Python code for MAE:-

From above code we can calculate MAE from the actual and predicted values.

Python code for the RMSE:

Conclusion:

We can use the different evaluation metrics to evaluate the model but at the end its totally depend on the the industry and the client expections from the model. However, its very important to choose the correct evaluation metrics to evaluate the model.

Please follow me on https://www.linkedin.com/in/aniket-kale-45a29954/

Reference:

Machine Learning Mastery Book


Published by HackerNoon on 2017/08/03