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

roc_auc_score for multiclass classification using micro and macro averaging #642

Merged
merged 7 commits into from
Jun 21, 2023

Conversation

mail4umar
Copy link
Collaborator

New method added to compute roc_auc_score using either "micro" or "macro" averaging.
The format is as follows:
roc_auc_score(name of y_true columns, list of columns with score for all the classes, input relation/vDataFrame, average kind, list of labels.

note that the list of labels and y_score columns should be in a matching order i.e. the first element in the labels list should match the first element in the score list.

For example:

import verticapy.machine_learning.metrics.classification as vpy_metrics
vpy_metrics.roc_auc_score("y_true_num", ["y_prob0","y_prob1","y_prob2"], vdf,average="macro",labels=['0','1','2'])

Next: Need to update unit tests by un-skipping the relevant tests.

closes #641

@mail4umar mail4umar added Bug Something isn't working. New Feature New feature request. labels Jun 20, 2023
@mail4umar mail4umar requested a review from oualib June 20, 2023 19:56
@mail4umar mail4umar self-assigned this Jun 20, 2023
verticapy/machine_learning/metrics/classification.py Outdated Show resolved Hide resolved
verticapy/machine_learning/metrics/classification.py Outdated Show resolved Hide resolved
verticapy/machine_learning/metrics/classification.py Outdated Show resolved Hide resolved
verticapy/machine_learning/metrics/classification.py Outdated Show resolved Hide resolved
@mail4umar mail4umar requested a review from oualib June 21, 2023 17:03
@oualib oualib merged commit 773d51e into vertica:master Jun 21, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working. New Feature New feature request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ROC_AUC_SCORE calculation for multiclass classification not implemented using either micro or macro averaging
2 participants