-
Notifications
You must be signed in to change notification settings - Fork 160
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
c2st fails when one feature is constant #1204
Labels
bug
Something isn't working
Comments
Thanks for reporting this @Baschdl I can reproduce it only when all features are constant. But still, this should not happen. I suggest setting |
janfb
added a commit
that referenced
this issue
Jul 26, 2024
janfb
added a commit
that referenced
this issue
Jul 26, 2024
janfb
added a commit
that referenced
this issue
Jul 26, 2024
janfb
added a commit
that referenced
this issue
Jul 30, 2024
janfb
added a commit
that referenced
this issue
Jul 30, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Running
c2st
/c2st_scores
with the defaultz_scores=True
when at least one feature is constant (all data points have the same value for this feature) fails withValueError: Input X contains NaN. RandomForestClassifier does not accept missing values encoded as NaN natively...
.This is caused by dividing the data by the standard deviation of this feature (which is zero):
sbi/sbi/utils/metrics.py
Lines 161 to 165 in 83e122a
To Reproduce
The text was updated successfully, but these errors were encountered: