Skip to content
New issue

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

sparse array length is ambiguous; use getnnz() or shape[0] #447

Open
CTI2023 opened this issue Oct 31, 2024 · 0 comments
Open

sparse array length is ambiguous; use getnnz() or shape[0] #447

CTI2023 opened this issue Oct 31, 2024 · 0 comments

Comments

@CTI2023
Copy link

CTI2023 commented Oct 31, 2024

I am working on a multi-label classification task. Most of the feature values are zero. The dataset is a binary vector. When I tried to generate the counterfactual, I got the error like sparse array length is ambiguous; use getnnz() or shape[0]

import numpy as np

e = dice.generate_counterfactuals(data, total_CFs=5, desired_class=1)

e.visualize_as_dataframe(show_only_changes=True)

@CTI2023 CTI2023 changed the title parse array length is ambiguous; use getnnz() or shape[0] sparse array length is ambiguous; use getnnz() or shape[0] Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant