Skip to main content

Why Evaluation Metrics Matters


This is a follow up article on "The Importance of F1 Score" in which we understood the technical aspects of evaluating a Machine Learning model. In this article we will understand how different evaluation metrics can help us in designing solutions based on the problem statement and domain.

I will like to distinguish evaluation metrics with respect to the following criteria:

When there is life involved:

In case of aircraft or ships, where a Machine Learning algorithm misses to detect a failure can be a costly affair, since there is life involved. Also in the case of detecting cancer, a failure to predict a true positive can lead to delay in treatment, and hence can be life threatening.

In cases such as detecting failures in aircrafts, even if we get false positives is acceptable, but not able to detect true positives can be too expensive in terms of loss of life. Thus it becomes important to use Recall as a measure, as any positive detection becomes important, even if it turns out to be false positive. It is reasonable to waste resources on analyzing a false positive in such cases.

When there is cost involved:

In cases where the cost of responding to a false positive is too high, and where there are no lives involved, it is acceptable even if few failures are not detected. Take for example, a power plant is located in a village. Responding to a false positive from a sensor can be costly, as the transportation cost to check whether the fault has really occurred is too high. In such a scenario it becomes important to consider Precision as a measure. Thus the model should be trained for high precision, as the quality of the detection by the Machine Learning algorithm matters.


When two or more models need to be compared:

In cases where we need to perform comparison between two or more models going with a single metric like Precision or Recall may not be right. In such cases it is advisable to consider the harmonic mean of both the metrics, and hence F1 score matters in such scenarios. The model with high F1 score should be considered, except when the first two criteria are involved.

Understanding evaluation metrics can help you in deciding what model to choose, which metric matters for which domain. It will also help you to interact with your client and understand different Machine Learning algorithms better. Also it gives you the ability of understanding a problem statement well, thus helping you to implement the correct Machine Learning solution.

Evaluation metrics should be the main area of focus while designing Machine Learning solutions.


By,
Siddhesh Wagle,
Research Consultant,
Cere Labs





 

Comments

Popular posts from this blog

Implement XOR in Tensorflow

XOR is considered as the 'Hello World' of Neural Networks. It seems like the best problem to try your first TensorFlow program.

Tensorflow makes it easy to build a neural network with few tweaks. All you have to do is make a graph and you have a neural network that learns the XOR function.

Why XOR? Well, XOR is the reason why backpropogation was invented in the first place. A single layer perceptron although quite successful in learning the AND and OR functions, can't learn XOR (Table 1) as it is just a linear classifier, and XOR is a linearly inseparable pattern (Figure 1). Thus the single layer perceptron goes into a panic mode while learning XOR – it can't just do that. 

Deep Propogation algorithm comes for the rescue. It learns an XOR by adding two lines L1 and L2 (Figure 2). This post assumes you know how the backpropogation algorithm works.



Following are the steps to implement the neural network in Figure 3 for XOR in Tensorflow:
1. Import necessary libraries
impo…

Anomaly Detection based on Prediction - A Step Closer to General Artificial Intelligence

Anomaly detection refers to the problem of finding patterns that do not conform to expected behavior [1]. In the last article "Understanding Neocortex to Create Intelligence", we explored how applications based on the workings of neocortex create intelligence. Pattern recognition along with prediction makes human brains the ultimate intelligent machines. Prediction help humans to detect anomalies in the environment. Before every action is taken, neocortex predicts the outcome. If there is a deviation from the expected outcome, neocortex detects anomalies, and will take necessary steps to handle them. A system which claims to be intelligent, should have anomaly detection in place.
Recent findings using research on neocortex have made it possible to create applications that does anomaly detection. Numenta’s NuPIC using Hierarchical Temporal Memory (HTM) framework is able to do inference and prediction, and hence anomaly detection. HTM accurately predicts anomalies in real worl…

Understanding Projection Pursuit Regression

The following article gives an overview of the paper "Projection Pursuit Regression” published by Friedman J. H and Stuetzle W. You will need basic background of Machine Learning and Regression before understanding this article. The algorithms and images are taken from the paper. (http://www.stat.washington.edu/courses/stat527/s13/readings/FriedmanStuetzle_JASA_1981.pdf
What is Regression? Regression is a machine learning technology used to predict a response variable given multiple predictor variables or features. The main distinction is that the response to be predicted is any real value and not just any class or cluster name. Hence though similar to Classification in terms of making a prediction, it is largely different given what it’s predicting. 
A simple to understand real world problem of regression would be predicting the sale price of a particular house based on it’s square footage, given that we have data of similar houses sold in that area in the past. The regression so…