Skip to content

Commit 86a0eff

Browse files
committed
Update new version 2.0.0
1 parent a9818df commit 86a0eff

File tree

1 file changed

+62
-71
lines changed

1 file changed

+62
-71
lines changed

readme.md

Lines changed: 62 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
# Efficient Time-series Forecasting using Neural Network and Opposition-based Coral Reefs Optimization
22

3-
## Publications
4-
* If you see our work is useful, please cite us as follows:
5-
```code
6-
@article{Nguyen2019,
7-
title={Efficient Time-Series Forecasting Using Neural Network and Opposition-Based Coral Reefs Optimization},
8-
author={Thieu Nguyen and Tu Nguyen and Binh Minh Nguyen and Giang Nguyen},
9-
year={2019},
10-
journal={International Journal of Computational Intelligence Systems},
11-
volume={12},
12-
issue={2},
13-
pages={1144-1161},
14-
issn={1875-6883},
15-
url={https://doi.org/10.2991/ijcis.d.190930.003},
16-
doi={https://doi.org/10.2991/ijcis.d.190930.003}
17-
}
18-
```
3+
[![GitHub release](https://img.shields.io/badge/release-2.0.0-yellow.svg)]()
4+
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3742045.svg)](https://doi.org/10.5281/zenodo.3742045)
5+
[![License](https://img.shields.io/badge/License-Apache%202.0-green.svg)](https://opensource.org/licenses/Apache-2.0)
196

20-
* Link full PDF:
21-
=> [PDF](https://download.atlantis-press.com/article/125921354.pdf)
7+
## Dear friends and followers
8+
* I updated to repository to the newest version (version 2.0.0), which is very easy to read and reproduce.
9+
* All of our optimizers are (meta-heuristics) now deleted and taken the new one from my newest library:
10+
11+
https://pypi.org/project/mealpy/
12+
13+
* If you use my code or library in your project, I would appreciate the cites:
14+
* Nguyen, T., Nguyen, T., Nguyen, B. M., & Nguyen, G. (2019). Efficient Time-Series Forecasting Using Neural Network and Opposition-Based Coral Reefs Optimization. International Journal of Computational Intelligence Systems, 12(2), 1144-1161.
15+
16+
* Nguyen, T., Nguyen, B. M., & Nguyen, G. (2019, April). Building Resource Auto-scaler with Functional-Link Neural Network and Adaptive Bacterial Foraging Optimization. In International Conference on Theory and Applications of Models of Computation (pp. 501-517). Springer, Cham.
17+
18+
* Nguyen, T., Tran, N., Nguyen, B. M., & Nguyen, G. (2018, November). A Resource Usage Prediction System Using Functional-Link and Genetic Algorithm Neural Network for Multivariate Cloud Metrics. In 2018 IEEE 11th Conference on Service-Oriented Computing and Applications (SOCA) (pp. 49-56). IEEE.
19+
20+
* If you want to know more about code, or want a pdf of both above paper, contact me: [email protected]
2221

2322

2423
## How to read my repository
@@ -28,15 +27,11 @@
2827
* results: forecasting results of all models (3 folders inside)
2928
* final: final forecasting results (runs on server)
3029
* stability: final stability results(runs on server)
31-
4. model: (4 folders)
30+
4. model: (2 folders)
3231
* root: (want to understand the code, read this classes first)
3332
* root_base.py: root for all models (traditional, hybrid and variants...)
34-
* root_algo.py: root for all optimization algorithms
3533
* traditional: root for all traditional models (inherit: root_base)
3634
* hybrid: root for all hybrid models (inherit: root_base)
37-
* optimizer: (this classes inherit: root_algo.py)
38-
* evolutionary: include algorithms related to evolution algorithm such as GA, DE,..
39-
* swarm: include algorithms related to swarm optimization such as PSO, CSO, BFO, ...
4035
* main: (final models)
4136
* this classes will use those optimizer above and those root (traditional, hybrid) above
4237
* the running files (outside with the orginial folder: cro_mlnn_script.py, ...) will call this classes
@@ -78,18 +73,19 @@ For example:
7873
6. ABFO-MLNN => abfo_mlnn_script.py
7974
7. CRO-MLNN => cro_mlnn_script.py
8075
8. OCRO-MLNN => ocro_mlnn_script.py
81-
```
8276
83-
3. In paper/results/final model includes folder's name represent the data such as
84-
```code
85-
cpu: input model would be cpu, output model would be cpu
86-
ram: same as cpu
87-
multi_cpu : input model would be cpu and ram, output model would be cpu
88-
multi_ram : input model would be cpu and ram, output model would be ram
89-
multi : input model would be cpu and ram, output model would be cpu and ram
77+
78+
6. Multi-output meaning?
79+
80+
cpu: input model would be cpu, output model would be cpu
81+
ram: same as cpu
82+
multi_cpu : input model would be cpu and ram, output model would be cpu
83+
multi_ram : input model would be cpu and ram, output model would be ram
84+
multi : input model would be cpu and ram, output model would be cpu and ram
9085
```
9186

92-
4. How to change model's parameters?
87+
### How to change model's parameters?
88+
9389
```code
9490
You can change the model's parameters in file: utils/SettingPaper.py
9591
@@ -100,10 +96,10 @@ For example:
10096
####: MLNN-1HL
10197
mlnn1hl_paras_final = {
10298
"sliding": [2, 5, 10],
103-
"hidden_sizes" : [[5] ],
99+
"hidden_sizes" : [(10, True) ],
104100
"activations": [("elu", "elu")], # 0: elu, 1:relu, 2:tanh, 3:sigmoid
105101
"learning_rate": [0.0001],
106-
"epoch": [5000],
102+
"epoch": [1000],
107103
"batch_size": [128],
108104
"optimizer": ["adam"], # GradientDescentOptimizer, AdamOptimizer, AdagradOptimizer, AdadeltaOptimizer
109105
"loss": ["mse"]
@@ -112,7 +108,7 @@ mlnn1hl_paras_final = {
112108
- If you want to tune the parameters, you can adding more value in each parameters like this:
113109
114110
- sliding: [1, 2, 3, 4] or you want just 1 parameter: [12]
115-
- hidden_sizes: [ [5], [10], [100] ] or [ [14] ]
111+
- hidden_sizes: [ (5, True), (10, True), (1000, True) ] or [ (14, True) ]
116112
- activations: [ ("elu", "relu"), ("elu", "tanh") ] or just: [ ("elu", "elu") ]
117113
- learning_rate: [0.1, 0.01, 0.001] or just: [0.1]
118114
....
@@ -123,12 +119,12 @@ mlnn1hl_paras_final = {
123119
#### : GA-MLNN
124120
ga_mlnn_paras_final = {
125121
"sliding": [2, 5, 10],
126-
"hidden_size" : [5 ],
122+
"hidden_size" : [(10, True) ],
127123
"activations": [(0, 0)], # 0: elu, 1:relu, 2:tanh, 3:sigmoid
128124
"train_valid_rate": [(0.6, 0.4)],
129125
130-
"epoch": [700],
131-
"pop_size": [200], # 100 -> 900
126+
"epoch": [1000],
127+
"pop_size": [100], # 100 -> 900
132128
"pc": [0.95], # 0.85 -> 0.97
133129
"pm": [0.025], # 0.005 -> 0.10
134130
"domain_range": [(-1, 1)] # lower and upper bound
@@ -137,55 +133,50 @@ ga_mlnn_paras_final = {
137133
- Same as traditional models.
138134
```
139135

140-
5. Where is the results folder?
136+
### Where is the results folder?
141137
```code
142-
- Look at the running file, for example: ga_mlnn_script.py
138+
- Look at the running file, for example: ga_elm_script.py
143139
144-
+) For normal runs (Only run 1 time for each model).
140+
+) For 1-time runs (Only run 1 time for each model).
145141
_There are 3 type of results file include: model_name.csv file, model_name.png file and Error-model_name.csv file
146142
_model_name.csv included: y_true and y_predict
147143
_model_name.png is visualized of: y_true and y_predict (test dataset)
148-
_Error-model_name.csv included errors of training dataset after epoch. 1st, 2nd column are: MSE, MAE errors
144+
_Error-model_name.csv included errors of training dataset after epoch. 1st, 2nd column are: MSE errors
149145
150-
=> All 3 type of files above is automatically generated in folder: paper/results/final/...
146+
=> All 3 type of files above is automatically generated in folder which you can set in SettingPaper
151147
152-
+) For stability runs (Run each model 15 times with same parameters).
148+
+) For stability runs (Run each model n-time with same parameters).
153149
Because in this test, we don't need to visualize the y_true and y_predict and also don't need to save y_true and y_predict
154-
So I just save 15 times running in the same csv files in folder: paper/results/stability/...
150+
So I just save n-time running in the same csv files in folder
155151
156152
- Noted:
157153
158-
+ In the training set we can use MSE or MAE error. But for the testing set, we can use so much more error like: R2, MAPE, ...
154+
+ In the training set we use MSE. But for the testing set, we can use so much more error like: R2, MAPE, ...
159155
You can find the function code described it in file:
160156
model/root/root_base.py
161-
+ _save_results__: this is for normal runs
162-
+ _save_results_ntimes_run__: this is for stability runs.
163-
164-
+ You want to change the directory to save results?. Simple.
165-
166-
For example: Look at running file: ga_mlnn_script.py
167-
168-
_Line 14: pathsave = "paper/results/final/" --> This is general path to save file.
169-
But for each dataset like: wc, uk, eu,... I need to save it in different folder right. So now look at
170-
171-
_Line 33: "path_save_result": pathsave + requirement_variables[4].
172-
Here, the requirement_variables[4]: is inside file: utils/SettingPaper.py ("eu/", # path_save_result)
173-
174-
So the final path to save the results for normal runs is: paper/results/final/eu/
157+
+ _save_results__:
175158
```
176159

177-
4. Take a look at project_structure.md file. Describe how the project was built.
178-
160+
* Take a look at project_structure.md file. Describe how the project was built.
179161

180162

181-
## Contact
182-
* If you want to know more about code, or want a pdf of both above paper, contact me: [email protected]
183-
184-
* Take a look at this repos, the simplify code using python (numpy) for all algorithms above. (without neural networks)
185-
186-
* https://github.com/thieunguyen5991/metaheuristics
187163

188-
## License
164+
### Publications
165+
* If you see our work is useful, please cite us as follows:
166+
```code
167+
@article{Nguyen2019,
168+
title={Efficient Time-Series Forecasting Using Neural Network and Opposition-Based Coral Reefs Optimization},
169+
author={Thieu Nguyen and Tu Nguyen and Binh Minh Nguyen and Giang Nguyen},
170+
year={2019},
171+
journal={International Journal of Computational Intelligence Systems},
172+
volume={12},
173+
issue={2},
174+
pages={1144-1161},
175+
issn={1875-6883},
176+
url={https://doi.org/10.2991/ijcis.d.190930.003},
177+
doi={https://doi.org/10.2991/ijcis.d.190930.003}
178+
}
179+
```
189180

190-
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
191-
181+
* Link full PDF:
182+
=> [PDF](https://download.atlantis-press.com/article/125921354.pdf)

0 commit comments

Comments
 (0)