We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug
When using:
series = series.with_static_covariates(static_covariates)
and shap_explain = ShapExplainer(model)
shap_explain = ShapExplainer(model)
I get the following error:
Traceback (most recent call last): File "models/train_forecast_model.py", line 276, in <module> train_model() File "models/train_forecast_model.py", line 176, in train_model shap_explain = ShapExplainer(model) File "/home/user/.virtualenvs/myenv/lib/python3.8/site-packages/darts/explainability/shap_explainer.py", line 173, in __init__ self.explainers = _RegressionShapExplainers( File "/home/user/.virtualenvs/myenv/lib/python3.8/site-packages/darts/explainability/shap_explainer.py", line 557, in __init__ self.explainers = self._build_explainer_sklearn( File "/home/user/.virtualenvs/myenv/lib/python3.8/site-packages/darts/explainability/shap_explainer.py", line 661, in _build_explainer_sklearn explainer = shap.LinearExplainer(model_sklearn, background_X, **kwargs) File "/home/user/.virtualenvs/myenv/lib/python3.8/site-packages/shap/explainers/_linear.py", line 148, in __init__ self.expected_value = np.dot(self.coef, self.mean) + self.intercept File "<__array_function__ internals>", line 5, in dot ValueError: shapes (809,) and (21,) not aligned: 809 (dim 0) != 21 (dim 0)
This does not happen when NOT using static covariates...
Expected behavior It supposed to show the plot as usual.
System (please complete the following information):
Additional context I'm also using past covariates and ShapExplainer works well with those, the error happens when I add the static covariates.
The text was updated successfully, but these errors were encountered:
Hi @vsantosu, and thanks for writing. Yes, ShapExplainer currently doesn't support static covariates. We're working on this in #1732.
Sorry, something went wrong.
Thanks so much @dennisbader !! Great work btw! this is a very powerful project.
Thanks @vsantosu, that's great to hear :)
Fixed by #1803, which will be part of the next release.
No branches or pull requests
Describe the bug
When using:
series = series.with_static_covariates(static_covariates)
and
shap_explain = ShapExplainer(model)
I get the following error:
This does not happen when NOT using static covariates...
Expected behavior
It supposed to show the plot as usual.
System (please complete the following information):
Additional context
I'm also using past covariates and ShapExplainer works well with those, the error happens when I add the static covariates.
The text was updated successfully, but these errors were encountered: