---
# System prepended metadata

title: Project documentation template

---

---
title: 'Project documentation template'
disqus: hackmd
---

NAD Challenge - Network anomaly detection framework
===

## Shell script
For training and testing, please modify the shell script `run.sh` as belows:

* Argparse:
    * `preprocess.py`
        * `--trn`: sequence of datasets for training
        * `--tst`: sequence of datasets for testing
        * `--output_trn`: training data (input of models)
        * `--pretrained`: whether to use pretrained encoders
    * `main.py`
        * `--trn`: preprocessed training data
        * `--tst_src`: sequence of datasets for testing
        * `--eval`: whetehr to evaluate the testing result
        * `--pretrained`: whether to use pretrained models

### Training

```
virtualenv -p $(which python3) 156_venv
. 156_venv/bin/activate
python -m pip install -r requirements.txt
python preprocess.py --trn 1203_firewall.csv 1210_firewall.csv 1216_firewall.csv --tst 0123_firewall.csv 0124_firewall.csv 0125_firewall.csv 0126_firewall.csv --output_trn train.csv
python main.py --trn train.csv --tst_src 0123_firewall.csv 0124_firewall.csv 0125_firewall.csv 0126_firewall.csv --eval False
deactivate
```

### Testing

```
virtualenv -p $(which python3) 156_venv
. 156_venv/bin/activate
python -m pip install -r requirements.txt
python preprocess.py --trn 1203_firewall.csv 1210_firewall.csv 1216_firewall.csv --tst 0123_firewall.csv 0124_firewall.csv 0125_firewall.csv 0126_firewall.csv --output_trn train.csv --pretrained True
python main.py --trn train.csv --tst_src 0123_firewall.csv 0124_firewall.csv 0125_firewall.csv 0126_firewall.csv --eval False --pretrained True
deactivate
```