Below is an example sklearn pipeline. There are two sklearn StackingClassifiers:
- stackingclassifier1 with base classifier as RandomForestClassifier & stackingclassifier2 as Meta Learner.
- stackingclassifier2 with base classifier as KNearestNeighborsClassifier & SVC as Meta Learner.
So pipeline is:
I want to use featureset1 on RndomForestClassifier & featureset2 on KNearestNeighborsClassifier & featureset3 on SVM. However on pipeline only option I am getting is to pass one featureset for all pipeline steps - Pipeline.fit(X_train, y_train).
How could I pass different featureset to different estimators
Also this is a workaround implementation. In my design there is no stack. Just one learner passing probability to next. Then get final probabilities at last step. If there is a better implementation technique using pipeline please add that as well. Thanks