-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Hello,
Can you please advise how I could incorporate BackwardStepwiseOLS into a pipeline as an intermediary step to a classifier and then doing RandomizedSearchCV? What I'm hoping to do is retrofit BackwardStepwiseOLS so it only returns the features of X whose p-value is within a configurable value of .05. Using other techniques e.g. PCA, LDA, or KPCA works as an intermediary step but I'm just curious how a model performs if the dimensions were reduced instead by a function such BackwardStepwiseOLS.
Here's a snippet of what I'm trying to do:
steps=[
('preprocessor', preprocessor),
('stepwise_ols', BackwardStepwiseOLS(fK=10)),
('classifier', RandomForestClassifier())]
pipeline = Pipeline(steps=steps)
rs = RandomizedSearchCV(estimator=pipeline, param_distributions=my_hyper_parameter,
scoring='accuracy', return_train_score=True)
rs.fit(X, y)
Thanks.
Metadata
Metadata
Assignees
Labels
No labels