I'm just starting with ML.Net and find myself confused by the rapid evolution of APIs and samples based on various API versions.
My goal is to read in several numeric feature columns and one text column specifying a label ("Brand"), but I get an error on the last line of this snippet
var trainingDataView = mlContext.Data.ReadFromTextFile<PurchaseData>
(path: trainDataPath, hasHeader: true, separatorChar: ',');
var dataProcessPipeline = mlContext.Transforms
.Concatenate(DefaultColumnNames.Features,
nameof(PurchaseData.AgeBracket),
nameof(PurchaseData.Gender),
nameof(PurchaseData.IncomeBracket),
)
.Append(mlContext.Transforms.CopyColumns("Label", nameof(PurchaseData.Brand)))
.AppendCacheCheckpoint(mlContext);
var trainer = mlContext.MulticlassClassification.Trainers
.StochasticDualCoordinateAscent(featureColumn: DefaultColumnNames.Features);
var trainingPipeline = dataProcessPipeline.Append(trainer);
var trainedModel = trainingPipeline.Fit(trainingDataView);
'Schema mismatch for label column 'Label': expected float, double or KeyType, got Text'
Why is the label not expected/allowed to be Text and what can I do to fix it?