dotnet / dotnet/machinelearning-modelbuilder

Possible mixup in metrics for binary classification (leads to wrong model selected)

Aperta
#3,046 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Dockerfile
Stelle
285
Fork
66
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

**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**
1. Scenario: data classification
2. 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
3. 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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia riproducendo lo scenario di classificazione dei dati in Model Builder con due classi categoriali e l’ottimizzazione di Macro-Accuracy, quindi confronta le metriche riportate e l’algoritmo selezionato tra le varianti binaria e multiclass. Il lavoro è completato quando il comportamento delle metriche è stato verificato e corretto in modo coerente e il comportamento previsto degli avvisi è stato gestito, se il caso proposto nell’issue viene confermato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
machine-learning
Ambito
machine-learning
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.