Skip to content

shap_values[i] gets "index 1 is out of bounds for axis 0 with size 1" #1

Description

@hanglearning

Hello, in the train() function, these two lines

for i in range(10):
    shap_data_temp_model.append(torch.sum(torch.tensor(shap_values[i])))

now returns this error

Traceback (most recent call last):
  File "<string>", line 2, in <module>
IndexError: index 1 is out of bounds for axis 0 with size 1

Could you provide any solution? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions