Closed AYY7 closed 1 year ago
Fixes https://github.com/scikit-learn-contrib/imbalanced-learn/issues/863
When output_dict=True and target_names is given, set the keys of the output_dict to the corresponding target_names
output_dict=True
target_names
output_dict
{'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
str
{'0': {'pre':0.5, 'rec':1.0, ... }, '1': { ... }, ... }
Reference Issue
Fixes https://github.com/scikit-learn-contrib/imbalanced-learn/issues/863
What does this implement/fix? Explain your changes.
When
output_dict=True
andtarget_names
is given, set the keys of theoutput_dict
to the correspondingtarget_names
When
output_dict=True
andtarget_names
is not given, set the keys of theoutput_dict
to the corresponding labels instr
formatAny other comments?