3rd Floor, 86-90 Paul Street, London EC2A 4NE
0330 001 0803
Bike rental predictions is a project demo we have undertaken to trial implementing a machine learning model to make predictions on the number of bike rentals on a certain date based on past results.
To give further insight, the model would retrieve a collection of inputted data including date, whether it is holiday, windspeed and some other factors, most importantly number of bike rentals. With this given data, the model would learn patterns and connection between features using the user chosen algorithm, whether it be XGBoost or LightGBM.
Upon completion, the user will then be able to give new data, including all the same parameters without the number of bike rentals. The model will then predict the number of bike rentals and return the associated number of bike rentals predicted for each date the user inputted.
Dataset credits: Fanaee-T, H.,
& Gama, J. Event labeling combining ensemble detectors and background knowledge.
Progress in Artificial Intelligence,
1–15. doi:10.1007/s13748-013-0040-3
This preview will show you how to train a model and use it to make predictions via the command line. In this example, we'll use a pre-existing dataset to train a model using XGBoost and LightGBM. Once the model is trained, we'll use it to make predictions on a dataset where the number of rentals are not given. The command line has been altered to possess the ability to use files from Azure Storage and to store results back there too.
Here is a preview of training a model via an API. For this specific example, we use a pre-existing dataset to train a model via XGBoost. The results covering the model's training performance can either be saved locally or in Azure (at user's request). The results of the testing data used to test the model can also be saved into a SQL database (at user's request). Power BI, with the help of Python scripting, is then used to generate graphs from the table in a SQL database. These graphs can be used for further analysis of the results.
Here is a preview of doing predictions via the API. For this specific example, we use a pre-existing dataset and a trained model (XGBoost in this case) to make predictions. The results (date and predicted bike rentals for this date) can either be saved locally or in Azure (at user's request). The resulting predictions can also be saved into a SQL database (at user's request).
This preview will show you how to train a model and use it to make predictions via forms. In this example, we'll use a pre-existing dataset to train a model using XGBoost and LightGBM. Once the model is trained, we'll use it to make predictions on a dataset where the number of rentals are not given.
Power BI provides the opportunity to gain a deeper understanding of the results through the generation of graphs.
An example to highlight this, relevant to the bike rentals demonstration, is the accuracy of the model - upon making predictions of how many bike rentals will occur on a certain day, errors are bound to occur as predicting the future to the finest degree is trivially impossible.
The graph on the left manifests that on this set run, there were clear anomalies in the model's performance, namely in months: March, April and November.
However, on this same run, the model proved to automate reliable predictions in months such as December (where the white circle represents the mean of the errors for that month).
The takeaway is that without such tools like Power BI, it would be harder to formulate a complete summary of the model's performance, which is the key motivation for why we use such a tool.
This diagram shows a typical process of how a such a project can be conducted.
© 2023 Oscore loves ML