paint-brush
Evaluation Metrics for the MLby@andy12290
1,105 reads
1,105 reads

Evaluation Metrics for the ML

by Aniket KaleAugust 3rd, 2017
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

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 <a href="https://hackernoon.com/tagged/matrix" target="_blank">matrix</a> to evaluate the model.

Company Mentioned

Mention Thumbnail
featured image - Evaluation Metrics for the ML
Aniket Kale HackerNoon profile picture

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