Chapter 18 : End to End Project - Bikes Assessment - Basic - Train and Analyze the Models - Preparing to Train the Models

from sklearn.model_selection import cross_validate,cross_val_predict
from sklearn import linear_model
from sklearn.tree import DecisionTreeRegressor
from sklearn.ensemble import RandomForestRegressor
from xgboost import XGBRegressor

trainingCols=train_set.drop(columns=‘cnt’,axis=1)
trainingLabels=train_set[‘cnt’]

Error “cross_val_score not imported”

I think you need to import cross_val_score from sklearn.model_selection

I have already imported both the functions together in below line
“from sklearn.model_selection import cross_validate,cross_val_predict”

Please note the code is executing correctly.

It is checking for a function cross_val_score.

Got it working.

Thanks