09.10.2023 Views

Advanced Data Analytics Using Python_ With Machine Learning, Deep Learning and NLP Examples ( 2023)

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 4

Top-Down Approach

The top-down clustering method is also called the divisive hierarchical

clustering. It the reverse of bottom-up clustering. It starts with a single

cluster consisting of all input objects. After each iteration, it splits the

cluster into two parts having the maximum distance.

Algorithm

Input: I = {I1, I2, … , In}

Output: O

D ← ∞;

K ← 1;

S ← {I 1 ,I 2 , ... , I n };

O ← <D, K, S >;

repeat

X ← containing two data objects with the longest

distance dist;

Y ← ∅;

S ← S – X;

X i ← data object in A with maximum − D(X i , X);

X ← X − {X i };

Y ← Y ∪ {X i };

repeat

forall data object X j in Xdo

e(j) ← − D(X j , X) − − D(X j , Y);

end for

if∃e(j) > 0 then

X k ← data object in X with maximum e(j);

X ← X − {X k };

Y ← Y ∪ {X k };

split ← TRUTH;

else

92

Unsupervised Learning: Clustering

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!