How To Implement Machine Learning Metrics From Scratch in Python
Last Updated on August 13, 2019
After you make predictions, you need to know if they are any good.
There are standard measures that we can use to summarize how good a set of predictions actually are.
Knowing how good a set of predictions is, allows you to make estimates about how good a given machine learning model of your problem,
In this tutorial, you will discover how to implement four standard prediction evaluation metrics from scratch in Python.
After reading this tutorial, you will know:
- How to implement classification accuracy.
- How to implement and interpret a confusion matrix.
- How to implement mean absolute error for regression.
- How to implement root mean squared error for regression.
Kick-start your project with my new book Machine Learning Algorithms From Scratch, including step-by-step tutorials and the Python source code files for all examples.
Let’s get started.
- Update Aug/2018: Tested and updated to work with Python 3.6.