Ask Your Question

how can I add data to an already trained model

asked 2017-03-09 00:04:02 -0600

I try to add new train data to an already trained model. In neural, I find that it can be trained by " UPDATE_WEIGHTES",however it doesn't work well. I want to recognize 0-9, use 180 samples train it, its ok. when I seperate samples to 5, train it by UPDATE_WEIGHTES 4times , its going so far.

I have tried Bayes, KNN, Neural. Now I don't understand what does the 'update' in train() used for. sorry for my poor english

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2017-03-09 02:43:58 -0600

berak gravatar image

only ANN_MLP and LogisticRegression classes support updating existing weights

edit flag offensive delete link more


Thanks for your answer.I trained A-Z 0-9 for 180 samples and accuracy is 90%. If I train 36 samples as one group, updated it by parameters "update" in train() 4 times(the same sample).accuracy is under 50%. How can I train the samples one by one and get a good result.

yyh0806 gravatar imageyyh0806 ( 2017-03-13 03:00:16 -0600 )edit

why do you want to do it, that way ? (and what model are you using ?)

berak gravatar imageberak ( 2017-03-13 03:02:04 -0600 )edit

I trained model by my samples. I want to updated model using the new training data instead of retrain it. Because it takes too long time.I test this method by some samples. I guess that if I train the model by a full samples or train it by half samples , updated it by the other half, it will be the same result. But I was wrong.I don't understand why and I want to know that my idea is right or not.

yyh0806 gravatar imageyyh0806 ( 2017-03-13 05:03:01 -0600 )edit

again, which ml model are you trying to use ? and where is your code ?

berak gravatar imageberak ( 2017-03-13 05:06:43 -0600 )edit

I want to try opencv model in (KNN,Neural,Bayes,SVM) and decide which to use.I find Neural,Bayes have update paramters, just _neural.load("neural.xml") and _neural.train(train_data, train_class, Mat(), Mat(), params, CvANN_MLP::UPDATE_WEIGHTS); I don't know how to upload the code.

yyh0806 gravatar imageyyh0806 ( 2017-03-14 00:26:30 -0600 )edit

Question Tools

1 follower


Asked: 2017-03-09 00:04:02 -0600

Seen: 484 times

Last updated: Mar 09 '17