Skip to content
Advertisement

Tag: make-scorer

Error with precision_score of XGBoost classifier with RandomizedSearchCV

I’m trying to make a classifier with XGBoost, I fit it with RandomizedSearchCV. Here is the code of my function: When I run the code, I get an error, reported below: When I do the same thing but with GridSearchCV instead of RandomizedSearchCV, the code runs without any problems! Answer It’s not precision_score it’s ‘precision_score’ (with ‘ ‘), like this-

Advertisement