【问题标题】:ML.NET Column attribute does not contain 'ordinal'ML.NET 列属性不包含“序数”
【发布时间】:2020-03-03 15:18:46
【问题描述】:

尝试在 ML.net 中为我的 TrainingModel 分配值,但是当我尝试使用 column 属性时,它不会接受 'ordinal' 作为参数。

   [Column(ordinal: "0", name: "label")]
    public string FeedBackText { get; set; }

    [Column(ordinal: "1")]
    public bool IsGood { get; set; }

我的 intelissense 抛出的错误信息是:

The best overload for 'columnAttribute does not have a parameter named 'orginal'

cannot resolve symbol 'ordinal'

【问题讨论】:

  • 您能否分享指向Column 文档的链接?我看到了 ColumnName 属性,但没有看到 Column 属性。
  • 快速谷歌发现了这个github.com/dotnet/machinelearning/issues/3137。似乎 ColumnAttribute 在 0.11 版中是 ColumnNameAttribute
  • 您使用的是什么版本的 ML.NET?
  • 都不包含“oridnal”的定义
  • @Jon 我正在使用 1.4.0

标签: c# .net-core ml.net


【解决方案1】:

列已弃用,更新版本为:

[LoadColumn(0), ColumnName("label")]

【讨论】:

  • "label" 可能在训练模型时需要大写。我认为它需要“标签”,除非您将标签列名称指定为“标签”。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-04-30
  • 1970-01-01
  • 2022-01-25
  • 2020-01-13
  • 2011-01-28
  • 1970-01-01
相关资源
最近更新 更多