我想确定哪个分数与哪个标签有关,但是出现运行时错误。
我有负责的方法...
<input type="number" value="14" step="14" id="stepper" />
<span id="result">14</span>
但是我遇到了运行时异常:
System.InvalidOperationException:'对'GetValue的无效调用'
编辑:我用模型构建器训练了模型,因此代码是ml.net使用的标准代码,在我的情况下是三类分类。GetSlotNames的参数是“得分”
public static List<string> GetSlotNames(string name)
{
var schema = predEngine.OutputSchema;
var column = schema.GetColumnOrNull(name);
var slotNames = new VBuffer<ReadOnlyMemory<char>>();
column.Value.GetSlotNames(ref slotNames); //here is the error
var names = new string[slotNames.Length];
var num = 0;
foreach (var denseValue in slotNames.DenseValues())
{
names[num++] = denseValue.ToString();
}
return names.ToList();
}