Skip to main content

IMPACT framework, an interpretable multi-target framework for multi-class outputs

Project description

logo

An interpretable model for multi-target predictions with multi-class outputs


Welcome to the official repository for IMPACT – a novel, interpretable model designed for Multi-Target Predictions (MTP) with multi-class outputs. IMPACT extends the Cognitive Diagnosis Bayesian Personalized Ranking framework to effectively handle multi-class 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.

Installing IMPACT

Directly from pip

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 -------------
concept_map, 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

Contributor

Lucas Michaëli

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lirisimpact-2.0.19.tar.gz (48.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lirisimpact-2.0.19-py3-none-any.whl (53.8 kB view details)

Uploaded Python 3

File details

Details for the file lirisimpact-2.0.19.tar.gz.

File metadata

  • Download URL: lirisimpact-2.0.19.tar.gz
  • Upload date:
  • Size: 48.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.7

File hashes

Hashes for lirisimpact-2.0.19.tar.gz
Algorithm Hash digest
SHA256 ab85915ddfc04084ef179f28ad46a95bb5aaa3846d2780a91fc0466b3824ade6
MD5 484469dc1b54d4b47dec7e426b149e53
BLAKE2b-256 943f2b6c39a81c51de316534cb907b74e0df64e83779d0c7f85b249374f32206

See more details on using hashes here.

File details

Details for the file lirisimpact-2.0.19-py3-none-any.whl.

File metadata

  • Download URL: lirisimpact-2.0.19-py3-none-any.whl
  • Upload date:
  • Size: 53.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.7

File hashes

Hashes for lirisimpact-2.0.19-py3-none-any.whl
Algorithm Hash digest
SHA256 1ba8b3a18a83644389d2cd720b0aa3727d2cdee53a404b17ec2f0b1d880bba8b
MD5 5dbc37a215059fa341326b9ae93ddf3b
BLAKE2b-256 da12b8d721752e986949c7fe7dc493362fb63b0085bc5a34f9b6bb3e3dbfe3da

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page