Difference between segmentation and classification

16.3k views Asked by At

I have been wondering the real difference between segmentation and classification. Classification using the decision tree algorithm has any difference from segmentation?

2

There are 2 answers

2
Aditya On

Segmentation, as in Image Segmentation means creating parts of an image into segments which are conceptually meaningful or simple for further analysis. Usually we want to locate objects and boundaries in the images. Simplest example is removing background from foreground.

enter image description here

You can relate it with edge detection and countour detection. There are various methods to do this like clustering using K-Means, compressing image to reduce texture, edge detection or markov fields.

Classification is entirely different. In classification, you want to find LABEL of the given data item. The Labels are usually predefined classes or categories - like whether an email is spam or not, or an image contains a human or animal. Decision tree is one of the approaches to do this.

There have been experiments on segmenting images with the help of classification algorithms. Nikamanon's method (link in reference) tries to create too many segments using cut algorithm and use classification to combine them based on whether it is a good segment based on human intervention or not. Their algorithm didn't perform very well but gave a sign that classification can be used in this task.

p.s. Segmentation is more related to clustering than classification.

1
marianne On

If you want to know the difference between decision trees (used for classification) and segmentation trees (used for segmentation), a brief explanation is:

Decision trees: optimize for purity of leaf nodes (i.e., they want to classify as good as possible

Segmentation trees: optimize for a "good segmentation of the data", not for purity. A "good segmentation" could be that some classification algorithm (for example logistic regression) performs well on the population segments in the leaves. So the tree doesn't do the classification, but rather tries to find segments of the population for which another model works well. The end goal may not be the classification, but rather the segments themselves (i.e. if you want to identify customers that behave a certain way)