Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Does sum > 0 assert in ml/src/tree.cpp in master branch make sense?

Hi everyone,

I'm currently trying to use RTrees for classification. Therefore, I set the last member of varTypes in TrainData::create() to VAR_CATEGORICAL. Unfortunately, this results in the above mentioned assert (https://github.com/Itseez/opencv/blob/master/modules/ml/src/tree.cpp#L909) to trigger. So far I was not able to wrap my head around the code in DTreesImpl::WSplit DTreesImpl::findSplitCatClass(). Can someone help me out? Is there an error in my training setup or should the assert not be there?

Btw. everything seems to work if I use regression, i.e. leave the output variable as VAR_ORDERED.