Skip to content

Master's Thesis Source Code - Automated Data Analytics for Motifs and Discords Mining

License

Notifications You must be signed in to change notification settings

ukritw/autonialm

Repository files navigation

AutoNIALM

Master's Thesis Source Code - Automated Data Analytics for Motifs and Discords Mining

Getting Started

These instructions will get you a copy of the project up and running on your local machine.

Prerequisites

See requirements.txt for the required Python packages.

Make sure have the HDF5 data of the REDD or UK-DALE dataset into a data directory. For example, data/REDD/redd.h5 or data/UKDALE/ukdale.h5.

Run AutoNIALM via command line

You also can run the code through the command line interface without having to start the Flask server.

You must specify the following arguments:

      --datapath                Data file path
      --train_building          Train building
      --train_start             Train start date (Optional); Default = start datetime of dataset
      --train_end               Train end date
      --val_building            Validation building
      --val_start               Validation start date
      --val_end                 Validation end date  
      --test_building           Test building
      --test_start              Test start date
      --test_end                Test end date (Optional); Default = end datetime of dataset 
      --appliance               Target appliance
      --sampling_rate           Downsampling rate
      --epochs                  Max number of epochs for Neural network approaches
      --patience                Number of iters Neural networks allowed to continue training with increase in val_loss
      --max_evals               Number of max trail to run
      --metrics_to_optimize     Metric to optimize for

Example of execution of the script with the arguments

# change into directory with the cli script
cd bayesian_optimization

# run the script with specified settings
python automl_hyperopt_cli.py --datapath ../data/REDD/redd.h5 --train_building 1 --train_end 2011-05-09 --val_building  1 --val_start 2011-05-10 --val_end  2011-05-17 --test_building 1 --test_start 2011-05-18 --appliance fridge --sampling_rate 120 --epochs 10 --patience 5 --metrics_to_optimize "mean_squared_error" --max_evals 10

Result files

The result will be kept in bayesian_optimization/results/

For each run of the AutoNIALM, the code with output two json files:

  • One for the metadata of the results (trial-metadata-[APPLIANCE]-[DOWNSAMPLING RATE]-[METRIC TO OPTIMIZE].json)
  • Another file containing information on every trial (trial-results-[APPLIANCE]-[DOWNSAMPLING RATE]-[METRIC TO OPTIMIZE].json).

Starting the flask server

Note: Currently running the GUI on flask server doesn't support using validation sets. This will be updated soon.

# make the script executable
chmod +x flask_run.sh

# run the script to start flask server
./flask_run.sh

License

This project is licensed under the Apache License 2.0 - see the LICENSE.md file for details

Acknowledgments

About

Master's Thesis Source Code - Automated Data Analytics for Motifs and Discords Mining

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published