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

Bug in Metrics DataFrame #65

Closed
Tsmith5151 opened this issue May 4, 2021 · 1 comment
Closed

Bug in Metrics DataFrame #65

Tsmith5151 opened this issue May 4, 2021 · 1 comment

Comments

@Tsmith5151
Copy link
Contributor

Tsmith5151 commented May 4, 2021

When styling the output metrics dataframe, the following error can be thrown due to threshold rounding.

display(df_to_show.style.background_gradient(cmap = cm).set_table_styles(styles))
ValueError: style is not supported for non-unique indices.

@amirhessam88, this appears to be a rounding issue when naming the dataframe index and changing to 4f should resolve the duplicate indices names.

metrics_df = pd.DataFrame(
            data=self.metrics_dict_,
            index=[
                f"""Threshold = {self.threshold:.3f} | Average =
                {self.average_method.title()}"""
            ],
        )
@amirhessam88
Copy link
Member

amirhessam88 commented May 6, 2021

Just fixed it. It is now follow precision_digits that you can call in the class.
#67

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants