Project - Bike Rental Forecasting

30 / 49

End to End Project - Bikes Assessment - Analyzing dataset - Line Plots

Line Plots

Task 1: Complete the code to plot cntDeTrended versus dayCount for these hours: [7, 9, 12, 15, 18, 20, 22]

Hint

        times = [7, 9, 12, 15, 18, 20, 22]
        for time in times:
            fig = plt.figure(figsize=(4,4))
            tsToPlot = bikesData[bikesData.hr==time]
            fig.clf()
            ax = fig.gca()
            tsToPlot.plot(kind='line', x='dayCount', y='cntDeTrended', ax =ax)
            plt.xlabel("Days from start of plot")
            plt.ylabel("Count of bikes rented")
            plt.title("Bikes rented at hour " + str(time))
            plt.show()

Observation:

  • Significant differences in the shape of these curves at the two different hours.

  • Some of the outliers can be a source of bias when training machine learning models.

Action:

  • We will keep these outlier observation in mind when we need to fine-tune the model.

  • Hours can be a good datetime feature to train the model on. We need to explore the impact of other datetime features like month and year.


No hints are availble for this assesment

Answer is not availble for this assesment


Note - Having trouble with the assessment engine? Follow the steps listed here

Loading comments...