Giter VIP home page Giter VIP logo

e2e-model-learning's Introduction

Task-based End-to-end Model Learning

This repository is by Priya L. Donti, Brandon Amos, and J. Zico Kolter and contains the PyTorch source code to reproduce the experiments in our paper Task-based End-to-end Model Learning.

If you find this repository helpful in your publications, please consider citing our paper.

@article{donti2017task,
  title={Task-based End-to-end Model Learning},
  author={Priya L. Donti and Brandon Amos and J. Zico Kolter},
  journal={arXiv preprint arXiv:1703.04529},
  year={2017}
}

Introduction

As machine learning techniques have become more ubiquitous, it has become common to see machine learning prediction algorithms operating within some larger process. However, the criteria by which we train machine learning algorithms often differ from the ultimate criteria on which we evaluate them.

This repository demonstrates an end-to-end approach for learning probabilistic machine learning models within the context of stochastic programming, in a manner that directly captures the ultimate task-based objective for which they will be used. Specifically, we evaluate our approach in the context of (a) a generic inventory stock problem and (b) an electrical grid scheduling task based on over eight years of data from PJM.

Please see our paper Task-based End-to-end Model Learning and the code in this repository (locuslab/e2e-model-learning) for more details about the general approach proposed and our initial experimental implementations.

Setup and Dependencies

  • Python 3.x/numpy/scipy/cvxpy
  • PyTorch
    • The code currently requires a source install from the master branch from our fork for new batch triangular factorization functions we have added. We are currently working with the PyTorch team to get these new features merged into Torch proper.
  • qpth: A fast QP solver for PyTorch released in conjunction with the paper OptNet: Differentiable Optimization as a Layer in Neural Networks.
  • bamos/block: An intelligent block matrix library for numpy, PyTorch, and beyond.
  • Optional: bamos/setGPU: A small library to set CUDA_VISIBLE_DEVICES on multi-GPU systems.

Note: Experiments are currently not working after some library updates. We'll address this ASAP.

Inventory Stock Problem (Newsvendor) Experiments

  • Experiments considering a "conditional" variation of the inventory stock problem. Problem instances are generated via random sampling.
newsvendor
├── main.py - Run inventory stock problem experiments. (See arguments.)
├── task_net.py - Functions for our task-based end-to-end model learning approach.
├── mle.py - Functions for linear maximum likelihood estimation approach.
├── mle_net.py - Functions for nonlinear maximum likelihood estimation approach.
├── policy_net.py - Functions for end-to-end neural network policy model.
├── batch.py - Helper functions for minibatched evaluation.
└── plot.py - Plot experimental results.

Load Forecasting and Generator Scheduling Experiments

  • Experiments considering a realistic grid-scheduling task, in which electricity generation is scheduled based on some (unknown) distribution over electricity demand. Historical load data for these experiments were obtained from PJM.
power_sched
├── main.py - Run load forecasting problem experiments. (See arguments.)
├── model_classes.py - Models used for experiments.
├── nets.py - Functions for RMSE, cost-weighted RMSE, and task nets.
├── plot.py - Plot experimental results.
└── pjm_load_data_*.txt - Historical load data from PJM.

Price Forecasting and Battery Storage Experiments

  • Experiments considering a realistic battery arbitrage task, in which a power grid-connected battery generates a charge/discharge schedule based on some (unknown) distribution over energy prices. Historical energy price data for these experiments were obtained from PJM.
battery_storage
├── main.py - Run battery storage problem experiments. (See arguments.)
├── model_classes.py - Models used for experiments.
├── nets.py - Functions for RMSE and task nets.
├── calc_stats.py - Calculate experimental result stats.
└── storage_data.csv - Historical energy price data from PJM.

Acknowledgments

This material is based upon work supported by the National Science Foundation Graduate Research Fellowship Program under Grant No. DGE1252522.

Licensing

Unless otherwise stated, the source code is copyright Carnegie Mellon University and licensed under the Apache 2.0 License.

e2e-model-learning's People

Contributors

priyald17 avatar

Watchers

 avatar  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.