Classification
ELI5 — The Vibe Check
Classification is teaching an AI to sort things into categories. Is this email spam or not? Is this image a cat, dog, or bird? Is this customer likely to churn? The AI learns to put each input into one of several predefined boxes. It's one of the most common ML tasks.
Real Talk
Classification is a supervised learning task where the model learns to assign inputs to one of a discrete set of categories. Binary classification has two classes; multiclass has more. Key algorithms include logistic regression, decision trees, SVMs, and neural networks. Performance is measured with accuracy, precision, recall, and F1 score.
Show Me The Code
from sklearn.ensemble import RandomForestClassifier
model = RandomForestClassifier(n_estimators=100)
model.fit(X_train, y_train)
predictions = model.predict(X_test) # outputs class labels
When You'll Hear This
"Spam detection is a classification problem." / "Is this a binary or multi-class classification task?"
Related Terms
Accuracy
Accuracy is the simplest way to score a model — what percentage of predictions were correct.
Clustering
Clustering is teaching an AI to find groups in data WITHOUT being told what the groups are.
F1 Score
The F1 Score is the balanced average of precision and recall — a single number that captures both.
Precision
Precision asks: 'Of all the times the AI said YES, how often was it actually right?
Recall
Recall asks: 'Of all the actual YES cases in the world, how many did the AI catch?' High recall means the model finds almost everything it should.
Regression
Regression is like classification but instead of sorting things into categories, you're predicting a number. What will this house sell for?