Enrollments closing soon for Post Graduate Certificate Program in Applied Data Science & AI By IIT Roorkee | 3 Seats Left
Apply NowLogin using Social Account
     Continue with GoogleLogin using your credentials
In the previous step, we split the bikesData
into Training data set (train_set) and Test data set (test_set), but can we use this 'Training' data set as it is, or, we need to do some more refinement before we can use it to generate ML models?
Yes, you got it right, we need to create target
data set, and also, we need to create a final 'Training' data set by dropping the target
label from the existing 'Training' data set (train_set).
Import following from scikit-learn:
cross_val_score
cross_val_predict
DecisionTreeRegressor
LinearRegression
RandomForestRegressor
Import XGBRegressor from xgboost
Create a dataframe called trainingCols
by dropping cnt
column data from train_set
data frame.
Extract cnt
column data from train_set
dataframe and store it in trainingLabels
variable.
Taking you to the next exercise in seconds...
Want to create exercises like this yourself? Click here.
Answer is not availble for this assesment
Note - Having trouble with the assessment engine? Follow the steps listed here
Loading comments...