提交 0e055822 编辑于 作者: Oliver's avatar Oliver
浏览文件

Initial commit

上级
加载中
加载中
加载中
加载中
加载中

README.md

0 → 100644
+60 −0
原始行号 差异行号 差异行
# DOMI


###  Detecting Outlier Machine Instances through One Dimensional CNN Gaussian Mixture Variational AutoEncoder

DOMI is a VAE-based model which glues one Dimensional Convolution Neural Network and Gaussian Mixture Variational auto-encoder. 
It aims at detecting outlier machine instances and its core idea is to learn the normal patterns of multivariate time series
and use the reconstruction probability to do outlier judgment. 
Moreover, for a detected outlier machine instance, DOMI provides interpretation based on reconstruction probability changes of univaraite time series.



## Getting Started

#### Clone the repo

```
git clone https://github.com/Tsinghuasuya/DOMI_code
```

#### Get data from github and unzip 

```
git lfs clone https://github.com/Tsinghuasuya/DOMI_dataset && cd DOMI_dataset && unzip publicDataset.zip  && cd  ../DOMI_code
```


#### Install dependencies (with python 3.6) 

(virtualenv is recommended)

```shell
pip install -r requirements.txt
```


#### Run the code

```
cd code && python domi.py
```

If you want to change the default configuration, you can edit `ExpConfig` in `config.py` or 
overwrite the config in `domi.py` using command line args. For example:

```
python domi.py --noExp=2 --max_epoch=100 --initial_lr=0.0001 
```


## Result

After running the programmings, you can get the output in the file directory that you set in the config. For each instance, you can get the total score and score of each univariate time series. 
All the results are in the folder `{config.result_dir}/`, with trained model in `{config.result_dir}/DOMI_{noExp}.model`, the output and config of DOMI in the folder `{config.result_dir}/DOMI_{noExp}/`, 
and the detailed detection results are in the folder `DOMI_{noExp}/result_summay/`. It's made up by the following parts:
* `OutlierScores_metric.txt`: score of each univariate time series for instance in the testing dataset.
* `OutlierScores.txt`: score for each instance in the testing dataset.
* `MetricResult.txt`: interpretation using the univariate time series of machine instances.
* `PRF.txt`: summary of the overall statistics, including expected score of each metric and F1-score, recall, precision. 
 No newline at end of file

code/.idea/.gitignore

0 → 100644
+3 −0
原始行号 差异行号 差异行
# Default ignored files
/shelf/
/workspace.xml

code/.idea/code.iml

0 → 100644
+13 −0
原始行号 差异行号 差异行
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
  <component name="NewModuleRootManager">
    <content url="file://$MODULE_DIR$" />
    <orderEntry type="inheritedJdk" />
    <orderEntry type="sourceFolder" forTests="false" />
  </component>
  <component name="PyDocumentationSettings">
    <option name="format" value="PLAIN" />
    <option name="myDocStringFormat" value="Plain" />
  </component>
</module>
 No newline at end of file
+20 −0
原始行号 差异行号 差异行
<component name="InspectionProjectProfileManager">
  <profile version="1.0">
    <option name="myName" value="Project Default" />
    <inspection_tool class="PyPep8NamingInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
      <option name="ignoredErrors">
        <list>
          <option value="N802" />
        </list>
      </option>
    </inspection_tool>
    <inspection_tool class="PyUnresolvedReferencesInspection" enabled="true" level="WARNING" enabled_by_default="true">
      <option name="ignoredIdentifiers">
        <list>
          <option value="main.Cryptodome" />
        </list>
      </option>
    </inspection_tool>
  </profile>
</component>
 No newline at end of file
+7 −0
原始行号 差异行号 差异行
<component name="InspectionProjectProfileManager">
  <settings>
    <option name="USE_PROJECT_PROFILE" value="false" />
    <version value="1.0" />
  </settings>
</component>
 No newline at end of file