This is the code corresponding to the experiments conducted for the work "Unsupervised Scalable Representation Learning for Multivariate Time Series"
Experiments were done with the following package versions for Python 3.8.3:
- Numpy (
numpy) v1.18.1; - Scikit-learn (
sklearn) v0.22.1; - Tensorflow (
tensorflow) 2.2.0.
Note that dkm.py requires an earlier version of Tensorflow
- Tensorflow (
tensorflow) 1.15.0.
The datasets will be generated using python make_datsets.py
To train the clustering module (CM) on a dataset $DATASET with $INITIALIZATION={rand|pre} (random or pretrained) initialization:
python CM.py $DATASET $INITIALIZATION -b BATCHSIZE -e EPOCH -p PRETRAINING_EPOCH -r NB_RUNS -g GPU_ID
The same function can be used for AECM.py, DCN.py, DEC.py and IDEC.py
The results will be saved for example in $DATASET/save/save-cm-rand.npz.
That archive contains 12 files:
llkvalue of the loss,wgtweights of the trained network,lblpredicted labels,klblpredicted labels by k-means on the embedding,ari,nmi,accAdjusted Rand index, Normalized Mutual Information and Accuracy of the predicted label (lbl),kari,knmi,kaccAdjusted Rand index, Normalized Mutual Information and Accuracy of the predicted label by k-means (klbl),epcDuration of the training.
To train DKM, dkm.py accordingly to the indications provided in the [authors' repository].