Coder Social home page Coder Social logo

clown1206 / lstm-load-forecasting Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ki-ljl/lstm-load-forecasting

0.0 0.0 0.0 6.22 MB

Implementation of Electric Load Forecasting Based on LSTM(BiLSTM). Including Univariate-SingleStep forecasting, Multivariate-SingleStep forecasting and Multivariate-MultiStep forecasting.

License: MIT License

Python 100.00%

lstm-load-forecasting's Introduction

LSTM-Load-Forecasting

Implementation of Electric Load Forecasting Based on LSTM(BiLSTM). Including Univariate-SingleStep forecasting, Multivariate-SingleStep forecasting and Multivariate-MultiStep forecasting.

Environment

pytorch==1.10.1+cu111

numpy==1.18.5

pandas==1.2.3

Tree

.
│  args.py
│  data_process.py
│  LICENSE
│  models.py
│  README.md
│  tree.txt
│  util.py
│          
├─data
│      data.csv
│      
├─LSTMs
│      multivariate_multi_step.py
│      multivariate_single_step.py
│      univariate_single_step.py
│      
└─models
        multivariate_multi_step.pkl
        multivariate_single_step.pkl
        univariate_single_step.pkl
  1. args.py is a parameter configuration file, where you can set model parameters and training parameters.
  2. data_process.py is the data processing file. If you need to use your own data, then you can modify the load_data function in data_process.py.
  3. Two models are defined in models.py, including LSTM and bidirectional LSTM.
  4. util.py defines the training and testing functions of the models in the three prediction methods.
  5. The trained model is saved in the models folder, which can be used directly for testing.
  6. Data files in csv format are saved under the data file.

Usage

First switch the working path:

cd LSTMs/

Then, execute in sequence:

python multivariate_multi_step.py --epochs 50 --batch_size 30
python multivariate_single_step.py --epochs 30 --batch_size 30
python univariate_single_step.py --epochs 30 --batch_size 30

If you need to change the parameters, please modify them manually in args.py.

Result

在这里插入图片描述

lstm-load-forecasting's People

Contributors

ki-ljl avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.