SAInTool 1.1.6
SAInT: An Interactive Tool for Sensitivity Analysis In The Loop
License: MIT

# SAInT: An Interactive Tool for Sensitivity Analysis In The Loop.

<p align="justify">
We present SAInT, an interactive tool for Sensitivity Analysis in the Loop, designed to simplify training, evaluating, and explaining Machine Learning (ML) models through a user-friendly graphical interface. By combining Human-in-the-Loop (HITL) techniques with Sensitivity Analysis (SA), SAInT helps users understand model behavior without programming expertise, breaking down barriers to interdisciplinary collaboration. The tool integrates Interactive ML (IML) with Local and Global Sensitivity Analysis, enabling tasks such as hyperparameter tuning, bias detection, feature selection, outlier visualization, model reliability exploration, and data refinement. SAInT empowers AI researchers and domain experts to improve models efficiently and effectively.
</p>

## Video

[![Watch the video](https://img.youtube.com/vi/m269sWdYUUI/maxresdefault.jpg)](https://www.youtube.com/watch?v=m269sWdYUUI)

If you use our tool, please cite us.

## Installation

We offer two options of installing our package.

Note: It is recommended to install the package within a virtual environment, for example with:
```
python -m venv myEnv
```
Then activate the virtual environment
on Windows with:
```
.\myEnv\Scripts\activate
```
or on Linux with:
```
./myEnv/bin/activate
```

### Option 1: Fast and easy Installation using pip (recommended)

```
pip install saintool
```

or


### Option 2: Installation of SAInT using the code of the GitHub Repository

Clone the repository using SSH or HTTP or download and unzip the zip package.

Clone using SSH:
```
git clone git@github.com:dfki-asr/SAInT.git
```
Clone using HTTP:
```
git clone https://github.com/dfki-asr/SAInT.git
```

Go to the main directory.
```
cd SAInT
```
Install the package by executing the script:
```
bash ./install.sh
```

## Setup working_directory and folder structure
If you installed the tool with **Option 1**, there is no default SAInT main directory.

We recommend to create a working directory that will contain two folders ```data``` and ```outputs```:
```
SAInT_working_directory/
├── data
└── outputs
```

If you installed the tool using **Option 2**, the SAInT directory already contains ```data``` and ```outputs``` folders.

Create a subfolder for each dataset in the data folder and copy your .csv-data into it.

**Single dataset, random splitting**:
Placing only a single file will randomly split it into ```train```, ```valid```, and ```test```.
Adjust the split fractions in the ```app_settings.json```: ```valid_frac``` and ```test_frac```.

**Multiple pre-splitted datasets**
Place your data as ```train_data.csv```, ```valid_data.csv``` and ```test_data.csv``` into the subfolder.

```
data/
├── titanic
|    └── total_data.csv
├── your_own_dataset
│    ├── train_data.csv
│    ├── valid_data.csv
│    └── test_data.csv
├── ishigami_sobol_g
|    └── total_data.csv
└── ...
```
SAInT will automatically create the output directory for each dataset with ```models``` and ```figures``` subfolders and place the results there:
```
outputs/
├── titanic
│    ├── figures
│    └── models
├── your_own_dataset
│    ├── figures
│    └── models
├── ishigami_sobol_g
│    ├── figures
│    └── models
└── ...
```

## Start the application
Start the SAInT Dash application in the browser:
```
bash ./run.sh
```
or by typing:
```
python3 -m SAInT
```
The default browser should open automatically.

Alternatively, you can use a browser of your choice by opening a new browser window and type in the address: http://127.0.0.1:8050/