ML.net Add New Data to Exist Generated Model [closed]

倾然丶 夕夏残阳落幕 提交于 2019-12-08 00:21:52

问题


i generated a ML Model Using ML.Net V 0.7.0 last version

i need to add a new learning data to this existing Model without regenerated it with the new and old data

as i have a large data set that exceed 100 Million Record

and i need to add 100 record without reload all last data set to generate the new model

any ideas please

this is critical for me

best regards


回答1:


Some trainers in ML.NET support training with an initial predictor, which means you can use an existing predictor as the starting point for training with new data.

A test showing this can be found here with the relevant code being:

// Train the first predictor.
var trainer = ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent("Label", "Features",advancedSettings: s => s.NumThreads = 1);
var firstModel = trainer.Fit(trainData);

// Train the second predictor on the same data.
var secondTrainer = ml.BinaryClassification.Trainers.AveragedPerceptron("Label","Features");

var trainRoles = new RoleMappedData(trainData, label: "Label", feature: "Features");
var finalModel = secondTrainer.Train(new TrainContext(trainRoles, initialPredictor: firstModel.Model));


来源:https://stackoverflow.com/questions/53318863/ml-net-add-new-data-to-exist-generated-model

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!