Coder Social home page Coder Social logo

power-plant-forecast's Introduction

TimesNet for Forecasting Power Plant Output

forecast

This project is an forked and modified version of the state-of-the-art TimesNet model for time series analysis.

It is a temporal 2D-variation modeling approach for general time series analysis:

  • It extends the analysis of temporal variations into the 2D space by transforming the 1D time series into a matrix, which encodes temporal features from multiple perspectives.
  • It uses a pyramid-like architecture, TimesBlock, to hierarchically capture the complex temporal variations.
  • The experiments on a variety of tasks demonstrate that TimesNet outperforms existing methods in terms of accuracy and generalization capability on datasets with diverse scales and complexities.

Original Repository is here

๐Ÿ› ๏ธ Improvements

  • Optimized and simplified the project structure from the original library.
  • Implemented Neptune for experiment tracking.
  • Enhanced dataset and data loader flexibility to handle tasks with time gaps
  • Implemented parallel loading and improved data structures to enhance data processing efficiency.
  • Identified and resolved a minor bug in dataset length calculation, resulting in an increased dataset size.
  • Integrated additional sub-networks to process time and temperature information for prediction (e.i., y_data).
  • Accelerated the training process by utilizing PyTorch built-in automatic mixed precision training and asynchronous GPU data copying when a GPU is available.

๐ŸŒŸ Features

  • Mean Squared Error (MSE) of minute-level prediction <= 0.11 (standardized data)
  • Precise and adjustable minute-level predictions
  • Fast Inference: approximately 5s/32samples (each sample contains 4 power output within 1 hour) on Google Colab CPU

Installation

  1. Install the required dependencies:
    pip install -r requirements.txt
    
  2. (Optional) Config the neptune.yaml file for Neptune.ai tracking:
    project: your_username/your_project_name
    api_token: your_api_token
    

Usage

to view the help message:

python -u run.py --help

to run the model:

python -u run.py --args args

Visit documentation to learn more about the run.py arguments.

Alternatively, check [Data Preprocessing](Tutorials/Data Prepocessing.ipynb), [Train, Test and Predict](Tutorials/Train, Test and Predict.ipynb) and [Visualization](Tutorials/Testing Result Visualization.ipynb) notebooks in the /Tutorials folder for more examples.

Future Improvements

  • Implement transfer learning to enhance inference speed and potentially gain insights into model interpretation.
  • Utilize linear interpolation to augment the number of data samples.
  • Enhance data preprocessing techniques:
    • Apply sliding window for further denoising.
    • Experiment with and potentially combine different data scalers.
  • Incorporate the characteristic of power threshold in the model input, and if possible, use a combination of hinge loss and mean squared error (MSE) as the loss function.

Contact

If you have any questions or suggestions, feel free to describe it in Issues.

Credits

power-plant-forecast's People

Contributors

wuhaixu2016 avatar zdandsomsp avatar htg17 avatar imanmousaei avatar yryoung avatar haniejalili avatar kashif avatar

Watchers

 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.