Thanks for such a nice implementation of GA for feature selection.
I am having an issue with passing the sample_weight fit parameter while using GeneticSelectionCV.
How this parameter should be passed while fitting GeneticSelectionCV?
Here are the details of my work:
The classifier I use is clf = XGBoostClassifier
For feature selection I use the following code where the rest of the parameters are the default ones:
genetic_CV = GeneticSelectionCV(estimator=clf)
Since I need to preprocess my data before fitting, I basically use the following pipeline for feature selection using GeneticSelectionCV:
Hi,
Thanks for such a nice implementation of GA for feature selection.
I am having an issue with passing the
sample_weight
fit parameter while using GeneticSelectionCV. How this parameter should be passed while fitting GeneticSelectionCV?Here are the details of my work:
The classifier I use is
clf = XGBoostClassifier
For feature selection I use the following code where the rest of the parameters are the default ones:
genetic_CV = GeneticSelectionCV(estimator=clf)
Since I need to preprocess my data before fitting, I basically use the following pipeline for feature selection using GeneticSelectionCV:
ga_pipeline = Pipeline( steps=[('preprocessing',preprocessor), ('ga',genetic_CV)])
I think normally the fit parameter
sample_weight
should be passed like:ga_pipeline.fit(X_train, y_train, ga__sample_weight=_weight_)
but it raises an error: