Closed darren-zdc closed 5 years ago
Thanks for your reply!!
I solve it by adding
.Append(mlContext.Transforms.Conversion.MapValueToKey(outputColumnName: DefaultColumnNames.Label, inputColumnName: nameof(MultiData.Label)));
Maybe should add this line in all the MultiClass Classification samples, since all the samples are using SDCA, and SDCA will actually auto doing the keyMapping. That will be excellent for all the new learners~
Issue
I'm trying to use other MulticlassClassification trainers but never succeed. The only one succeeded is StochasticDualCoordinateAscent. If i change to LogisticRegression or NaiveBayes, there will always be a error "System.ArgumentOutOfRangeException: 'Schema mismatch for label column '': expected Key, got R4".
MultiData.cs
MultiDataPrediction.cs
BuildTrainEvaluateAndSaveModel() function
Remark: Even I change the type of the MultiData.Label to UInt32 will not be working as well. With Error, "System.ArgumentOutOfRangeException: 'Schema mismatch for label column '': expected Key, got U4"