Skip to content

Scikit-longitudinal (Sklong) is an open-source Python library & Scikit-Learn API compliant, tailored to longitudinal machine learning classification tasks. It is ideal for researchers, data scientists, and analysts, as it provides specialist tools for dealing with repeated-measures data challenges

License

Notifications You must be signed in to change notification settings

simonprovost/scikit-longitudinal

Repository files navigation


Scikit-longitudinal
Scikit-longitudinal

A specialised Python library for longitudinal data analysis built on Scikit-learn


📰 Latest News

  • Updated Workflow: Now leveraging UV for enhanced project management and dependency resolution.
  • Documentation: Dive into Scikit-longitudinal's features and capabilities in our official documentation.
  • PyPI Availability: The library is available on PyPI.

💡 About The Project

Scikit-longitudinal (Sklong) is a machine learning library designed to analyse longitudinal data (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.

For more details, visit the official documentation.


🛠️ Installation

To install Scikit-longitudinal:

  1. ✅ Install the latest version:

    pip install Scikit-longitudinal

    To install a specific version:

    pip install Scikit-longitudinal==0.1.0

See further in the Quick Start of the documentation for more details.


🚀 Getting Started

Here's how to analyse longitudinal data with Scikit-longitudinal:

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))

See further in the Quick Start of the documentation for more details.


📝 How to Cite

If you find Scikit-longitudinal helpful, please cite us using the CITATION.cff file or via the "Cite this repository" button on GitHub.


🔐 License

Scikit-longitudinal is licensed under the MIT License.

About

Scikit-longitudinal (Sklong) is an open-source Python library & Scikit-Learn API compliant, tailored to longitudinal machine learning classification tasks. It is ideal for researchers, data scientists, and analysts, as it provides specialist tools for dealing with repeated-measures data challenges

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published