Login using Social Account
     Continue with GoogleLogin using your credentials
Contrary to the previous observation. there is perhaps an interaction between the time of day of working and nonworking days. A day of week effect is not apparent, but we may need to look in more detail. This idea is easy to explore.
Task: Adding the following code creates box plots for peak demand hours of working and nonworking days. Complete the code to box plot the bike counts for isWorking - [0,1] for these hours: [0900, 1800]
Hint
labels = ["Boxplots of bike demand at 0900 \n\n", "Boxplots of bike demand at 1800 \n\n"]
times = [8, 17]
for lab, tms in zip(labels, times):
temp = bikesData[bikesData.hr == tms]
fig = plt.figure(figsize=(8, 6))
fig.clf()
ax = fig.gca()
temp.boxplot(column = ['cntDeTrended'], by = ['isWorking'], ax = ax)
plt.xlabel('')
plt.ylabel('Number of bikes')
plt.title(lab)
plt.show()
Observations: Now we clearly see what we were missing in the initial set plots. There is a difference in demand between working and nonworking days at peak demand hours.
*Action: *
isWorking along with hr feature may be good to train the model.
xformWorkHr which is a derived feature from hr and isWorking can also be used instead of two features.
Taking you to the next exercise in seconds...
Want to create exercises like this yourself? Click here.
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...