Skip to content
BENIBIX Learn

scikit-learn

AI📈 Machine LearningML Frameworks

Also known as sklearn, SciKit Learn

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

Think of it like

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

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.

Why it matters

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

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 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.
scikit-learn sits on the classic side. It is for tables of data, not neural networks.

Common mistake

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

Key takeaways

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

Compare

Learn it properly