Scikit-Learn

Last Updated: July 29, 2026 | By Mihail Sebastian | AI Dictionary

An open-source Python machine learning library with a uniform fit/predict API for classification, regression, clustering, and model evaluation.

What is Scikit-Learn?

Scikit-learn is an open-source Python machine learning library that puts classification, regression, clustering, and model evaluation behind one consistent programming interface.

It is the machine learning layer of the Python data stack, built on NumPy arrays and SciPy algorithms. Its territory is classical ML on tabular data; for deep neural networks, practitioners move up to PyTorch or TensorFlow.

How Scikit-Learn Works

Every algorithm is an estimator with the same core methods: fit learns from training data, predict produces outputs for new inputs, and transform reworks features. Swapping a decision tree for a support vector machine changes one line, not the program.

Around the algorithms sit tools for the workflow itself: a preprocessing module that scales and encodes features, train/test splitting, cross-validation, grid search over hyperparameters, and metrics such as precision, recall, and F1-score. Pipelines chain preprocessing and modeling into one object, so the whole sequence trains and validates as a unit.

The library began as a Google Summer of Code project in 2007. It has since become the default choice for machine learning on structured data in Python.

Example of Scikit-Learn

A spam filter is the classic starting project:

from sklearn.naive_bayes import MultinomialNB

clf = MultinomialNB()
clf.fit(X_train, y_train)
predictions = clf.predict(X_test)

X_train holds word-count features for emails already labeled spam or not spam (y_train). Calling fit learns which words distinguish the two classes; predict then labels emails the model has never seen.

Because every estimator shares this interface, evaluating the result on the held-out test set works the same whichever algorithm you picked. For a hands-on walkthrough of this workflow, see Getting Started with Machine Learning.

Related AI terms: NumPy · SciPy · Supervised Learning · Cross-Validation · Model Evaluation

Did you like the Scikit-Learn gist?

Learn about 250+ need-to-know artificial intelligence terms in the AI Dictionary.

Mihail Sebastian — Writes about AI governance, regulation, and the technology behind them. Placeholder bio — replace with a real credential line. About

Read the Governor's Letter

Stay ahead with Governor's Letter, the newsletter delivering expert insights, AI updates, and curated knowledge directly to your inbox.

By subscribing to the Governor's Letter, you consent to receive emails from AI Guv.
We respect your privacy - read our Privacy Policy to learn how we protect your information.

Browse All AI Terms A–Z

Every term in the dictionary, in alphabetical order. Jump to a letter or scroll the full list.

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z