{"id":18564597,"url":"https://github.com/avinash793/adversarial-attacks-on-load-forecasting-model","last_synced_at":"2026-04-19T14:31:25.401Z","repository":{"id":217172327,"uuid":"743232592","full_name":"Avinash793/adversarial-attacks-on-load-forecasting-model","owner":"Avinash793","description":"Studied the impact of adversarial attacks on RNN Based load forecasting model.","archived":false,"fork":false,"pushed_at":"2024-01-15T20:49:13.000Z","size":2885,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-26T12:09:13.210Z","etag":null,"topics":["adversarial-attacks","adversarial-examples","adversarial-learning","adversarial-machine-learning","deep-learning","forecasting","forecasting-models","keras","load-forecasting","python3","rnn","rnn-lstm","security"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Avinash793.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2024-01-14T18:13:58.000Z","updated_at":"2024-12-21T03:00:12.000Z","dependencies_parsed_at":"2024-01-14T23:06:23.858Z","dependency_job_id":"b5901eb0-bb70-490e-ab26-0b8cb0c65bdd","html_url":"https://github.com/Avinash793/adversarial-attacks-on-load-forecasting-model","commit_stats":null,"previous_names":["avinash793/adversarial-attacks-on-load-forecasting-model"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avinash793%2Fadversarial-attacks-on-load-forecasting-model","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avinash793%2Fadversarial-attacks-on-load-forecasting-model/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avinash793%2Fadversarial-attacks-on-load-forecasting-model/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avinash793%2Fadversarial-attacks-on-load-forecasting-model/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Avinash793","download_url":"https://codeload.github.com/Avinash793/adversarial-attacks-on-load-forecasting-model/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239293948,"owners_count":19615043,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adversarial-attacks","adversarial-examples","adversarial-learning","adversarial-machine-learning","deep-learning","forecasting","forecasting-models","keras","load-forecasting","python3","rnn","rnn-lstm","security"],"created_at":"2024-11-06T22:15:48.317Z","updated_at":"2026-04-19T14:31:20.379Z","avatar_url":"https://github.com/Avinash793.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Adversarial Attacks on Load Forecasting Model\n\n## Dataset Information\n### Dataset Used\n1. ENTSO-E Dataset (European Network of Transmission System Operators for Electricity) for hourly load data in Switzerland.\n2. DarkSky Dataset for hourly temperature and weather Icon information of 8 major cities in Switzerland.\n\n### Dataset Raw Features\nThere are 21 raw features at each timestamp:\n1. **Load**\n2. **8 Cities temperature**\n3. **8 Cities weather Icon Information** - categorical feature tells which weather icon [categories: icon1, icon2, icon3]\n4. **Holiday** - boolean feature tells weather holiday in switzerland on that date\n5. **Month** - categorical feature tells data of which month  [categories: Jan, Feb, ... , Dec]\n6. **Day** - categorical feature tells data of which day [categories: Mon, Tues, Wed, Thrus, Fri, Sat, Sun]\n7. **Hour** - categorical feature tells data of which hour  [categories: 0, 1, 2, ... , 23]\n\n### Dataset Source\nYou can use already preprocessed data present in `data` folder with name `actual_dataset.csv` .\n\n**Feature Vector 77 dimensional at each timestamp:** \\\nactual_load - 1 feature \\\n8 cities temperature - 8 features \\\n8 cities weather icon one hot encoding - (8 cities x 3 categories of icon) = 24 features \\\nholiday - 1 feature \\\nweekday one hot encoding  - 7 features \\\nhour one hot encoding  - 24 features \\\nmonth one hot encoding  - 12 features \n\n**NOTE:** Please ignore `entsoe` feature column in `actual_dataset.csv`. \n\n\n## Train Load Forecasting Model\n1. change `DATASET_SPLIT_DATE` in `constants.py` according to how you want to split train and test dataset.\n2. Simply Run\n    ```shell\n    python forecasting.py\n    ```\n3. It will save trained model weights in `output/load_forecasting_model_weights.h5`. save `output/loss_epoch_curve.png` and `output/actual_predicted_load.png` images.\n\n\n## Generate Adversarial Datasets\n1. Simply Run:\n    ```shell\n    python adversarial.py\n    ```\n2. It will generate adversarial datasets for various temperature variation in `data` folder. For Ex: `adversarial_dataset_temp_1.csv` means generate adversarial temperature dataset with 1 Fahrenheit change in temperature.\n\n\n## Results\nCheck `results.ipynb` file to see various plots like:\n1. Temperature Profile\n2. Load Forecasting Profile\n3. Forecasting MAPE with Temperature Variation","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favinash793%2Fadversarial-attacks-on-load-forecasting-model","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favinash793%2Fadversarial-attacks-on-load-forecasting-model","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favinash793%2Fadversarial-attacks-on-load-forecasting-model/lists"}