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
KernelShap is not working yet and gave the following error:
Traceback (most recent call last):
File "/home/nfel/PycharmProjects/thermostat/venv/lib/python3.8/site-packages/captum/attr/_core/lime.py", line 484, in attribute
self.interpretable_model.fit(DataLoader(dataset, batch_size=n_samples))
File "/home/nfel/PycharmProjects/thermostat/venv/lib/python3.8/site-packages/captum/_utils/models/linear_model/model.py", line 303, in fit
return super().fit(train_data=train_data, **kwargs)
File "/home/nfel/PycharmProjects/thermostat/venv/lib/python3.8/site-packages/captum/_utils/models/linear_model/model.py", line 260, in fit
return super().fit(
File "/home/nfel/PycharmProjects/thermostat/venv/lib/python3.8/site-packages/captum/_utils/models/linear_model/model.py", line 117, in fit
return self.train_fn(
File "/home/nfel/PycharmProjects/thermostat/venv/lib/python3.8/site-packages/captum/_utils/models/linear_model/train.py", line 329, in sklearn_train_linear_model
sklearn_model.fit(x, y, sample_weight=w, **fit_kwargs)
File "/home/nfel/PycharmProjects/thermostat/venv/lib/python3.8/site-packages/sklearn/linear_model/_base.py", line 525, in fit
X, y, X_offset, y_offset, X_scale = self._preprocess_data(
File "/home/nfel/PycharmProjects/thermostat/venv/lib/python3.8/site-packages/sklearn/linear_model/_base.py", line 162, in _preprocess_data
X_offset = np.average(X, axis=0, weights=sample_weight)
File "<__array_function__ internals>", line 5, in average
File "/home/nfel/PycharmProjects/thermostat/venv/lib/python3.8/site-packages/numpy/lib/function_base.py", line 409, in average
raise ZeroDivisionError(
ZeroDivisionError: Weights sum to zero, can't be normalized
The text was updated successfully, but these errors were encountered:
nfelnlp
changed the title
ZeroDivisionError: Weights sum to zero, can't be normalized
[KernelShap] ZeroDivisionError: Weights sum to zero, can't be normalized
May 2, 2021
KernelShap is not working yet and gave the following error:
The text was updated successfully, but these errors were encountered: