daysas our training setand the remaining data pointscorresponding to the remaining daysas our test set the only feature that we are using in our prediction task is the date and time when particular number of rentals occurred sothe input feature is the date and time--say : : --and the output is the number of rentals in the following three hours (three in this caseaccording to our dataframea (surprisinglycommon way that dates are stored on computers is using posix timewhich is the number of seconds since january : : (aka the beginning of unix timeas first trywe can use this single integer feature as our data representationin[ ]extract the target values (number of rentalsy citibike values convert the time to posix time using "%sx citibike index strftime("% "astype("int"reshape(- we first define function to split the data into training and test setsbuild the modeland visualize the resultin[ ]use the first data points for trainingand the rest for testing n_train function to evaluate and plot regressor on given feature set def eval_on_features(featurestargetregressor)split the given features into training and test set x_trainx_test features[:n_train]features[n_train:also split the target array y_trainy_test target[:n_train]target[n_train:regressor fit(x_trainy_trainprint("test-set ^ { }format(regressor score(x_testy_test))y_pred regressor predict(x_testy_pred_train regressor predict(x_trainplt figure(figsize=( )plt xticks(range( len( ) )xticks strftime("% % -% ")rotation= ha="left"plt plot(range(n_train)y_trainlabel="train"plt plot(range(n_trainlen(y_testn_train)y_test'-'label="test"plt plot(range(n_train)y_pred_train'--'label="prediction train"plt plot(range(n_trainlen(y_testn_train)y_pred'--'label="prediction test"plt legend(loc=( )plt xlabel("date"plt ylabel("rentals" representing data and engineering features