Coder Social home page Coder Social logo

interactive-generalized-additive-models's Introduction

Interactive GAM: An interactive and interpretable generalized additive model tool for electric load forecasting

Interactive generalized additive model (GAM) is an interpretable method which can incorporate specific domain knowledge in electric power industry for improved performance. Our method leverages piecewise linear functions and is optimized based on boosting framework. By utilizing the special structure of hinge functions and the boosting framework, our algorithm learns the interactive GAM model efficiently. Our interactive GAM outperforms current state-of-the-art GAMs and demonstrates good generalization ability in the cases of extreme weather events. To help the end users to use the model more easily, a user-friendly web-based tool is developed based on the interactive GAM.

Usage:

Requirements: see the document requirements.txt

Install: (will update later)

How to train a GAM:

Replace the "data.csv" in ./data folder with your data file. The data file requires both features and column to be predicted. In our setting, we require the target column as "load". As a result, please manually rename the label column in your data file as "load". Next switch the interactive page to "sample weight editing page" and press the "Apply" button. Then the interactive GAM model is automatically trained. Once the model is trained, the interface will display the prediction of the model on training data and the "shape function editing page" will be enabled.

How to apply domain knowledge:

1, Change the weight of training samples

Switch the interactive page to "sample weight editing page", and select the area you want to edit. Press "Increasing weight" or "Decreasing weight" button on the right of page. Our tool will record the times you pressed the button and adjust the weight in an exponential way. The sample weights are initialized as $1$. If the "Increasing weight" has been pressed for $K$ times, then the weight of the samples in this area is set to $2^K$. The user can modify the sample weights according to the fitting error, or some reference factor, which can be selected in the "Ref factor" drop-down menu. After editing the weight, you can press "Apply" button, then the model is retrained according to the new sample weights.

page_1

2, Add constraints to the shape functions

Switch the interactive page to the "shape function editing page", and select the area you want to edit. Press "Increase", "Decrese", "Convex" or "Concave" buttons on the right of page to select different constraints. One can select multiple areas and apply different constraints. Once editing is complete, you can press "Apply" button, then the model is update to fitting these constraints meanwhile to increase the fitting error as small as possible. We plot the sample density to help the user to estimate how many samples will be affected due to the constraints applied.

page_2

interactive-generalized-additive-models's People

Contributors

dodoyang0929 avatar sunliangg avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

web-logs2

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.