Skip to content

[MRG] Fix classification_report_imbalanced output_dict keys to target_names #986

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

Closed
wants to merge 1 commit into from

Conversation

AYY7
Copy link
Contributor

@AYY7 AYY7 commented Apr 15, 2023

Reference Issue

Fixes #863

What does this implement/fix? Explain your changes.

When output_dict=True and target_names is given, set the keys of the output_dict to the corresponding target_names

{'label 1': {'pre':0.5,
             'rec':1.0,
             ...
            },
 'label 2': { ... },
  ...
}

When output_dict=True and target_names is not given, set the keys of the output_dict to the corresponding labels in str format

{'0': {'pre':0.5,
             'rec':1.0,
             ...
            },
 '1': { ... },
  ...
}

Any other comments?

@AYY7 AYY7 changed the title Fix Fix classification_report_imbalanced output_dict keys to target_names Apr 15, 2023
@AYY7 AYY7 changed the title Fix classification_report_imbalanced output_dict keys to target_names [MRG] Fix classification_report_imbalanced output_dict keys to target_names Apr 15, 2023
@AYY7 AYY7 closed this Apr 15, 2023
@AYY7 AYY7 deleted the fixes branch April 15, 2023 20:38
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

Successfully merging this pull request may close these issues.

[ENH] set classification_report_imbalanced output_dict keys to target_names
1 participant