-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with custom stacking pipeline #62
Comments
Are you sure pipe_stacking.predict_proba(test_data) works perfectly fine? In this line: |
This is a use case specific implementation, wherein the pipeline is used only for prediction against a single input vector. Henceforth the size of the input is one here. X in predict_proba comes after PCA, which is a 2d array. I have used the same training input matrix for initialization & used the same input data point against lime explainer built on Random forest earlier, it did work fine. It doesnt seem to work for the custom stacking implementation. The error log has marked this an error;
|
can you share a notebook with the error? |
Sure. I have shared the same to your inbox. |
Thanks for the right direction. Your previous correction was perfectly right, the stacking predict_proba function was returning only the first output. I had changed it to work on an array of any given size. Since the sample in my implementation was initialized with a size 44, the ideal output from the predict_proba from my stacking implementation should be (44x2). |
HI,
I have created a pipeline by stacking bunch of models together. The pipeline looks like;
pipe_stacking = make_pipeline(min_max_scaler,pca,EnsembleClassifier(classifiers=[modelLogit,modelRF,modelXGB, linear_classifier,dnnClassifier], meta_classifier=gridGB_high))
The idea is to build a meta classifier on top of the probability scores of one of the class label from the base classifiers.
The ensemble classifier looks like;
The pipeline call : pipe_stacking.predict_proba(test_data) works perfectly fine.
I am trying to use the LimeTabularExplainer on this stacking model;
I get this error log;
It works only if num_samples = 1.
I am not sure what the issue is. Any direction will be greatly appreciated.
Regards,
Vijay Raajaa GS
The text was updated successfully, but these errors were encountered: