Skip to content

Commit

Permalink
Fix FutureWarning
Browse files Browse the repository at this point in the history
  • Loading branch information
ArturoAmorQ committed Jul 16, 2024
1 parent 68c459b commit 4dcd7fd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python_scripts/metrics_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,9 @@
# of the positive class).

# %%
prevalence = target_test.value_counts()[1] / target_test.value_counts().sum()
prevalence = (
target_test.value_counts()["donated"] / target_test.value_counts().sum()
)
print(f"Prevalence of the class 'donated': {prevalence:.2f}")

# %% [markdown]
Expand Down

0 comments on commit 4dcd7fd

Please sign in to comment.