我正在关注 ML.Net 的Iris 教程,我输入了说明而不是复制/粘贴它们,这样我就可以更好地学习 API,但现在我遇到了一些错误。
当我从教程中运行这一行时,System.Reflection.TargetInvocationException
会抛出一个:
var model = pipeline.Train<IrisData, IrisPrediction>();
我在运行时遇到的控制台错误是:
Bad value at line 2 in column Label
...
Bad value at line 8 in column Label
Suppressing further bad value messages
...
Processed 150 rows with 150 bad values and 0 format errors
Warning: Term map for output column 'Label' contains no entries.
Automatically adding a MinMax normalization transform, use 'norm=Warn' or 'norm=No' to turn this behavior off.
Using 2 threads to train.
Automatically choosing a check frequency of 2.
Bad value at line 1 in column Label
...
Suppressing further bad value messages
Processed 150 rows with 150 bad values and 0 format errors
Warning: Skipped 150 instances with missing features/label during training
这是我的IrisData
课:
namespace Ronald.A.Fisher
{
public class IrisData
{
[Column("0")]
public float SepalLength;
[Column("1")]
public float SepalWidth;
[Column("2")]
public float PetalLength;
[Column("3")]
public float PetalWidth;
[Column("4")]
[ColumnName("Label")]
public float Label;
}