C#+web=? 微软Blazor


https://docs.microsoft.com/zh-cn/aspnet/core/blazor/get-started?view=aspnetcore-3.1&tabs=visual-studiohttps://docs.microsoft.com/zh-cn/aspnet/core/blazor/get-started?view=aspnetcore-3.1&tabs=visual-studiodotnet new -i Microsoft.AspNetCore.Components.WebAssembly.Templates::3.2.0-preview2.20160.5
dotnet new blazorwasm -o WebApplicationMixdotnet run
- ML.NET

//Step 1. Create a ML Contextvar ctx = new MLContext();
//Step 2. Read in the input data for model trainingIDataView dataReader = ctx.Data .LoadFromTextFile<MyInput>(dataPath, hasHeader: true);
//Step 3. Build your estimatorIEstimator<ITransformer> est = ctx.Transforms.Text .FeaturizeText("Features", nameof(SentimentIssue.Text)) .Append(ctx.BinaryClassification.Trainers .LbfgsLogisticRegression("Label", "Features"));
//Step 4. Train your ModelITransformer trainedModel = est.Fit(dataReader);
//Step 5. Make predictions using your modelvar predictionEngine = ctx.Model .CreatePredictionEngine<MyInput, MyOutput>(trainedModel);
var sampleStatement = new MyInput { Text = "This is a horrible movie" };
var prediction = predictionEngine.Predict(sampleStatement);
赞 (0)
