{% extends "layout.html" %} {% set title = 'skrub: Machine Learning with dataframes' %} {%- block extrahead %} {{ super() }} {# Add here landing-page specific stuff that goes in the header (eg css) #} {%- endblock extrahead %} {% block docs_navbar %} {{ super() }} {# We add the full-width banner below the navbar, as the div there is still full-width (unlike the article) #}

skrub

  • scikit-learn compatible
  • Database preprocessing
  • Heterogeneous Pandas and Polars dataframes (numeric, categorical, dates, text...)
{% endblock docs_navbar %} {% block docs_main %}

Machine learning with dataframes

skrub is a Python library to ease preprocessing and feature engineering for tabular machine learning.
We directly connect database tables to machine learning.

Interactive Data Exploration

Explore your dataframes interactively with TableReport.

{% include "demo_table_report_code.html" %}

Try it on your dataset →

Click anywhere on the table

{% include "demo_table_report_generated.html" %}

Effortless Tabular Learning

The Table Vectorizer

Turn your mixed-type dataframe into a numeric feature matrix with the TableVectorizer. Automatically performs preprocessing of the data, such as standardizing missing values and parsing dates, before encoding based on whether a column contains numbers, strings, or datetimes.

The Tabular Pipeline

Choose regression or classification and let tabular_pipeline do the rest. Use the power of the TableVectorizer to immediately create a scikit-learn baseline model with good defaults for each column
based on the datetype.

{% include "demo_tabular_pipeline.html" %}

Powerful Feature Engineering

Encode text and high cardinality categorical data:

Extract temporal features with:

Robustly scale and clip numerical features with:

Many more transformations, all scikit-learn
compatible
. All transformers can be applied
to a custom selection of columns using ApplyToCols.

The skrub DataOps framework

Custom trainable pipelines

Discover the skrub DataOps →

{% include "../_build/html/_static/credit_fraud_report/credit_fraud_graph.svg" %}

Open an interactive report →

Leakproof cross-validation

  • Include the construction of X and y in the pipeline itself.
  • Evaluate without data leakage with the built-in cross-validation.
  • Tune data pipeline decisions, not only hyperparameters:
    • Combine and nest the choose_* functions to build extensive hyperparameter grids with no effort.
    • Explore the hyperparameter space with scikit-learn or Optuna.

Tune and validate your pipelines →

features = order_ids.skb.apply_func(    join_orders_products,    vectorized_products,-    agg_func="mean",+    agg_func=skrub.choose_from(["mean", "sum"]),)pred = features.skb.apply(-    HistGradientBoostingClassifier(learning_rate=0.1),+    HistGradientBoostingClassifier(+        learning_rate=skrub.choose_float(0.01, 0.5, log=True)+    ),    y=fraud_flags,)

Our Community

The skrub project is powered by the efforts of a world-wide community of contributors. Here we display a randomly selected group of 30 contributors.

Try it yourself!

Ready to write less code and get more insights? Dive into skrub now and be part of an emerging community!

{% endblock docs_main %} {%- block footer %} {%- endblock footer %}