First, why do machine learning algorithm diagnosis?
By testing the machine learning algorithms that are trained, you can see how well the algorithm works and what is not, and how best to improve the performance of the algorithm to get the guidance of the knowledge.
Diagnostic algorithms usually take time to achieve, but it would be better to make less detours and take advantage of time.
Second, how to diagnose the algorithm?
The simplest is to divide the data set into training sets and test sets. Then use the training set to train the model and use the test set to evaluate the model's performance.
A simple example:
1) Linear regression model
Use the training set to get the model, then use the test set for testing, and use the cost function without normalization to calculate the error
2) Logistic regression model
Use the training set to get the model, and then use the test set for testing,
There are two ways to calculate errors on a test set:
A) Use cost functions without normalization to calculate errors
b) Mis-classification error (0/1 classification error)
Machine Learning Algorithm Diagnostics