Skip to content

A supervised autoencoder with structured sparsity for efficient and informed clinical prognosis.

License

Notifications You must be signed in to change notification settings

CyprienGille/Supervised-Autoencoder

Repository files navigation

Supervised Autoencoder

This is the code from : Learning a confidence score and the latent space of a new Supervised Autoencoder for diagnosis and prognosis in clinical metabolomic studies.

In this repository, you will find the code to replicate the statistical study described in the paper.

When using this code, please cite:

Barlaud, M., Guyard, F.: Learning sparse deep neural networks using efficient structured projections on convex constraints for green ai. ICPR 2020 Milan Italy (2020)

and

David Chardin, Cyprien Gille, Thierry Pourcher and Michel Barlaud : Learning a confidence score and the latent space of a new Supervised Autoencoder for diagnosis and prognosis in clinical metabolomic studies. BMC Bioinformatics (2022)

Table of Contents


  1. Repository Contents
  2. Installation
  3. How to use

Repository Contents

File/Folder Description
script_autoencoder.py Main script to train and evaluate the SAE
script_NN.py Script to train and evaluate the neural network classifier
script_PLSDA_RF_SVM.py Script to fit and evaluate classical methods
datas Contains the three databases used in the paper
functions Contains dedicated functions for the three main scripts

Installation


To run this code, you will need :

  • A version of python, 3.8 or newer. If you are new to using python, we recommend downloading anaconda (here) and using Spyder (available by default from the anaconda navigator) to run the code.
  • Pytorch.
  • The following packages, all of which except captum and shap are usually included in the anaconda distribution : numpy, matplotlib, scikit-learn, pandas, shap, captum. To install any package, you can use the anaconda navigator's built-in environment manager.

See requirements.txt for the exact package versions on which this code was developed.

How to use

Everything is ready, you can just run the script you want using for example the 'run code' button of your Spyder IDE. Alternatively, you can run the command python [script_name].py in the Anaconda Prompt from the root of this folder (i.e. where you downloaded and unzipped this repository).

Each script will produce results (statistical metrics, top features...) in a results folder.

You can change the database used, and other parameters, near the start of each script.