Introduction to Machine Learning · Study
English translation
Topics covered
The splitting criterion changes predictions. Use a simple Threshold to examine the differences among inputs, true labels, and decisions.
Overall workflow
Samples and features → Preparation and data splitting → Baseline model → Errors on new data
Rules and Criteria to Learn
Keep input x, true label y, and prediction ŷ separate. A Threshold rule is also a small model that divides data. First check which samples change their decisions when the threshold changes.
Understanding the task through misclassified samples
Changing one true label can make it difficult to satisfy every criterion. Reducing errors and checking the quality of true labels are different tasks.
Worked example
, . x is a sensor feature, and y contains Labels for two states.
import numpy as np
import matplotlib.pyplot as plt
x=np.arange(1,9);y=(x>4).astype(int)
pred=(x>4).astype(int)
print(np.mean(pred==y))
1.0
Reference example
View more examples