CvDTree: Appending training data
This question relates specifically to the CvDTree decision tree class, but also to CvStatModel in general:
Is there a way to append additional training data to a model after the initial call to train() has been made?
According to the documentation, CvStatModel::clear() is generally called by the train() method. If this is the case, what is the most efficient strategy for updating the model with additional training examples? Does the model need to be retrained from scratch?
Thanks!
The current structure of the machine learning module indeed applies a clear() of the underlying CvStatModel class, which makes that if you want to add data to an existing model, you indeed need to retrain the whole bit. It would be a nice extension to see appending training, but for that you will need to adapt the source code :) If you would try to do so, please submit a pull request with the extra code.
However I have read this remark at the train of CvStatModel
Which makes me believe that some functions already provide it,as far as I can see in documentation.
However, I could not find any indication that the CvDTree supports this approach.
Thanks Steven. I saw that same remark. I was sorta thinking that meant that different subclasses of CvStatModel would differ in this respect in their implementation of the train() method. I'll take a look at what it would take to extend/adapt the code. I'll post here if I make any progress.