Hi,

Am not sure if anyone has this error but am unable to use the scoring param = ‘mean_squared_error’ in the linear regression model code as it is giving this error.

scoring= cv_score = cross_val_score(alg1, traindf[predictors], traindf[target], cv=20, scoring=‘mean_squared_error’) #, scoring=‘mean_squared_error’

Traceback (most recent call last):

File “”, line 1, in

scoring= cv_score = cross_val_score(alg1, traindf[predictors], traindf[target], cv=20, scoring=‘mean_squared_error’) #, scoring=‘mean_squared_error’

File “C:\Users\85033964\AppData\Local\Continuum\anaconda3\lib\site-packages\sklearn\model_selection_validation.py”, line 394, in cross_val_score

scorer = check_scoring(estimator, scoring=scoring)

File “C:\Users\85033964\AppData\Local\Continuum\anaconda3\lib\site-packages\sklearn\metrics\scorer.py”, line 273, in check_scoring

return get_scorer(scoring)

File “C:\Users\85033964\AppData\Local\Continuum\anaconda3\lib\site-packages\sklearn\metrics\scorer.py”, line 233, in get_scorer

‘to get valid options.’ % (scoring))

*ValueError: ‘mean_squared_error’ is not a valid scoring value. Use sorted(sklearn.metrics.SCORERS.keys()) to get valid options.*

Tried to find the scoring param correct value but as per the documentation it is valid but still it is giving this error.

Also my Mean, std, etc values are all in decimals instead of whole numbers like given in the article. I guess it is due to the above scoring param. The code works fine without scoring param but gives only decimals.

Can anyone help here on how to use the scoring param.