I'm learning the Microsoft.ml framework, I tried to implement a simple model, but it produces very strange numbers. Tell me what I'm doing wrong:
MLContext mlContext = new MLContext();
IDataView trainingData = mlContext.Data.LoadFromEnumerable(data);
var pipeline = mlContext.Transforms.Concatenate("Features", new[] {"R"})//, "R"
.Append(mlContext.Regression.Trainers.Sdca(labelColumnName: "P", maximumNumberOfIterations: 1000));
var model = pipeline.Fit(trainingData);
var result = mlContext.Model.CreatePredictionEngine<EnterData, Prediction>(model).Predict(seachValue);
return result;
The model is tuned for regression analysis of experimental data. I'm going to implement several network nodes, but for now I'm testing on a simple linear regression. In fact, the method should process the incoming data, train the model on it, make a prediction and return the answer to the test number.
The class wrapper is rolled out above. The problem is not in the message further down the code. There:
MessageBox.Show(result.P.ToString());
Buddy, Your question is not clear. What is your model type ? Sentiment Analysis, Facial Recognition or Cost Prediction?? Whatever, I think that the problem is issued in the last line of your code.
for example = return result.prediction();