You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, I should say that this is really a great paper. Good luck with you.
My question is, let's assume we have a tabular dataset. We just do encoding categorical variables as pre-processing and make a model using the random forest. And we save that model using .pickle format.
After that can we use Anchor to explain that saved model.
For example, I don't need to use these lines of code when making the model.
I just need to use,
c = sklearn.ensemble.RandomForestClassifier(n_estimators=50, n_jobs=5)
c.fit(dataset.train, dataset.labels_train)
these two lines when making the model.
Thank you.
The text was updated successfully, but these errors were encountered:
Yes, you can train the model without encoding, provided that you don't have categorical features (i.e. the explainer will tread all features as ordinal / continuous and discretize them). You don't need to initialize the explainer before training the model, I just did it in that order because I wanted to use the explainer's encoder to encode the data before training the model. Note that the init function of the explainer does not depend on the model.
Hi,
First of all, I should say that this is really a great paper. Good luck with you.
My question is, let's assume we have a tabular dataset. We just do encoding categorical variables as pre-processing and make a model using the random forest. And we save that model using .pickle format.
After that can we use Anchor to explain that saved model.
For example, I don't need to use these lines of code when making the model.
explainer = anchor_tabular.AnchorTabularExplainer(dataset.class_names, dataset.feature_names, dataset.data, dataset.categorical_names)
explainer.fit(dataset.train, dataset.labels_train, dataset.validation, dataset.labels_validation)
c = sklearn.ensemble.RandomForestClassifier(n_estimators=50, n_jobs=5)
c.fit(explainer.encoder.transform(dataset.train), dataset.labels_train)
I just need to use,
c = sklearn.ensemble.RandomForestClassifier(n_estimators=50, n_jobs=5)
c.fit(dataset.train, dataset.labels_train)
these two lines when making the model.
Thank you.
The text was updated successfully, but these errors were encountered: