Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

AutoML MulticlassClassificationExperiment minimizes LogLossReduction — MultiClassMetricManager.IsMaximize returns false for it

未关闭 适合新手
#7,839 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

@zjdangge 已经在做这个了。

开始于 2026年10月23日。

  • #7853 来自 @zjdangge —— 未关闭

评估

难度
1/5
预计耗时
1 小时以内
新手友好度
90/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
csharp, machine-learning

调研方向

打开 src/Microsoft.ML.AutoML/AutoMLExperiment/IMetricManager.cs,阅读 MultiClassMetricManager.IsMaximize。确认 LogLossReduction 如何转换为 trial loss,以及如何选择最佳运行;issue 中的复现展示了模型得到的分数。完成标准是将 LogLossReduction 视为需要最大化的指标,并且实验选择 log-loss reduction 更高的运行。

由索引模型根据 Issue 内容生成。

描述

area-AutoML untriaged

Defect

src/Microsoft.ML.AutoML/AutoMLExperiment/IMetricManager.cs, MultiClassMetricManager.IsMaximize:

MulticlassClassificationMetric.LogLoss => false,
MulticlassClassificationMetric.LogLossReduction => false,   // should be true

Log-loss reduction is 1 - LogLoss / LogLoss(prior) — higher is better (1 = perfect, 0 = no better than the class prior, negative = worse). With IsMaximize == false the trial loss is the metric itself and the experiment's best run is the minimum, so an experiment optimizing it returns the model that learned least.

Reproduction (Microsoft.ML 5.0.1 / Microsoft.ML.AutoML 0.23.1, osx-arm64)

150 rows, 3 classes, one feature that separates them almost perfectly (a = class + U(0,1)), MulticlassExperimentSettings.OptimizingMetric = LogLossReduction, 10 s budget:

  • trials: FastTreeOva 0.0016 → 0.4176, FastForestOva 0.9606, LbfgsMaximumEntropy 0.6961, … then the tuner settles on SdcaMaximumEntropy at −0.599 for the rest of the budget
  • returned best: macro accuracy 0.333, log loss 1.0986 (= ln 3), log-loss reduction 0.0
  • same data with OptimizingMetric = LogLoss: macro accuracy 1.0, log-loss reduction 1.0

Expected

LogLossReduction => true.

Related observation (not a defect claim)

TopKAccuracy as an optimizing metric: the experiment evaluates with the default topKPredictionCount = 0, for which MulticlassClassificationMetrics.TopKAccuracy is 0 for every model (measured: micro accuracy 1, top-k accuracy 0). MulticlassExperimentSettings has no setting to pass K, so optimizing it compares constants.

主要语言
C#
星标
9.4k
派生
2k
平均合并
2 天 14 小时
30 天内合并 PR
50

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

dotnet/machinelearning 的其他 Issue

查看 dotnet/machinelearning 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。