# scikit-learn

> A free Python tool full of classic models. You use them all the same way.

**Field:** Artificial Intelligence  
**Category:** Machine Learning  
**Also known as:** sklearn, SciKit Learn

## Think of it like

It is like a box of tools. Each tool has the same kind of handle.

## Definition

scikit-learn is a free Python library of classic machine learning models. It has linear regression, decision trees, random forests, k-means and many more. Every model works the same way: you call fit to train it and predict to use it. It also has tools to split, scale and score your data. It is built for tables of data that fit on one computer. It does not train deep neural networks.

## Example

It began in 2007 as a summer student project, and the first public release came in 2010. Lucy uses it to train a random forest on her shop's sales table.

## Example code

```python
from sklearn.ensemble import RandomForestClassifier
model = RandomForestClassifier().fit(X_train, y_train)
model.score(X_test, y_test)
# 0.87
```

Train with fit, then score on the test set. Every model follows this shape.

## Why it matters

It is where most people learn machine learning. One shape for every model makes swapping them easy.

## Common mistake

Expecting it to train big neural networks. For that, use PyTorch or TensorFlow.

## Three principles

- **Classic models.** Trees, regression, clustering and more.
- **Fit and predict.** The same two calls for all.
- **Table data.** Sized for one computer.

## Related terms

- [PyTorch](https://learn.benibix.com/term/ai/pytorch)
- [TensorFlow](https://learn.benibix.com/term/ai/tensorflow)
- [Random Forest](https://learn.benibix.com/term/ai/random-forest)
- [Linear Regression](https://learn.benibix.com/term/ai/linear-regression)
- [k-Means Clustering](https://learn.benibix.com/term/ai/k-means-clustering)
- [XGBoost](https://learn.benibix.com/term/ai/xgboost)

## Told apart from

- [scikit-learn vs PyTorch](https://learn.benibix.com/compare/scikit-learn-vs-pytorch): People think scikit-learn is a smaller PyTorch, and it is not. scikit-learn holds the classic models, like trees, forests and k-means. It is built for tables that fit on one computer. PyTorch is for building and training neural networks, often on a graphics card. Most table jobs need only the first.

## Taught in

- [scikit-learn and PyTorch](https://learn.benibix.com/learn/ai-machine-learning/scikit-learn-and-pytorch): Machine Learning, 18/18

![Your Python code at the top splits two ways. Left, classic models for table data: scikit-learn and XGBoost, running on a CPU. Right, neural networks: PyTorch and TensorFlow, running on a CPU or a graphics card.](https://learn.benibix.com/diagrams/ai3-ml-frameworks.svg)

---

Source: https://learn.benibix.com/term/ai/scikit-learn
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
