# Demand Forecast of Time Series Data

February 24, 2020
Algorithms

Report Abuse
Demand forecast is a common function performed by sales organizations. This experiment shows how a machine learning model can be used to forecast demand for a bike rental company.
# Scenario The company in this experiment rents bicycles to consumers. We are given historical data that shows how many bikes were rented out for each hour of every day for a duration of two years as well as some related information such as weather conditions. <br> The task is to build a machine learning model that will learn from the given historical data and be able to predict demand for the next hour when given the information about the current hour. <br><br> # Data Set ![enter image description here][1] <br><br> The data set given is quite straight forward. Each row represents one hour and in each row we can see how many bikes were rented for that hour. The column Q in the above diagram shows the count or the number of bikes rented for that hour, and the count is further broken into "casual" and "registered" users.<br> The columns such as season, yr, mnth and hr are quite self explanatory. Weekday represents the day of the week. Workingday is a boolean value of whether it's a working day. <br> temp, atemp, hum and windspeed capture the weather conditions of a particular hour. These are numeric values that have been normalized. <br><br> # Content This demo shows how to 1. Build a regression model to do demand forecast <br> 2. Improve performance by changing the ML model <br> 3. Write python scripts to create new features <br> 4. Deploy model to Excel <br> # Tutorial Step by step video tutorial is available from this [youtube playlist][2] Part 1 - [How to Build a Simple Model using Azure ML][3] <br> Part 2 - [How to Change a Model in Azure ML][4] <br> Part 3 - [How to Create New Features using Azure ML][5] <br> Part 4 - [How do Deploy a Machine Learning Model to Excel with Azure ML][6] <br> # Outcome Two regression models were used in this experiment - Linear Regression and Boosted Decision Tree Regression. We started with a RMSE of 192 using linear regression as a baseline model. After changing to the boosted decision tree model as well as some feature engineering, we were able to reduce the RMSE to 89, a reduction of about 64%.<br> [1]: https://user-images.githubusercontent.com/7254404/77515498-94086180-6eb3-11ea-8ea4-9d92f5ab3991.png [2]: https://www.youtube.com/playlist?list=PL_hc21tLhYNhCPablkp0sHzwC4P9FH6YQ [3]: https://www.youtube.com/watch?v=jWpa9sqmpT0&list=PL_hc21tLhYNhCPablkp0sHzwC4P9FH6YQ&index=2&t=8s [4]: https://www.youtube.com/watch?v=Cf59qRoNOl8&list=PL_hc21tLhYNhCPablkp0sHzwC4P9FH6YQ&index=3&t=6s [5]: https://www.youtube.com/watch?v=5NO2ybCrees&list=PL_hc21tLhYNhCPablkp0sHzwC4P9FH6YQ&index=4&t=2s [6]: https://www.youtube.com/watch?v=gA_N_gWnNso&list=PL_hc21tLhYNhCPablkp0sHzwC4P9FH6YQ&index=5&t=0s