The FEST method was implemented to solve task 1 and 2 in all 1, 2 or 3 dimensions from the Anomalous Diffusion challenge. The task 1 consists in the inference of the anomalous diffusion exponent α while the task 2 is a classification challenge of diffusion models.
The principle of the FEST (Feature Extraction Stack LSTM) method is first the measurement at each point of 6 features which vary depending on the dimension; These features could be x, y or z displacements, distances, mean of distances and/or angle. Afterwards, the input of features is passed through a neural network of stack bidirectional LSTM and Dense layers to predict either the alpha exponent (task 1) or the diffusion model (task 2). Because this network is limited to one track length during the training, we decided to train 4 different model each of which having a different track length (50, 200, 400 and 600), finally a combination of all 4 models is used during the prediction of tracks with various length.
git clone https://github.com/hkabbech/FEST_AnDiChallenge.git
cd FEST_AnDiChallenge
conda env create --file environment.yaml
conda activate andi-env
pip install numpy==1.19 scikit-learn==0.23.2 pandas==1.1.0\
tqdm keras==2.4.3 tensorflow-gpu==2.2.0\
matplotlib==3.3.0 docopt schema\
fbm andi-datasets
Run the following script in order to create AnDi datasets of track length 50, 200, 400 and 600 for the training of the 4 models. The first argument represents the number of points to create in each dataset.
python generate_training_datasets.py 15000000
The development_dataset_for_training
and challenge_for_scoring
datasets have to be placed in the data/
folder.
Usage:
python fest.py TASK DIM
Arguments:
TASK Task number. Should be 1 or 2.
DIM Dimension number. Should be 1, 2 or 3
Options:
-h, --help Show this
Run the task 1 dimension 3:
./fest 1 3