53
A Sober look at Clustering Stability Shai Ben-David 1 Ulrike von Luxburg 2 Dávid Pál 1 1 School of Computer Science University of Waterloo 2 Fraunhofer IPSI, Darmstadt, Germany COLT 2006 Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

A Sober look at Clustering Stability

Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1

1School of Computer ScienceUniversity of Waterloo

2Fraunhofer IPSI, Darmstadt, Germany

COLT 2006

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 2: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

What is clustering?

By clustering we mean grouping data according to somedistance/similarity measure.

DataShai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 3: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

What is clustering?

By clustering we mean grouping data according to somedistance/similarity measure.

Clusters (Linkage algorithm)Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 4: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

What is clustering?

By clustering we mean grouping data according to somedistance/similarity measure.

Clusters (Center-based algorithm)Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 5: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Correctness of clustering

Q: Clustering is not well defined problem.How do we know that we cluster correctly?

A: Common solution – Stability.

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 6: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Correctness of clustering

Q: Clustering is not well defined problem.How do we know that we cluster correctly?

A: Common solution – Stability.

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 7: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Stability: Idea of our definition

Pick your favorite clustering algorithm A.Generate two independent samples S1 and S2.

Stability

How much will clusterings A(S1) and A(S2) differ?

If for large sample sizes clusterings A(S1) and A(S2) are almostidentical, we say that A is stable. Otherwise unstable.

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 8: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Stability: Idea of our definition

Pick your favorite clustering algorithm A.Generate two independent samples S1 and S2.

Stability

How much will clusterings A(S1) and A(S2) differ?

If for large sample sizes clusterings A(S1) and A(S2) are almostidentical, we say that A is stable. Otherwise unstable.

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 9: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Stability: Idea of our definition

Pick your favorite clustering algorithm A.Generate two independent samples S1 and S2.

Stability

How much will clusterings A(S1) and A(S2) differ?

If for large sample sizes clusterings A(S1) and A(S2) are almostidentical, we say that A is stable. Otherwise unstable.

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 10: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Example of stability

Probability distribution

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 11: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Example of stability

Sample S1

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 12: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Example of stability

Clustering A(S1)

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 13: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Example of stability

Sample S2

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 14: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Example of stability

Clustering A(S2)

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 15: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Example of stability

Clusterings A(S1) and A(S2) are equivalent.

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 16: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Example of instability

Probability distribution

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 17: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Example of instability

Sample S1

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 18: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Example of instability

Clustering A(S1)

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 19: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Example of instability

Sample S2

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 20: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Example of instability

Clustering A(S2)

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 21: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Example of instability

Clusterings A(S1) and A(S2) are different

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 22: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Motivation

Why do people think stability is important?For tuning parameters of clusterings algorithms, such asnumber of clustersTo verify meaningfulness of clustering outputted byalgorithm.

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 23: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Motivation

Why do people think stability is important?For tuning parameters of clusterings algorithms, such asnumber of clustersTo verify meaningfulness of clustering outputted byalgorithm.

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 24: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Motivation

Our intention:Provide theoretical justification.

We discovered:The popular belief is false.

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 25: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Motivation

Our intention:Provide theoretical justification.

We discovered:The popular belief is false.

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 26: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

First example

1D probability distribution

x

Pro

bab

ility

den

sity

50% 50%

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 27: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

First example

2 centers – stable

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 28: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

First example

3 centers – solution #1

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 29: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

First example

3 centers – solution #2 =⇒ unstable

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 30: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

First example

slightly asymmetric distribution

x

Pro

bab

ility

den

sity

(50 + ε)% (50− ε)%

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 31: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

First example

2 centers – stable

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 32: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

First example

3 centers – stable

x

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 33: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Second example

1D probability distribution

x

Pro

bab

ility

den

sity

∼ 90% ∼ 10%

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 34: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Second example

2 centers – unstable

∼ 90% ∼ 10%

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 35: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Second example

3 centers – stable

x

∼ 90% ∼ 10%

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 36: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Our results

TheoremFor a cost based algorithm (e.g. k-means, k-medians):

If the optimization problem has unique optimum, then thealgorithm is stable.If the underlying probability distribution is symmetric andthe optimization problem has multiple symmetric optima,then the algorithm is unstable.

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 37: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Our results

TheoremFor a cost based algorithm (e.g. k-means, k-medians):

If the optimization problem has unique optimum, then thealgorithm is stable.If the underlying probability distribution is symmetric andthe optimization problem has multiple symmetric optima,then the algorithm is unstable.

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 38: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Our results

TheoremFor a cost based algorithm (e.g. k-means, k-medians):

If the optimization problem has unique optimum, then thealgorithm is stable.If the underlying probability distribution is symmetric andthe optimization problem has multiple symmetric optima,then the algorithm is unstable.

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 39: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Conclusion

Stability, contrary to common belief, does not measurevalidity of a clustering or meaningfulness of choice ofnumber of clusters.Instead, it measures the number of solutions to theclustering optimization problem for the underlyingprobability distribution.

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 40: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Open problems

Q: Is symmetry really needed for instability?A: No!

(Work in progress, together with Shai Ben-David & HansUlrich Simon)

Analyze finite sample sizes, and give explicit bounds.

Analyze other types of algorithms e.g. linkage algorithms.

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 41: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Open problems

Q: Is symmetry really needed for instability?A: No!

(Work in progress, together with Shai Ben-David & HansUlrich Simon)

Analyze finite sample sizes, and give explicit bounds.

Analyze other types of algorithms e.g. linkage algorithms.

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 42: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Open problems

Q: Is symmetry really needed for instability?A: No!

(Work in progress, together with Shai Ben-David & HansUlrich Simon)

Analyze finite sample sizes, and give explicit bounds.

Analyze other types of algorithms e.g. linkage algorithms.

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 43: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Open problems

Q: Is symmetry really needed for instability?A: No!

(Work in progress, together with Shai Ben-David & HansUlrich Simon)

Analyze finite sample sizes, and give explicit bounds.

Analyze other types of algorithms e.g. linkage algorithms.

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 44: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 45: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Concrete demonstration of our analysis: k -means

Consider k -means in metric space (X , `).

Given a sample S = {x1, x2, . . . , xm}, we search centersc1, c2, . . . , ck . The k -means algorithm minimizes the empiricalcost

cost(S; c1, c2, . . . , ck ) =1m

∑x∈S

min1≤i≤k

(`(ci , x))2

As m →∞ this converges to the true cost [Ben-David, COLT04]

cost(P; c1, c2, . . . , ck ) = Expx∈P

min1≤i≤k

(`(ci , x))2

Minimizing cost(S; .) is for large samples almost the same asminimizing cost(P; .).

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 46: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Concrete demonstration of our analysis: k -means

Consider k -means in metric space (X , `).

Given a sample S = {x1, x2, . . . , xm}, we search centersc1, c2, . . . , ck . The k -means algorithm minimizes the empiricalcost

cost(S; c1, c2, . . . , ck ) =1m

∑x∈S

min1≤i≤k

(`(ci , x))2

As m →∞ this converges to the true cost [Ben-David, COLT04]

cost(P; c1, c2, . . . , ck ) = Expx∈P

min1≤i≤k

(`(ci , x))2

Minimizing cost(S; .) is for large samples almost the same asminimizing cost(P; .).

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 47: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Concrete demonstration of our analysis: k -means

What happens if the function cost(P; c1, c2, . . . , ck ) has morethan one k -tuple of centers minimizing it?

Instability !

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 48: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Concrete demonstration of our analysis: k -means

What happens if the function cost(P; c1, c2, . . . , ck ) has morethan one k -tuple of centers minimizing it?

Instability !

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 49: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Concrete demonstration of our analysis: k -means

What happens if the function cost(P; c1, c2, . . . , ck ) has morethan one k -tuple of centers minimizing it?

Instability !

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 50: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Example of instability

Searching 2 centers

Probability distribution (perfectly symmetric)

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 51: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Example of instability

Searching 2 centers

Optimal solution #1

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 52: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Example of instability

Searching 2 centers

Optimal solution #2

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability

Page 53: A Sober look at Clustering Stabilitydavid.palenica.com/papers/sober/slides.pdf · A Sober look at Clustering Stability Shai Ben-David1 Ulrike von Luxburg2 Dávid Pál1 1School of

Example of instability

Searching 2 centers

Optimal solution #3

Shai Ben-David, Ulrike von Luxburg, Dávid Pál A Sober look at Clustering Stability