Solution Notebook - Predicting Bike Rentals - a deeper study

Hey there,

I would like to share my solution of the Predicting Bike Rentals project.

Link to my solution.

Link to the project on DQ.

Additionaly to the basic requirements, I did :

  • a more thorough preliminary analysis
  • removed some anomalies from the data set
  • clustered weather parameters
  • used k-Fold cross validation
  • for linear regression, studied if conversion of datetime parameters to dummy variables would improve the predictions. Yes, it improves the accuracy because there are seasonalities
  • for all regression types, studied the performance of a model that finds a trendline first and then predicts the trend-corrected values. It improves the accuracy significantly, e.g. combination of a linear regression with a simple decision tree has the same error as non-optimized random forest.

Overall, I found that a combination of a linear regression with a random forest gives the best result.

Please note that as I used k-Fold x-validation without randomizing, the errors might be a bit higher than for random split of data set to test and train sets, which was proposed in the guidelines.

4 Likes

hey @lavrentiev.max

this project is advance for me now (I am not yet at this part of the track!), you have some spelling errors, but I just love the plots that you have here. :heart_eyes:

Well now I have another great project added in my bookmarks!

thanks for sharing the project. :slight_smile:

Technically I will bug you on this later!

1 Like

Thanks for the feedback! Indeed, by no means the language there was great - I have just corrected what I could. This just shows what could happen if you are working on a project at night :sweat_smile:

As for the plots - I was bored a bit and wanted to experiment. I tried numerous different visualizations, including 3d plots, but most of them, although good looking, were not adding any value. Even now, the notebook has a couple of figures that are nice to look at, but not really necessary.

3 Likes

The link to the solution notebook changed.
New link

I also attached it to this message so that it stays here if I decide to reshuffle the folders on github once again.
Analysis of bike rentals in Washington DC in 2011-2012.ipynb (3.2 MB)

Click here to view the jupyter notebook file in a new tab

1 Like