I am trying to do the following:
vc = VotingClassifier(estimators=[('gbc', GradientBoostingClassifier()),
('rf', RandomForestClassifier()),
('svc', SVC(probability=True))],
voting='soft',
n_jobs=-1,
weights=[2, 3, 1])
cross_val_score(vc, X_new, y, n_jobs=-1)
In this, I want to tune the parameter weights
. If I use GridSearchCV
, it is taking a lot of time. Since it needs to fit the model for each iteration. Which is not required, I guess. Better would be use something like prefit
used in SelectModelFrom
function from sklearn.model_selection
.
Is there any other option or I am misinterpreting something?