Improve README.md and provide dependencies file

This commit is contained in:
Marcus Vinicius de Carvalho 2020-02-19 12:39:11 +08:00
parent 2c140b5ec3
commit 8f306f8888
2 changed files with 104 additions and 29 deletions

View File

@ -1,14 +1,41 @@
# Reference
[ArXiv -> ATL: Autonomous Knowledge Transfer from Many Streaming Processes](https://arxiv.org/abs/1910.03434)
## Paper
[ResearchGate -> ATL: Autonomous Knowledge Transfer from Many Streaming Processes](https://www.researchgate.net/publication/336361712_ATL_Autonomous_Knowledge_Transfer_from_Many_Streaming_Processes)
ATL: Autonomous Knowledge Transfer from Many Streaming Processes
[ArXiv](https://arxiv.org/abs/1910.03434)
[ResearchGate](https://www.researchgate.net/publication/336361712_ATL_Autonomous_Knowledge_Transfer_from_Many_Streaming_Processes)
[ACM Digital Library](https://dl.acm.org/action/doSearch?AllField=ATL&expand=all&ConceptID=119445)
## Bibtex
```
@inproceedings{10.1145/3357384.3357948,
author = {Pratama, Mahardhika and de Carvalho, Marcus and Xie, Renchunzi and Lughofer, Edwin and Lu, Jie},
title = {ATL: Autonomous Knowledge Transfer from Many Streaming Processes},
year = {2019},
isbn = {9781450369763},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/3357384.3357948},
doi = {10.1145/3357384.3357948},
booktitle = {Proceedings of the 28th ACM International Conference on Information and Knowledge Management},
pages = {269278},
numpages = {10},
keywords = {concept drif, transfer learning, deep learning, multistream learning},
location = {Beijing, China},
series = {CIKM 19}
}
```
# Notes
If you want to see the original code used for this paper, access [ATL_Matlab](https://github.com/Ivsucram/ATL_Matlab)
`ATL_Python` is a reconstruction of `ATL_Matlab` by the same author, but using Python 3.6 and PyTorch (with autograd enabled and GPU support). The code is still not one-to-one and some differences in results can be found (specially on the data split methods in `DataManipulator`, however the network structure is correct and can be used by whoever is interested on this work in order to understand the structure or to build comparative results with your own research work.
`ATL_Python` is a reconstruction of `ATL_Matlab` made by the same author, but using Python 3.6 and PyTorch (with autograd enabled and GPU support). The code is still not one-to-one and some differences in results can be found (specially on the data split methods in `DataManipulator`, however the network structure is correct and can be used by whoever is interested on this work in order to understand the structure or to build comparative results with your own research work.
Having said that, expect `ATL_Python` to be updated in the following weeks, including functions refactoring and functions documentation.
@ -19,8 +46,16 @@ ACM CIKM 2019
1. Clone `ATL_Python` git to your computer, or just download the files.
2. Provide a dataset by replacing the file `data.csv`
The current `data.csv` holds [https://www.researchgate.net/publication/221653408_A_Streaming_Ensemble_Algorithm_SEA_for_Large-Scale_Classification](SEA) dataset.
2. Install [anaconda](https://www.anaconda.com/) or [miniconda](https://docs.conda.io/en/latest/miniconda.html).
3. Open Anaconda prompt and travel until ATL folder.
4. Run the following command `conda env create -f environment.yml`. This will create an environment called `atl` with every python packaged/library needed to run ATL.
5. Enable ATL environment by running the command `activate atl` or `conda activate atl`.
6. Provide a dataset by replacing the file `data.csv`
The current `data.csv` holds [SEA](https://www.researchgate.net/publication/221653408_A_Streaming_Ensemble_Algorithm_SEA_for_Large-Scale_Classification) dataset.
`data.csv` must be prepared as following:
```
@ -29,49 +64,38 @@ The current `data.csv` holds [https://www.researchgate.net/publication/221653408
- The last column presents the label for that sample. Don't use one-hot encoding. Use a format from 1 onwards
```
3. Open Matlab. The code was developed using Matlab 2018b, so if you use an older version, you might get some incompability errors.
You can use Matlab 2018b or newer.
Matlab may prompt you to install some official add-ons, as:
```
- Deep Learning Toolbox
- Fuzzy Logic Toolbox
- Digital Processing Signal Toolbox
```
4. Inside Matlab, travel until the folder where you downloaded `ATL_Matlab`.
5. On the Matlab terminal, just type `ATL`. This will execute ATL, which will read your data.csv and process it.
7. Run `python ATL.py`
ATL will automatically normalize your data and split your data into 2 streams (Source and Target data streams) with a bias between them, as described in the paper.
Matlab will print ATL status at the end of every minibatch, where you will be able to follow useful information as:
ATL statues are printed at the end of every minibatch, where you will be able to follow useful information as:
```
- Training time (maximum, mean, minimum, current and accumulated)
- Testing time (maximum, mean, minimum, current and accumulated)
- The number of GMM clusters (maximum, mean, minimum and current)
- The target classification rate
- Classification Rate for the Source (maximum, mean, minimum and current)
- Classification Rate for the Target (maximum, mean, minimum and current)
- Classification Loss for the Source (maximum, mean, minimum and current)
- Classification Loss for the Target (maximum, mean, minimum and current)
- Reconstruction Loss for the Target (maximum, mean, minimum and current)
- Kullback-Leibler Loss (maximum, mean, minimum and current)
- Number of nodes (maximum, mean, minimum and current)
- And a quick review of ATL structure (both discriminative and generative phases), where you can see how many automatically generated nodes were created.
```
At the end of the process, Matlab will plot 6 graphs:
At the end of the process, ATL will plot 6 graphs:
```
- Network bias and Network variance w.r.t. the generative phase
- Network bias and Network variance w.r.t. the discriminative phase
- The target and source classification rate evolution, as well as the final mean accuracy of the network
- All losses over time, and how they influence the network learning
- The evolution of GMMs on Source and Taret AGMMs over time
- The processing time per mini-batch and the total processing time as well, both for training and testing
- The evolution of nodes over time
- The target and source classification rate evolution, as well as the final mean accuracy of the network
```
Thank you.
# Download all datasets used on the paper
As some datasets are too big, we can't upload them to GitHub. GitHub has a size limite of 35MB per file. Because of that, you can find all the datasets in a csv format on the anonymous link below. To test it, copy the desired dataset to the same foler as ATL and rename it to `data.csv`.
As some datasets are too big, we can't upload them to GitHub. GitHub has a size limit of 35MB per file. Because of that, you can find all the datasets in a csv format on the anonymous link below. To test it, copy the desired dataset to the same folder as ATL and rename it to `data.csv`.
- [https://drive.google.com/drive/folders/1Te0KMqJ5DUVuJK3tVt1l3AbHuKR4CxP9](https://drive.google.com/drive/folders/1Te0KMqJ5DUVuJK3tVt1l3AbHuKR4CxP9)

51
environment.yml Normal file
View File

@ -0,0 +1,51 @@
name: atl
channels:
- defaults
dependencies:
- _pytorch_select=1.1.0=cpu
- blas=1.0=mkl
- ca-certificates=2020.1.1=0
- certifi=2019.11.28=py37_0
- cffi=1.14.0=py37h7a1dbc1_0
- colorama=0.4.3=py_0
- cudatoolkit=10.1.243=h74a9793_0
- cycler=0.10.0=py37_0
- freetype=2.9.1=ha9979f8_1
- icc_rt=2019.0.0=h0cc432a_1
- icu=58.2=ha66f8fd_1
- intel-openmp=2020.0=166
- jpeg=9b=hb83a4c4_2
- kiwisolver=1.1.0=py37ha925a31_0
- libpng=1.6.37=h2a8f88b_0
- matplotlib=3.1.3=py37_0
- matplotlib-base=3.1.3=py37h64f37c6_0
- mkl=2020.0=166
- mkl-service=2.3.0=py37hb782905_0
- mkl_fft=1.0.15=py37h14836fe_0
- mkl_random=1.1.0=py37h675688f_0
- ninja=1.9.0=py37h74a9793_0
- numpy=1.18.1=py37h93ca92e_0
- numpy-base=1.18.1=py37hc3f5095_1
- openssl=1.1.1d=he774522_4
- pandas=1.0.1=py37h47e9c7a_0
- pip=20.0.2=py37_1
- pycparser=2.19=py37_0
- pyparsing=2.4.6=py_0
- pyqt=5.9.2=py37h6538335_2
- python=3.7.6=h60c2a47_2
- python-dateutil=2.8.1=py_0
- pytorch=1.3.1=cpu_py37h9f948e0_0
- pytz=2019.3=py_0
- qt=5.9.7=vc14h73c81de_0
- setuptools=45.2.0=py37_0
- sip=4.19.8=py37h6538335_0
- six=1.14.0=py37_0
- sqlite=3.31.1=he774522_0
- tornado=6.0.3=py37he774522_3
- vc=14.1=h0510ff6_4
- vs2015_runtime=14.16.27012=hf0eaf9b_1
- wheel=0.34.2=py37_0
- wincertstore=0.2=py37_0
- zlib=1.2.11=h62dcd97_3
prefix: C:\Users\marcus.decarvalho\AppData\Local\Continuum\miniconda3\envs\atl