End to End Project - Bikes Assessment - Basic - Train and Analyze the Models - Train DecisionTree Model

I did not understand.

dec_reg = DecisionTreeRegressor(random_state = 42)
dt_mae_scores = cross_val_score(dec_reg, trainingCols, trainingLabels,
scoring= “neg_mean_absolute_error”, cv=10)

dt_mse_scores = np.sqrt(dec_reg, trainingCols, trainingLabels,
scoring=“neg_mean_squared_error”, cv=10)

/usr/local/anaconda/lib/python3.6/site-packages/sklearn/model_selection/_validation.py:536: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details:
ValueError: could not convert string to float: ‘2012-04-06’

FitFailedWarning)
/usr/local/anaconda/lib/python3.6/site-packages/sklearn/model_selection/_validation.py:536: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details:
ValueError: could not convert string to float: ‘2012-05-23’

FitFailedWarning)
/usr/local/anaconda/lib/python3.6/site-packages/sklearn/model_selection/_validation.py:536: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details:
ValueError: could not convert string to float: ‘2012-05-23’

FitFailedWarning)
/usr/local/anaconda/lib/python3.6/site-packages/sklearn/model_selection/_validation.py:536: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details:
ValueError: could not convert string to float: ‘2012-05-23’

FitFailedWarning)
/usr/local/anaconda/lib/python3.6/site-packages/sklearn/model_selection/_validation.py:536: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details:
ValueError: could not convert string to float: ‘2012-05-23’

FitFailedWarning)
/usr/local/anaconda/lib/python3.6/site-packages/sklearn/model_selection/_validation.py:536: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details:
ValueError: could not convert string to float: ‘2012-05-23’

FitFailedWarning)
/usr/local/anaconda/lib/python3.6/site-packages/sklearn/model_selection/_validation.py:536: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details:
ValueError: could not convert string to float: ‘2012-05-23’

FitFailedWarning)
/usr/local/anaconda/lib/python3.6/site-packages/sklearn/model_selection/_validation.py:536: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details:
ValueError: could not convert string to float: ‘2012-05-23’

FitFailedWarning)
/usr/local/anaconda/lib/python3.6/site-packages/sklearn/model_selection/_validation.py:536: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details:
ValueError: could not convert string to float: ‘2012-05-23’

FitFailedWarning)
/usr/local/anaconda/lib/python3.6/site-packages/sklearn/model_selection/_validation.py:536: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details:
ValueError: could not convert string to float: ‘2012-05-23’

FitFailedWarning)

NameError Traceback (most recent call last)
in
2 dt_mae_scores = cross_val_score(dec_reg, trainingCols, trainingLabels,
3 scoring= “neg_mean_absolute_error”, cv=10)
----> 4 display_scores()
5
6 dt_mse_scores = np.sqrt(dec_reg, trainingCols, trainingLabels,

NameError: name ‘display_scores’ is not defined

How can i fix it??

Please reply.

display_scores not defind.

How can i fix it??

Please tell me all the answers of the questions i have asked.

Please reply

Hi, please take a hint or look at the answer if you are stuck. You can go through the steps from the below link which for further debugging steps: