grid_cv = GridSearchCV(clf, param_grid=param_grid, scoring='recall', n_jobs=-1, cv=10) grid_cv.fit(x_train_orig, y=y_train_orig, sample_weight=my_sample_weights)