Comments (1)
Hi @shrija2901 ,
If you try to fit multiple datasets, even tough they have the same number of features, I recommend you to define and fit a new explainer.
Although I am not entirely sure that I understood exactly your workflow, I suspect that the error comes from the difference in the number of categories within the columns. To give you an example, suppose that we have an initial dataset in which the first categorical column has only 2 categories (e.g., gender
taking the values male
or female
), and another dataset in which the first categorical column has 4 categories (e.g., color
taking values red
, yellow
, blue
, green
). As you can observe, the one-hot-encoding representation differ for those two. Even more, although you can have the same number of features in the raw representations of the datasets (e.g., label encoding), the number of columns can differ in the one hot encoding because of the difference in the number of categories within each feature.
This error can occur because the metadata of the dataset is provided at initialization and not at the fit step (e.g., feature_names
, category_map
are provided to __init__
method). That metadata is used to construct the conditional vector.
Again, I am not sure if this is the case for you since I see some grouping based on the prediction of the model. It would be great if you can provide some runnable code so I can reproduce the error locally and understand better your use case. You can replace the data with some dummy data (randomly generated).
Thanks!
from alibi.
Related Issues (20)
- `typing-extensions` 4.6.0 breakage HOT 1
- Predictor attr not properly cleared when saving HOT 2
- `numba` warnings regarding `nopython` keyword HOT 3
- `PartialDependenceVariance` cannot be saved
- CI failing due to use of `np.int` in `shap` HOT 2
- How to pass parameters to the /api/v1.0/explain using AnchorImage? HOT 2
- `KernelShap` returns no explanations when `link='logit'` and predicted proba is 0 or 1
- RuntimeError: The Session graph is empty. Add operations to the graph before calling run() HOT 6
- RuntimeError: tf.placeholder() is not compatible with eager execution.
- RuntimeError: The Session graph is empty. Add operations to the graph before calling run().
- TypeError: 'float' object is not subscriptable
- PDP plots failing with `matplotlib==3.8.0` HOT 1
- `matplotlib` 3.8.0 type hints for public APIs result in type-checking failures
- Logo in README.md HOT 1
- Columns and DataType Not Explicitly Set on line 61 of data.py
- When use explainer.fit(X_train)οΌit went into a loop of error
- After getting anchors, how to use it to predict the label of an instance?
- Mixed continuous and categorical features in the AnchorTabular explainers (my dataset doesn't contain NaNs)
- New release? HOT 1
- IndexError with AnchorExplainer and Yolov8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alibi.