---
url: /blog/introducing-scikit-link.md
description: >-
  Why we are building scikit-link, the multi-table problem it solves for
  scikit-learn users, and what it can do today.
---

# Introducing scikit-link

**scikit-link is an open source Python library for training scikit-learn
models on related tables.** You can compute features in a pipeline, fit
relational trees, forests and gradient boosting models that split on related
records, or cluster entities and flag anomalies by their related rows.

## The gap

Suppose the customer table is the input to a churn model. A customer's order
count and average order amount both belong in that customer's feature row,
but the amounts live in a separate table. For a new question, such as how
many express orders exceeded a threshold, the aggregation changes again.

We built scikit-link to do that work inside a scikit-learn estimator. A
pipeline can compute the aggregates during each training fold, and a
relational tree can learn which orders to count.

## What scikit-link does

* Describe the tables and keys in a `Database`. `X` has one row per sample
  with the key that links it to the database.
* Compute features such as `count(orders[type == 'express'])`, or fit a
  relational decision tree or forest that learns conditions on orders from
  the labels. Gradient boosting adds trees that correct each other.
* Cluster customers (`RelationalKMeans`, `RelationalClusteringTree`) or score
  anomalies (`RelationalIsolationForest`) from their related rows.
* Use scikit-learn cross-validation and hyperparameter search. Each fit
  learns from the training samples. For temporal data, give samples a cutoff
  so features only use events visible at prediction time.

scikit-link is on PyPI. Follow
the [installation guide](https://scikit-link.rodrigo-arenas.com/stable/getting-started/installation)
and [quickstart](https://scikit-link.rodrigo-arenas.com/stable/getting-started/quickstart)
to run a small example. See the [roadmap](../roadmap) for release plans.

## Follow along

The code is on [GitHub](https://github.com/rodrigo-arenas/scikit-link). If you
work with multi-table data, or moved away from Featuretools, we would like to
hear about your use case in
[Discussions](https://github.com/rodrigo-arenas/scikit-link/discussions).
