Skip to main content


Scikit-longitudinal banner

A Scikit-Learn-like Python library for Longitudinal Machine Learning — Paper · Documentation · PyPi Index

About The Project

Scikit-longitudinal (Sklong) is a machine learning library tailored for Longitudinal machine (supervised) learning (Classification tasks focussed as of today). It offers tools and models for processing, analysing, and predicting longitudinal data, with a user-friendly interface that integrates with the Scikit-learn ecosystem.

Wait, what is Longitudinal Data — In layman's terms?

Longitudinal data is a "time-lapse" snapshot of the same subject, entity, or group tracked over time-periods, similar to checking in on patients to see how they change. For instance, doctors may monitor a patient's blood pressure, weight, and cholesterol every year for a decade to identify health trends or risk factors. This data is more useful for predicting future results than a one-time (cross-sectional) survey because it captures evolution, patterns, and cause-effect throughout time.

See more in the documentation.

Installation

To install Scikit-longitudinal:

pip install Scikit-longitudinal

To install a specific version:

pip install Scikit-longitudinal==0.1.0

Getting Started

Let's run a simple Longitudinal machine learning classification task:

from scikit_longitudinal.data_preparation import LongitudinalDataset
from scikit_longitudinal.estimators.ensemble.lexicographical.lexico_gradient_boosting import LexicoGradientBoostingClassifier

dataset = LongitudinalDataset('./stroke.csv') # Note, this is a fictional dataset. Use yours!
dataset.load_data_target_train_test_split(
  target_column="class_stroke_wave_4",
)

# Pre-set or manually set your temporal dependencies 
dataset.setup_features_group(input_data="elsa")

model = LexicoGradientBoostingClassifier(
  features_group=dataset.feature_groups(),
  threshold_gain=0.00015 # Refer to the API for more hyper-parameters and their meaning
)

model.fit(dataset.X_train, dataset.y_train)
y_pred = model.predict(dataset.X_test)

# Classification report
print(classification_report(y_test, y_pred))

How to Cite

If you use Sklong in your research, please cite our paper:

JOSS DOI badge

We would like to personally thank Prof. Lengerich (UW Madison—@blengerich & @AdaptInfer), & Prof. Tahiri (Université de Sherbrooke—@TahiriNadia & @tahiri-lab) for their amazing peer reviews!

@article{Provost2025,
    doi = {10.21105/joss.08481},
    url = {https://doi.org/10.21105/joss.08481},
    year = {2025},
    publisher = {The Open Journal},
    volume = {10},
    number = {112},
    pages = {8481},
    author = {Provost, Simon and Freitas, Alex A.},
    title = {Scikit-Longitudinal: A Machine Learning Library for Longitudinal Classification in Python},
    journal = {Journal of Open Source Software}
}

License

Scikit-longitudinal is licensed under the MIT License.

Metadata

Release files for Scikit-longitudinal 0.1.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Scikit-longitudinal 0.1.10
File Size Uploaded
scikit_longitudinal-0.1.10.tar.gz 45.1 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for Scikit-longitudinal 0.1.10
File Interpreter ABI Platform
scikit_longitudinal-0.1.10-py3-none-any.whl Python 3 none any Details

Total release size: 45.3 MB

Release files / scikit_longitudinal-0.1.10.tar.gz

Download URL scikit_longitudinal-0.1.10.tar.gz
Size 45.1 MB
Tags Source
SHA-256 checksum
How to use checksums
c968cd548d211b1aca9aa6024e424f777b12e7fbd02b9cedcd4e7109159e3676
BLAKE2b-256 checksum
How to use checksums
c575437185c196a579968599275dd6e22ddc57dcdd75bfa02f9d20563e8896d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / scikit_longitudinal-0.1.10-py3-none-any.whl

Download URL scikit_longitudinal-0.1.10-py3-none-any.whl
Size 142.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a0c1871bea448b84a703b311df20731869def2f0998e8e7acc2a3d4434ccc0bc
BLAKE2b-256 checksum
How to use checksums
9df5ca1912de0b20606d79f0b317642827ccd854673bfb71d88fd98d6d057882
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.1.10 This release

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page