Reference · Glossary
scikit-learn
Last updated
A Python library for **classical machine learning** — decision trees, random forests, clustering, regression — with one consistent `.fit()` / `.predict()` interface across almost every model type.
#When to use
Tabular data problems (spreadsheets of rows and columns): predicting a number, sorting into categories, or grouping similar rows — usually your first stop before reaching for deep learning.
#When not to
Images, audio, or free text where deep learning (PyTorch/TensorFlow) or a pretrained model does the heavy lifting that classical ML can't.
#Example
from sklearn.tree import DecisionTreeClassifier
clf = DecisionTreeClassifier(max_depth=3)
clf.fit(X_train, y_train)
print(clf.predict(X_test))