Skip to main content

logo

An interpretable model for multi-target predictions with ordinal outputs


Welcome to the official repository for IMPACT – a novel, interpretable model designed for Multi-Target Predictions (MTP) with ordinal outputs. IMPACT extends the Cognitive Diagnosis Bayesian Personalized Ranking framework to effectively handle ordinal prediction tasks. Built primarily in Python using PyTorch, this repository includes the four datasets featured in our publication, along with Jupyter notebooks that allow you to reproduce our experiments and conduct your own analyses.

Preprocessed datasets and predictions are automatically downloaded by the Makefile.

Installing IMPACT

Directly from pip

  • with dependencies :
pip install lirisimpact
import IMPACT
  • without dependencies :
SKIP_INSTALL_REQUIRES=1 pip install lirisimpact
import IMPACT

Or from source for developers

git clone https://github.com/arthur-batel/IMPACT.git
cd IMPACT
make install
conda activate impact-env
# open one of the notebooks in the experiments/notebook_examples folder

Requirements

IMPACT in few lines of code

from IMPACT import utils, model, dataset

# Set all the required parameters ---------------
config = utils.generate_eval_config(dataset_name="postcovid", learning_rate=0.02026, lambda_=1.2e-5, batch_size=2048, num_epochs=200,
                                    valid_metric='rmse', pred_metrics=['rmse', 'mae'], profile_metrics=['doa', 'pc-er'])

# Read the dataset and the metadata -------------
train_data, valid_data, test_data = utils.prepare_dataset(config, i_fold=0)

# Train the model --------------------------------
algo = model.IMPACT(**config)
algo.init_model(train_data, valid_data)
algo.train(train_data, valid_data)

# Test the model --------------------------------
eval_preds = algo.evaluate_predictions(test_data)
eval_profiles = algo.evaluate_profiles(test_data)

print("Evaluation of the predictions :",eval_preds)
print("Evaluation of the profiles :",eval_profiles)

Repository map

  • experiments/ : Contains the jupyter notebooks and datasets to run the experiments of the scientific paper.
    • experiments/ckpt/ : Folder for models parameter saving
    • experiments/datasets/ : Contains the raw and pre-processed datasets, as well as there pre-processing jupyter notebook
    • experiments/embs/ : Folder for user embeddings saving
    • experiments/hyperparam_search/ : Contains the csv files of the optimal hyperparameter for each method (obtained with Tree-structured Parzen Estimator (TPE) sampler)
    • experiments/logs/ : Folder for running logs saving
    • experiments/notebook_example/ : Contains the jupyter notebooks to run the experiments of the scientific paper, including competitors.
    • experiments/preds/ : Folder for predictions saving
    • experiments/tensorboard/ : Folder for tensorboard data saving
  • figs/ : Contains the figures of the paper
  • IMPACT/ : Contains the source code of the IMPACT model
    • IMPACT/dataset/ : Contains the code of the dataset class
    • IMPACT/models/ : Contains the code of the IMPACT model and its abstract class, handling the learning process
    • IMPACT/utils/ : Contains utility functions for logging, complex metric computations, configuration handling, etc.

Authors

Arthur Batel, arthur.batel@insa-lyon.fr, INSA Lyon, LIRIS UMR 5205 FR

Marc Plantevit, marc.plantevit@epita.fr, EPITA Lyon, EPITA Research Laboratory (LRE) FR

Idir Benouaret, idir.benouaret@epita.fr, EPITA Lyon, EPITA Research Laboratory (LRE) FR

Céline Robardet, celine.robardet@insa-lyon.fr,

INSA Lyon, LIRIS UMR 5205 FR

Metadata

Release files for lirisimpact 3.0.0

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

Source distribution (sdist)

Source distribution for lirisimpact 3.0.0
File Size Uploaded
lirisimpact-3.0.0.tar.gz 19.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for lirisimpact 3.0.0
File Interpreter ABI Platform
lirisimpact-3.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.2 MB

Release files / lirisimpact-3.0.0.tar.gz

Download URL lirisimpact-3.0.0.tar.gz
Size 19.2 MB
Tags Source
SHA-256 checksum
How to use checksums
6d0b9ffe8d75956c6a7bc8b30304c8ee54d81e9e1ad07131168bc070b09fa095
BLAKE2b-256 checksum
How to use checksums
1fb73172f8a2ce2dd58db90015c385fcede36ca251cb94385937fa167f434451
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.0

Release files / lirisimpact-3.0.0-py3-none-any.whl

Download URL lirisimpact-3.0.0-py3-none-any.whl
Size 57.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dbbc3a0fbf88e6897f94d9fe562b3963b63e8b60b605207e40c75ca6c4a74c04
BLAKE2b-256 checksum
How to use checksums
c9f10e42d96abbaa7fa5c4cf87003221ed2e24b47ead1c7538dacd17db09917f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.0

Release history Release notifications | RSS feed

This release

3.0.0 This release

2 release files

2.0.16

2 release files

2.0.15

2 release files

2.0.14

2 release files

2.0.13

2 release files

2.0.12

2 release files

2.0.11

2 release files

2.0.10

2 release files

2.0.9

2 release files

2.0.8

2 release files

2.0.7

2 release files

2.0.6

2 release files

2.0.5

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.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