You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
usingSystem;usingMicrosoft.ML.Data;namespaceMicrosoft.ML.Samples{internalstaticclassProgram{staticvoidMain(string[]args){varcontext=newMLContext();varoptions=newTextLoader.Options(){Columns=newTextLoader.Column[]{newTextLoader.Column("Label",DataKind.Single,0),newTextLoader.Column("Sentiment",DataKind.String,1)},HasHeader=true};varloader=context.Data.CreateTextLoader(options);vardata=loader.Read(@"C:\AutoMLDotNet\src\Samples\Data\wikipedia-detox-250-line-data.tsv");varestimator=context.Transforms.Text.FeaturizeText("Features","Sentiment").Append(context.BinaryClassification.Trainers.AveragedPerceptron());vartransformer=estimator.Fit(data);varscoredData=transformer.Transform(data);varmetrics=context.BinaryClassification.EvaluateNonCalibrated(scoredData);Console.WriteLine(metrics.Accuracy);Console.WriteLine("Press any key...");Console.ReadLine();}}}
works great!
If you replace AveragedPerceptron with LogisticRegression, it throws the exception:
'Schema mismatch for label column: expected Bool, got R4'
This may indicate a bug in label schema validation with some binary learners
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
This code:
works great!
If you replace AveragedPerceptron with LogisticRegression, it throws the exception:
This may indicate a bug in label schema validation with some binary learners
The text was updated successfully, but these errors were encountered: