VOOZH about

URL: https://www.geeksforgeeks.org/artificial-intelligence/divisive-clustering/

⇱ Divisive Clustering - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Divisive Clustering

Last Updated : 16 Apr, 2026

Divisive Clustering is a type of hierarchical clustering that follows a top-down approach. It starts by placing all data points into one large cluster and then recursively splits that cluster into smaller ones based on differences or distances between the points. This process continues until each cluster contains only similar data points or meets a stopping condition. It is the opposite of agglomerative clustering, which builds clusters from the bottom up. It is is useful when we want to break down a broad category into smaller, meaningful groups.

πŸ‘ divisive_clustering
Product Categorization Tree

Workflow of Divisive Clustering

  1. Start with all data points: Begin with one big group ABCDEFGH.
  2. First split: Divide it into two groups ABC and DEFGH.
  3. Split again: The group ABC is divided into A and BC while the group DEFGH is split into DEFG and H.
  4. Keep dividing: We continue dividing these new groups. BC is split into B and C, DEFG is divided into DE and so on. At this stage most of the data points are now in their individual groups.
  5. Finish: Stop when all points are separated.
πŸ‘ divisive_clustering
Workflow of Divisive Clustering

Python Implementation of Divisive Clustering

Below is a simple Python example that shows how divisive clustering works by splitting fruits into categories.

Step 1: Import Required Library

We import matplotlib.pyplotto draw and visualize the tree.

Step 2: Define the Hierarchical Tree Structure

We define the fruit categories using a nested dictionary that mimics the structure of a decision or clustering tree.

Step 3: Compute Positions of Nodes Recursively

This function calculates x and y positions for each node in the tree. It ensures parents are centered above their children and siblings don’t overlap.

Step 4: Extract Parent-Child Edges

This function walks through the tree and records the direct parent-child connections. These will be used to draw lines.

Step 5: Plot the Tree with Boxes and Arrows

We now draw the tree using node positions and edge connections. Nodes are displayed as colored boxes and edges are straight lines.

Step 6: Generate the Tree

This final step runs the plotting function using the data you defined, displaying the complete divisive clustering tree.

Output:

πŸ‘ divisive_clustering
Divisive Clustering

The output shows a top-down divisive clustering tree that breaks down all fruits into specific categories like citrus, berries and others based on their type.

Real-World Applications of Divisive Clustering

  1. Biological Taxonomy: Divisive clustering is used in biology to sort living things from broad to specific categories. For example, start with "Animals", then split into "Mammals", then into "Primates" and finally into specific species like "Humans".
  2. Product Categorization in E-commerce: Online shopping websites organize products using a top-down category structure.
  3. Document and Topic Classification: Large libraries or article databases use it to arrange documents into main topics and detailed subtopics. Like articles on "Science" can be divided into "Physics", then into "Quantum Mechanics" and so on.
  4. Customer Segmentation in Marketing: Companies use it to group customers based on their characteristics or buying behavior.For example, all customers are grouped initially, then split into "Frequent Buyers", "New Users" and "High Spenders".
  5. 5. Medical Diagnosis Systems: Doctors or AI systems use this method to narrow down possible diseases from broad symptom categories. Like from the symptom "fever", it may be split into "viral", then "flu" and then into specific flu types.

Similar Reads:

Comment
Article Tags:

Explore