Machine Learning Practice: Predicting the Number of Rental Bike

Machine learning using R

Course Project / Individual Project

Research Question

Bike sharing is becoming popular as it offers an automatic system to rent, use and return bikes at a relatively low cost. This large amount of data being generated can serve as a research base to assist in predicting the number of rental sharing bikes rented each day.


Dataset was attained from UCI Machine Learning Repository. “This dataset contains the hourly and daily count of rental bikes between years 2011 and 2012 in Capital bikeshare system with the corresponding weather and seasonal information.”


A linear regression algorithm was adopted for the machine learning practice. The code was modified based on the Machine Learning course material on Coursera. 

I made a video explaining the details (in Chinese).


The best lambda is 6. When lambda increases from 1 to 6, the validation cost decreases, when lambda increases from 6 to 20, the validation cost increases. On the other hand, the training cost increases all along when lambda is increased from 1 to 20.

©2018 by Yu Zhao.