Commit 43738af3 authored by cif2cif's avatar cif2cif
Browse files

Definidas variables en el notebook y reordenado data

parent e78a1da2
......@@ -4,8 +4,14 @@ This is the software of Deep Learning based Attack Detection System for Smart Gr
It is composed of three modules, which should be executed in order:
* `simululator/` - Data generation of the power of residential houses ander attacks
* `data-processing/` - Data preprocessing of the results of the simulator
* `simulator/` - Data generation of the power of residential houses ander attacks
* `data-preprocessing/` - Data preprocessing of the results of the simulator
* `attack-detector/` - deep learning module for detecting attacks
Please, refer to every module for its installation, configuration and execution.
The directory `data` contains the result of the execution of the three modules when the simulation has been set to an `attackPercentageValue` of 0, 10, 20 and 30.
It is organized as follows:
- normal/ (0 attack)
+ demo_0.hdf5 (generated by simulator)
+ house_N.pkl (one file for each house generated by data-preprocessing, with N in 0..37)
......@@ -6317,6 +6317,15 @@
}
],
"metadata": {
"datacleaner": {
"position": {
"top": "50px"
},
"python": {
"varRefreshCmd": "try:\n print(_datacleaner.dataframe_metadata())\nexcept:\n print([])"
},
"window_display": false
},
"kernelspec": {
"display_name": "Python 3",
"language": "python",
......@@ -6332,7 +6341,24 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.4"
"version": "3.7.4"
},
"latex_envs": {
"LaTeX_envs_menu_present": true,
"autocomplete": true,
"bibliofile": "biblio.bib",
"cite_by": "apalike",
"current_citInitial": 1,
"eqLabelWithNumbers": true,
"eqNumInitial": 1,
"hotkeys": {
"equation": "Ctrl-E",
"itemize": "Ctrl-I"
},
"labels_anchors": false,
"latex_user_defs": false,
"report_style_numbering": false,
"user_envs_cfg": false
}
},
"nbformat": 4,
......
## DATA PROCESSING MODULE
This directory contains the code for processing the data generated by the simulator and feeding the machine learning algorithm.
## DATA PREPROCESSING MODULE
This directory contains the code for preprocessing the data generated by the simulator and feeding the machine learning algorithm.
## Configuration
You should set the following variables in the notebook:
# File generated by the simulator
* INPUT_HDF5_FILE - Path to the file generated by the simulator.
* OUTPUT_PKL_PATH = '../data/anomaly_10/labels_df/' - Path to the folder where the pkl files are generated
## Description
n order to detect attacks, the power consumption values of the houses are analyzed. For that reason, first, the needed DataFrames to feed the neural network (autoencoder) have to be created.
In order to detect attacks, the power consumption values of the houses are analyzed. For that reason, first, the needed DataFrames to feed the neural network (autoencoder) have to be created.
For this purpose, the notebook dataframe_creation is used. This notebook generates .pkl files that contain the DataFrames with the necessary data. In addition, these DataFrames contain the following features:
......@@ -31,3 +40,5 @@ Then execute the dataframe using jupyter
$ jupyter notebook
Once the DataFrames are created, they are used to feed the autoencoder.
The output of the module is a pkl file per house in the OUTPUT_PKL_PATH. These files feed the machine learning system.
This diff is collapsed.
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment