Possible mixup in metrics for binary classification (leads to wrong model selected)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- machine-learning
- Domain
- machine-learning
Research direction
Start by reproducing the data-classification scenario in Model Builder with two categorical classes and Macro-Accuracy optimization, then compare the reported metrics and selected algorithm across binary and multiclass variants. Done means the metric behavior is verified and corrected consistently, with the expected warning behavior addressed if the issue’s proposed case is confirmed.
Written by the indexing model from the issue text.
Description
System Information (please complete the following information):
- Model Builder Version (available in Manage Extensions dialog): 17.19.2.211501
- Visual Studio Version 2022
Describe the bug
Training a multi-category model with just a 2 classes with Macro-Accuracy optimization metric.
I get:
46 FastTreeOva 0.5500 1.2160 |
|47 FastTreeOva 0.5259 1.1710 |
|6 LightGbmBinary 0.6117 1586.0270 |
|17 LightGbmMulti 0.5003 560.4780 |
|7 SdcaLogisticRegressionBinary 0.6583 2.0900 |
|18 FastTreeOva 0.5179 1.3650 |
|19 FastTreeOva 0.5097 1.0210 |
|8 LbfgsLogisticRegressionBinary 0.6583 1.5410 |
|20 FastTreeOva 0.4868 1.2010 |
LbfgsLogisticRegressionBinary gets selected, but it is exactly at the null accuracy 0.658287% for the most common category so my suspect it is just selecting true every time. If that is the case, then macro-accuracy should be 0.5%. I believe that is true, because the multiclass algorithms have much lower metrics.
Although I haven't confirmed the issue, I think the fact that binary variants report much higher accuracy point to the possibility of calculating the metric differently.
To Reproduce
- Scenario: data classification
- Set label to categorical . Make sure Boolean is not selected as type, but it just has 2 categories. For example, set 1/0 to numeric, true/false to text so binary algorithm variants will activated
- Train
Expected behavior
Use macro-accuracy / balanced accuracy as the metric for all algorithms.
Ideally, in binary classification we should also see macro accuracy, or at least warning if it is exactly at null accuracy or always predicting one label.
- Dominant language
- Dockerfile
- Stars
- 285
- Forks
- 66
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dotnet/machinelearning-modelbuilder
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 10/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
dotnet/machinelearning-modelbuilder#3087 · 4 comments ·
-
GS Tutorial
Difficulty 4/5 3-5 days Newbie friendliness 35/100
dotnet/machinelearning-modelbuilder#3085 · 2 comments ·
-
y Open
Difficulty 5/5 Over a week Newbie friendliness 10/100
All issues in dotnet/machinelearning-modelbuilder
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
vllm-project/vllm#57974 · 4 comments ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
torchgeo/torchgeo-bench#400 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
open-compass/VLMEvalKit#1698 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100