[scikit-learn] question using GridSearchCV
Andreas Mueller
t3kcit at gmail.com
Wed Jul 24 14:57:01 EDT 2019
scoring is not a parameter.
It needs to be passed to GridSearchCV
selfCLF =GridSearchCV(GradientBoostingClassifier(), parameters, versose = 3m n_jobs = 4), scoring='roc_auc')
On 7/24/19 1:24 PM, Glenn Schultz via scikit-learn wrote:
> I am using GBClassifier, the below works if I use the default accuracy but it fails using roc_auc or roc_auc_score. I have found many examples to work with but for the life of me I can’t get it two work with roc_auc. What am I doing wrong.
>
> from sklearn.ensemble import GradientBoostingClassifier
> from sklearn.model_selection import GridSearchCV
> from sklearn.metrics import auction, roc_auc_score
>
> y_train = LoansTrainData[‘event’]
> x_train LoanTrainData[LoansTrainData.columns.drop(‘event’)]
>
> parameters = {“loss” :[‘deviance’],
> “scoring” :[‘roc_auc’},
> “learning_rate” :[.1, .05]
>
> selfCLF =GridSearchCV(GradientBoostingClassifier(), parameters, versose = 3m n_jobs = 4)
> searchCLF(x_train, y_train)
> _______________________________________________
> scikit-learn mailing list
> scikit-learn at python.org
> https://mail.python.org/mailman/listinfo/scikit-learn
More information about the scikit-learn
mailing list