Open
Description
I'm building a Voting Ensemble Classifier model with transformation pipelines.
pipe_xgbc = Pipeline(steps=[
('transformer', variable_transformer),
('classifier', clf1)])
pipe_lgbc = Pipeline(steps=[
('transformer', variable_transformer),
('classifier', clf2)])
pipe_rf = Pipeline(steps=[
('transformer', variable_transformer),
('classifier', clf3)])
classifiers = [
('xgbc', pipe_xgbc),
('lgbc', pipe_lgbc),
('rf', pipe_rf)
]
voting = VotingClassifier(classifiers,
voting='soft',
weights=[1, 1, 1])
fited_soft_voting = voting.fit(X_train, y_train)
But when I try to use the MimicExplainer function with an LGBM surrogate model, I get the following error:
explainer = MimicExplainer(fited_soft_voting[-1][1],
X_train,
LGBMExplainableModel,
augment_data=True,
max_num_of_augmentations=10,
features=X_train.columns,
transformations=variable_transformer.transformers,
allow_all_transformations=True
)
---------------------------------------------------------------------------
TypeError: 'VotingClassifier' object is not subscriptable
Metadata
Metadata
Assignees
Labels
No labels