I want to determine which score is related to which label but i get a runtime error.
I have a method which is responsible for that...
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();
}
but i get a runtime exception:
System.InvalidOperationException: 'Invalid call to 'GetValue''
EDIT: I trained the model with model builder so code is the standard code which ml.net uses, in my case three categories classification.The parameter of GetSlotNames is "Score"
public class ModelOutput
{
[ColumnName("PredictedLabel")]
public Single Prediction { get; set; }
[ColumnName("Score")]
public float[] Score { get; set; }
}