import ibis_ml as ml
= ml.ImputeMean(ml.numeric())
imputer = ml.ScaleStandard(ml.numeric())
scaler = ml.Recipe(imputer, scaler) rec
Welcome to IbisML
A library for building scalable ML pipelines
Get started
Install IbisML
pip install ibis-ml
Create your first recipe
With recipes, you can define sequences of feature engineering steps to get your data ready for modeling. For example, create a recipe to replace missing values using the mean of each numeric column and then normalize numeric data to have a standard deviation of one and a mean of zero.
A recipe can be chained in a Pipeline
like any other transformer.
from sklearn.pipeline import Pipeline
from sklearn.svm import SVC
= Pipeline([("rec", rec), ("svc", SVC())]) pipe
The pipeline can be used as any other estimator and avoids leaking the test set into the train set.
from sklearn.datasets import make_classification
from sklearn.model_selection import train_test_split
= make_classification(random_state=0)
X, y = train_test_split(X, y, random_state=0)
X_train, X_test, y_train, y_test pipe.fit(X_train, y_train).score(X_test, y_test)
0.88