Can't find the right data type: Can't bind the IDataView column 'Score' of type 'Vector<Single, 7>' to field or property 'Score' of type 'System.Single'.
thomasd3 opened this issue · comments
Using F#, I've trained a multi-class model, my input class is simple:
type MLDataRow =
{
[<ColumnName "Label"; LoadColumn(0)>]
Label: float32
[<ColumnName "Features"; VectorType(80); LoadColumn(1, 80)>]
Features: float32 array
}
One label, and 80 floats as features.
The class for the output is:
[<CLIMutable>]
type MLPrediction =
{
[<ColumnName "Features"; VectorType(80)>]
Features : float32 array
PredictedLabel : float32
Score : float32
Probability : float32
}
But when getting the prediction, I run into:
Can't bind the IDataView column 'Score' of type 'Vector<Single, 7>' to field or property 'Score' of type 'System.Single'.
So I assumed it would need a float per class, and in the output I tried:
Score : float32 array
That resulted in:
Operation is not valid due to the current state of the object.
Then I added the VectorType attribute:
[<VectorType(7)>]
Score : float32
Which resulted in the same error.
I'm completely cluless about what it is expecting, but also a bit frustrated because I've read the docs several times and I still don't understand well how the data pipeline works.
In fact, I am saving my data to CSV and loading from file because I can't even get it to load from the input type described above.