Client-Side Intelligence Using Regression Coefficients on Azure
Let's build an interactive web application to understand bike rental demand using regression coefficients on Microsoft Azure.
- PDF / 2,309,495 Bytes
- 53 Pages / 504 x 720 pts Page_size
- 77 Downloads / 162 Views
Client-Side Intelligence Using Regression Coefficients on Azure Let’s build an interactive web application to understand bike rental demand using regression coefficients on Microsoft Azure. For our first project, we’re going to model the Bike Sharing Dataset from the Capital Bikeshare System using regression modeling and learn how variables such as temperature, wind, and time affect bicycle rentals in the mid-Atlantic region of the United States (Figure 2-1).
© Manuel Amunategui, Mehdi Roopaei 2018 M. Amunategui and M. Roopaei, Monetizing Machine Learning, https://doi.org/10.1007/978-1-4842-3873-8_2
39
Chapter 2
Client-Side Intelligence Using Regression Coefficients on Azure
Figure 2-1. Our final web application for this chapter The data is graciously made available through the UCI Machine Learning Repository of the University of California, Irvine (https://archive.ics.uci.edu/ml/datasets/ bike+sharing+dataset).
Note Download the files for Chapter 2 by going to www.apress. com/9781484238721 and clicking the source code button. Open Jupyter notebook “chapter2.ipynb” to follow along with this chapter’s content. 40
Chapter 2
Client-Side Intelligence Using Regression Coefficients on Azure
nderstanding Bike Rental Demand with Regression U Coefficients We’re going to build a simple and visually intuitive way of interacting with different environmental factors and see how they affect bike rentals. This is a great way for users to confirm their intuitive assumptions of what would make people want to bicycle vs. not, and in some cases, surprise them too (like seeing more riders in the winter than in the summer—but I’ll let you discover that on your own). The “brain” behind this web application is a linear regression model. It has the ability of finding linear relationships between an outcome variable and historical data. We are going to leverage this skill by having it learn bike rental demand over time and under different environmental factors, and see if it can help us predict future demand. Whenever you extend a Python model to the Wweb, it is critical to iron out all issues and bugs locally before adding the extra layers necessary to build it into a web application. Get all the easy issues resolved before moving anything to the cloud! Following this piece of advice will save you from many headaches.
Exploring the Bike Sharing Dataset Bike sharing is very popular albeit still new and experimental. Using a mobile phone, a rider can sign up online, download a phone application, locate bicycles, and rent one. This model creates an entire ecosystem where nobody needs to talk or meet in person to start enjoying this service. According to Hadi Fanaee-T of the Laboratory of Artificial Intelligence and Decision Support (from the liner notes on the UCI Machine Learning Repository’s Dataset Information):
Opposed to other transport services such as bus or subway, the duration of travel, departure and arrival position is explicitly recorded in these systems. This feature turns [a] bike sharing system into a virtual
Data Loading...