This functionality exists in ML.NET but it is not possible with the existing LearningPipeline
APIs. This will be exposed in the new ML.NET APIs and a sample enabling this scenario can be found here. The relevant code is:
// Train the first predictor.
var trainer = new LinearClassificationTrainer(env, new LinearClassificationTrainer.Arguments
{
NumThreads = 1
}, "Features", "Label");
var firstModel = trainer.Fit(trainData);
// Train the second predictor on the same data.
var secondTrainer = new AveragedPerceptronTrainer(env, new AveragedPerceptronTrainer.Arguments());
var trainRoles = new RoleMappedData(trainData, label: "Label", feature: "Features");
var finalModel = secondTrainer.Train(new TrainContext(trainRoles, initialPredictor: firstModel.Model));
These APIs are still in flux, but perhaps this helps. This is not yet part of an official ML.NET release so you would need to get a NuGet from here or build the repo.
Note: I am on the ML.NET team.
0.5.0
we cant retrain model? – Contingence