Coder Social home page Coder Social logo

kamran0153 / food-pantry-household-visit-forecasting Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 196 KB

The goal of the project is to forecast the number of clients in a food pantry several weeks ahead.

License: MIT License

Jupyter Notebook 100.00%
forecasting machine-learning-algorithms variational-autoencoder

food-pantry-household-visit-forecasting's Introduction

Food Pantry Household Visit Forecasting

Our dataset contains 336 samples which contains number of client visits in Baptist Food Pantry, the number of COVID affected in Lee county, CPI, unemployment rate, average personal income, the number of school open days and the date of the client visit in every week.

Based on the observation of 4 most recent weeks of the data, our goal is to predict the number of client visits next week. In this prediction problem, the dataset is split into 80% of the training data and 20% of the inference data.

Procedure 1

The client visit forecasting algorithms used in this experiment are listed as follows, which include 7 machine learning algorithms and two baseline algorithms:

  1. Linear Regression
  2. LASSO (Regularization Parameter = 0.01)
  3. Neural Network Based Regression (One Hidden Layer with 100 ReLU nodes)
  4. Gradient Boosting (Max Depth 11)
  5. Decision Tree Regression (Max Depth 19)
  6. Bayesian Ridge Regression
  7. Ridge Regression (Regularization Parameter 0.5)
  8. Baseline Algorithm 1: The number of visits 2 months ago
  9. Baseline Algorithm 2: The average number of visits during the last two months

Procedure 2

Data Generation Using Variational Auto Encoder (VAE):

By using 336 samples and a variational auto encoder, we have generated 835 more data samples. The total dataset is split into 80% for training and 20% for inference. The encoder network has one intermediate layer with 10 ReLU nodes and 2 output nodes. The output of the encoder is the input of the decoder. The decoder has one intermediate layer with 10 linear nodes. The loss function is the addition of reconstruction loss which is the cross-entropy loss and KL divergence loss. After that, we have used above-mentioned 9 client visit forecasting.

Performance

The client visit forecasting performance for the Lakeview Baptist Food Pantry is shown in the following table, where the forecasting accuracy is measured by using Mean Absolution Percentage Error (MAPE).

Algorithm Training Error Inference Error Training Error with VAE Inference Error with VAE
Linear Regression 38.06 % 45.08 % 25.45 % 26.4 %
LASSO 40.16% 43.35% 24.7% 26.6%
Neural Network Based Regression 33.91% 44.13% 24.5% 25.67%
Gradient Boosting 0% 38.44% 19.11% 26.6 %
Decision Tree Regression 0% 41.98 % 25.42% 26.51%
Bayesian Ridge 43.07% 42.36% 25.43% 26.4%
Ridge Regression 41.8% 41.6% 25.4% 26.62%
Baseline Algorithm 1 71.4%
Baseline Algorithm 2 57%

food-pantry-household-visit-forecasting's People

Contributors

kamran0153 avatar yinsun2002 avatar

Watchers

 avatar

Forkers

yinsun2002

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.