


#-------------------------------------------------Instructions to run audio experiments------------------------------------------------

1. First, download "0_dB_slider.zip" from MIMII data set (link to download dataset : https://zenodo.org/record/3384388#.YLm9LVUzZuQ)

2. Second, after downloading the data set, train autoencoders for all machines (00,02,04,06). To train autoencoders, run train_autoencoder.ipynb. Make note of the locations where these trained autoencoders are saved (please follow the comments in train_autoencoder.ipynb notebook)

3. Third, after downloading the dataset, for change point $\nu=6$, concatenate 6 normal files and 54 abnormal files, chosen uniformly at random, from machine ID00. For the other machines, concatenate 60 normal files at random. The 60 files correspond to 600 seconds.Changepoint corresponds to 6th file, which we denote as $\nu=6$ and the task is to detect this change. Make a note of the locations where these audio files are saved. 

4. Fourth, run "estimate_theta_machine.ipynb" to calculate and save reconstruction errors for normal and abnormal operation. The .ipynb file is written only for one machine ID, and hence, please run this .ipynb file for different machine IDs (instruction is given as a comment in .ipynb file)

5. Fifth, run "estimate_theta.ipynb" to calculate the estimate of pre-change parameter and post-change parameter set. This .ipynb save these parameters as .npy files. 

6. Sixth, run "Epsilon_Greedy_Detector.ipynb", "Oracle_Detector.ipynb", and "URS_Detector.ipynb" to to get stopping time statistics of Epsilon-Greeedy change detector, URS change detector, and Oracle change detector. These .ipynb files save stopping time stats as .npy files. 

7. Finally, run "graph.ipynb" to generate histogram of stopping times corresponding to the three detectors. 


