GitHunt
EL

elisim/piven

Official implementation of the paper "PIVEN: A Deep Neural Network for Prediction Intervals with Specific Value Prediction" by Eli Simhayev, Gilad Katz and Lior Rokach.

PIVEN: A Deep Neural Network for Prediction Intervals with Specific Value Prediction

The official implementation of the paper "PIVEN: A Deep Neural Network for Prediction Intervals with Specific Value Prediction"
by Eli Simhayev, Gilad Katz and Lior Rokach.

Update 21.6.22

Our paper has been accepted to Knowledge Based Systems ๐Ÿ™‚

https://doi.org/10.1016/j.knosys.2022.108685

ย 
The PIVEN schematic architecture

TL;DR

A neural network with a PIVEN output layer returns a point prediction as well as a lower and upper prediction interval (PI) for each target in a regression problem. The image below shows how the lower and upper PI change as we keep training the model:

We thank Jasper Ginn (@JasperHG90) from GoDataDriven (godatadriven/piven) for the image ๐Ÿ™‚

Quickstart in Google Colab

A simple fast colab demo using Keras is included in PIVEN_Demo.ipynb.

Contents

โ”œโ”€โ”€ age
โ”‚ย ย  โ”œโ”€โ”€ Bone age ground truth.xlsx --- RSNA Bong Age Ground-Truth
โ”‚ย ย  โ”œโ”€โ”€ get_age_data.sh --- Download dataset from kaggle
โ”‚ย ย  โ”œโ”€โ”€ main.py --- Run bone age experiment
โ”œโ”€โ”€ imdb
โ”‚ย ย  โ”œโ”€โ”€ densenet.py
โ”‚ย ย  โ”œโ”€โ”€ generators.py
โ”‚ย ย  โ”œโ”€โ”€ get_imdb_data.sh --- Download dataset
โ”‚ย ย  โ”œโ”€โ”€ imdb_create_db.py --- Run after downloading the dataset
โ”‚ย ย  โ”œโ”€โ”€ main.py --- Run imdb age estimation experiment
โ”‚ย ย  โ”œโ”€โ”€ model.py
โ”‚ย ย  โ”œโ”€โ”€ subpixel.py
โ”‚ย ย  โ”œโ”€โ”€ tensorflow_backend.py
โ”‚ย ย  โ”œโ”€โ”€ train_callbacks.py
โ”‚ย ย  โ””โ”€โ”€ utils.py
โ””โ”€โ”€ uci
    โ”œโ”€โ”€ code
    โ”‚ย ย  โ”œโ”€โ”€ DataGen.py
    โ”‚ย ย  โ”œโ”€โ”€ DeepNetPI.py
    โ”‚ย   โ”œโ”€โ”€ alpha_experiment.py --- Run alpha experiment on UCI 
    โ”‚ย ย  โ”œโ”€โ”€ main.py --- Run UCI experiments
    โ”‚ย ย  โ”œโ”€โ”€ params_deep_ens.json --- deep ensembles hyperparameters
    โ”‚ย ย  โ”œโ”€โ”€ params.json --- piven and qd hyperparameters
    โ”‚ย ย  โ””โ”€โ”€ utils.py
    โ”œโ”€โ”€ get_song_dataset.sh --- Download Year Prediction MSD dataset
    โ””โ”€โ”€ UCI_Datasets

Requirements

  • pandas==0.25.2
  • numpy==1.18.1
  • matplotlib==3.0.3
  • tensorflow==1.15.0
  • keras==2.3.1
  • xlrd==1.2.0
  • scikit-learn==0.22
  • tqdm==4.45.0
  • opencv-python==4.2.0.34

To install requirements:

pip install -r requirements.txt

All experiments tested on Ubuntu 18.04 with Python 3.6.

Acknowledgements

Our UCI experiments were inspired by Tim Pearce's implementation of High-Quality Prediction Intervals for Deep Learning:
A Distribution-Free, Ensembled Approach
. Moreover, in
IMDB age estimation experiment we used the preprocessing implemented in
SSR-Net: A Compact Soft Stagewise Regression Network for Age Estimation.

Citing PIVEN

If you use PIVEN in your research please use the following BibTeX entry:

@article{simhayev2022integrated,
  title={Integrated prediction intervals and specific value predictions for regression problems using neural networks},
  author={Simhayev, Eli and Katz, Gilad and Rokach, Lior},
  journal={Knowledge-Based Systems},
  volume={247},
  pages={108685},
  year={2022},
  publisher={Elsevier}
}

Languages

Jupyter Notebook73.6%Python26.3%Shell0.1%

Contributors

MIT License
Created October 8, 2020
Updated October 29, 2025