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=[12345678]x=\begin{bmatrix}1&2&3&4&5&6&7&8\end{bmatrix}, y=[00001111]y=\begin{bmatrix}0&0&0&0&1&1&1&1\end{bmatrix}. 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

Reference materials