-2

I am new to machine learning. I am trying to learn feature selection from this link. Here they have a line of code which is given below

search = GridSearchCV(pipeline, grid, scoring='neg_mean_squared_error', n_jobs=-1, cv=cv)

But whenever I try to run this code I get the error

enter image description here

I cannot find where to import neg_mean_squared_error from. I am not sure where I should write the function myself or not. The tutorial isn't clear on this issue.

halfer
  • 19,824
  • 17
  • 99
  • 186
odbhut.shei.chhele
  • 5,834
  • 16
  • 69
  • 109
  • 1
    Please don't post code as images. – retnikt Jun 09 '20 at 09:14
  • Did you read the error message? Try printing `sorted(sklearn.metrics.SCORERS.keys())` and that will show you what values are valid for the `scoring` parameter – retnikt Jun 09 '20 at 09:15

1 Answers1

2

It is just a typo.


You need

neg_mean_absolute_error

You typed

neg_mean_absolure_error

using an r instead of t


Reference: https://scikit-learn.org/stable/modules/model_evaluation.html

seralouk
  • 30,938
  • 9
  • 118
  • 133