I have been looking into the random trees and decision trees in OpenCv and something that still confuses me is the differences between regression and classification.

Can anyone outline what the differences are, when would one use one over the other?

The reason for me asking is that i am using classification for labeling a multilabel class of a dataset, and then i ran across the code for the article "Object Classification using Hough Forest" and its source code. In their code, the methods are called regression and its also doing a multiclass labeling, so now i am not sure if I know the difference?

A little more about my case: I am extracting N descriptors from images, each descriptor are different computed features from an image patch, forming a 1x8096 descriptor. Each descriptor are labelled with a label 0:4. I then use OpenCV RandomTrees to train and classify. Looking at the code, its using the methods for ordered classification. It also have categorical classification/regression and categorical regression.

So from what i read, would the right term not be that im using a regression, my values can be ordered continuous:

In brief:

  1. Classification trees have dependent variables that are categorical and unordered
  2. Regression trees have dependent variables that are continuous values or ordered whole values.



1 Answer 1


What's in your boxed text seems right to me. You could further classify "regression trees" as "ordinal" or "linear"; trees can also be applied to survival/time-to-event data.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.