Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2016 Sep 7.
Published in final edited form as: Electron J Stat. 2015 Oct 14;9(2):2324–2347. doi: 10.1214/15-EJS1074

Statistical properties of convex clustering

Kean Ming Tan 1, Daniela Witten 2
PMCID: PMC5014420  NIHMSID: NIHMS813844  PMID: 27617051

Abstract

In this manuscript, we study the statistical properties of convex clustering. We establish that convex clustering is closely related to single linkage hierarchical clustering and k-means clustering. In addition, we derive the range of the tuning parameter for convex clustering that yields a non-trivial solution. We also provide an unbiased estimator of the degrees of freedom, and provide a finite sample bound for the prediction error for convex clustering. We compare convex clustering to some traditional clustering methods in simulation studies.

Keywords: Degrees of freedom, fusion penalty, hierarchical clustering, k-means, prediction error, single linkage

1. Introduction

Let XRn×p be a data matrix with n observations and p features. We assume for convenience that the rows of X are unique. The goal of clustering is to partition the n observations into K clusters, D1, . . . , DK, based on some similarity measure. Traditional clustering methods such as hierarchical clustering, k-means clustering, and spectral clustering take a greedy approach (see, e.g., Hastie, Tibshirani and Friedman, 2009).

In recent years, several authors have proposed formulations for convex clustering (Pelckmans et al., 2005; Hocking et al., 2011; Lindsten, Ohlsson and Ljung, 2011; Chi and Lange, 2014a). Chi and Lange (2014a) proposed efficient algorithms for convex clustering. In addition, Radchenko and Mukherjee (2014) studied the theoretical properties of a closely related problem to convex clustering, and Zhu et al. (2014) studied the condition needed for convex clustering to recover the correct clusters.

Convex clustering of the rows, X1., . . . , Xn., of a data matrix X involves solving the convex optimization problem

minimizeURn×p12i=1nXi.Ui.22+λQq(U), (1)

where Qq(U)=i<iUi.Ui.q for q ∈ {1, 2, ∞}. The penalty Qq(U) generalizes the fused lasso penalty proposed in Tibshirani et al. (2005), and encourages the rows of Û, the solution to (1), to take on a small number of unique values. On the basis of Û, we define the estimated clusters as follows.

Definition 1

The ith and i′th observations are estimated by convex clustering to belong to the same cluster if and only if Ûi. = Ûi′..

The tuning parameter λ controls the number of unique rows of Û, i.e., the number of estimated clusters. When λ = 0, Û = X, and so each observation belongs to its own cluster. As λ increases, the number of unique rows of Û will decrease. For sufficiently large λ, all rows of Û will be identical, and so all observations will be estimated to belong to a single cluster. Note that (1) is strictly convex, and therefore the solution Û is unique.

To simplify our analysis of convex clustering, we rewrite (1). Let x=vec(X)Rnp and let u=vec(U)Rnp, where the vec(·) operator is such that x(i–1)p+j = Xij and u(i–1)p+j = Uij. Construct DR[p(n2)]×np, and define the index set C(i,i) such that the p × np submatrix DC(i,i) satisfies DC(i,i)u=UiUi. Furthermore, for a vector bRp(n2), we define

Pq(b)=i<ibC(i,i)q. (2)

Thus, we have Pq(Du)=i<iDC(i,i)uq=i<iUi.Ui.q=Qq(U). Problem (1) can be rewritten as

minimizuRnp12xu22+λPq(Du). (3)

When q = 1, (3) is an instance of the generalized lasso problem studied in Tibshirani and Taylor (2011). Let û be the solution to (3). By Definition 1, the ith and i′th observations belong to the same cluster if and only if DC(i,i)u^=0. In what follows, we work with (3) instead of (1) for convenience.

Let DRnp×[p(n2)] be the Moore-Penrose pseudo-inverse of D. We state some properties of D and D that will prove useful in later sections.

Lemma 1

The matrices D and D have the following properties.

  • (i)

    rank(D) = p(n – 1).

  • (ii)

    D=1nDT.

  • (iii)

    (DTD)DT = D and (DDT)D = (DT).

  • (iv)

    D(DTD)DT=1nDDT is a projection matrix onto the column space of D.

  • (v)

    Define Λmin(D) and Λmax(D) as the minimum non-zero singular value and maximum singular value of the matrix D, respectively. Then, Λmin(D) = Λmax(D) = √n.

In this manuscript, we study the statistical properties of convex clustering. In Section 2, we study the dual problem of (3) and use it to establish that convex clustering is closely related to single linkage hierarchical clustering. In addition, we establish a connection between k-means clustering and convex clustering. In Section 3, we present some properties of convex clustering. More specifically, we characterize the range of the tuning parameter λ in (3) such that convex clustering yields a non-trivial solution. We also provide a finite sample bound for the prediction error, and an unbiased estimator of the degrees of freedom for convex clustering. In Section 4, we conduct numerical studies to evaluate the empirical performance of convex clustering relative to some existing proposals. We close with a discussion in Section 5.

2. Convex clustering, single linkage hierarchical clustering, and k-means clustering

In Section 2.1, we study the dual problem of convex clustering (3). Through its dual problem, we establish a connection between convex clustering and single linkage hierarchical clustering in Section 2.2. We then show that convex clustering is closely related to k-means clustering in Section 2.3.

2.1. Dual problem of convex clustering

We analyze convex clustering (3) by studying its dual problem. Let s, q ∈ {1, 2, ∞} satisfy 1s+1q=1. For a vector bRp(n2), let Pq(b) denote the dual norm of Pq(b), which takes the form

Pq(b)=maxi<ibC(i,i)s. (4)

We refer the reader to Chapter 6 in Boyd and Vandenberghe (2004) for an overview of the concept of duality.

Lemma 2

The dual problem of convex clustering (3) is

minimizeνR[p(n2)]12xDTν22subject toPq(ν)λ, (5)

where νR[p(n2)] is the dual variable. Furthermore, let û and ν^ be the solutions to (3) and (5), respectively. Then,

Du^=DxDDTν^. (6)

While (3) is strictly convex, its dual problem (5) is not strictly convex, since D is not of full rank by Lemma 1(i). Therefore, the solution ν^ to (5) is not unique. Lemma 1(iv) indicates that 1nDDT is a projection matrix onto the column space of D. Thus, the solution in (6) can be interpreted as the difference between Dx, the pairwise difference between rows of X, and the projection of a dual variable onto the column space of D.

We now consider a modification to the convex clustering problem (3). Recall from Definition 1 that the ith and i'th observations are in the same estimated cluster if DC(i,i)u^=0. This motivates us to estimate γ = Du directly by solving

minimizeγR[p(n2)]12Dxγ22+λPq(γ). (7)

We establish a connection between (3) and (7) by studying the dual problem of (7).

Lemma 3

The dual problem of (7) is

minimizeνR[p(n2)]12Dxν22subject toPq(ν)λ, (8)

where νR[p(n2)] is the dual variable. Furthermore, let γ^ and ν^ be the solutions to (7) and (8), respectively. Then,

γ^=Dxν^. (9)

Comparing (6) and (9), we see that the solutions to convex clustering (3) and the modified problem (7) are closely related. In particular, both in (6) and γ^ in (9) involve taking the difference between Dx and some function of a dual variable that has Pq() norm less than or equal to λ. The main difference is that in (6), the dual variable is projected into the column space of D.

Problem (7) is quite simple, and in fact it amounts to a thresholding operation on Dx when q = 1 or q = 2, i.e., the solution γ^ is obtained by performing soft thresholding on Dx, or group soft thresholding on DC(i,i)x for all i < i′, respectively (Bach et al., 2011). When q = ∞, an efficient algorithm was proposed by Duchi and Singer (2009).

2.2. Convex clustering and single linkage hierarchical clustering

In this section, we establish a connection between convex clustering and single linkage hierarchical clustering. Let γ^q be the solution to (7) with Pq(·) norm and let s, q ∈ {1, 2, ∞} satisfy 1s+1q=1. Since (7) is separable in γC(i,i) for all i < i′, by Lemma 2.1 in Haris, Witten and Simon (2015), it can be verified that

γ^C(i,i)q=0if and only ifXi.Xi.sλ. (10)

It might be tempting to conclude that a pair of observations (i, i′) belong to the same cluster if γ^C(i,i)q=0. However, by inspection of (10), it could happen that γ^C(i,i)q=0 and γ^C(i,i)q=0, but γ^C(i,i)q0.

To overcome this problem, we define the n × n adjacency matrix Aq(λ) as

[Aq(λ)]ii={1ifi=i,1ifγ^C(i,i)q=0,0ifγ^C(i,i)q0.} (11)

Subject to a rearrangement of the rows and columns, Aq(λ) is a block-diagonal matrix with some number of blocks, denoted as R. On the basis of Aq(λ), we define R estimated clusters: the indices of the observations in the rth cluster are the same as the indices of the observations in the rth block of Aq(λ).

We now present a lemma on the equivalence between single linkage hierarchical clustering and the clusters identified by (7) using (11). The lemma follows directly from the definition of single linkage clustering (see, for instance, Chapter 3.2 of Jain and Dubes, 1988).

Lemma 4

Let Ê1, . . . , ÊR index the blocks within the adjacency matrix Aq(λ). Let s satisfy 1s+1q=1. Let D̂1, . . . , D̂K denote the clusters that result from performing single linkage hierarchical clustering on the dissimilarity matrix defined by the pairwise distance between the observations ∥Xi.Xi′s, and cutting the dendrogram at the height of λ > 0. Then K = R, and there exists a permutation π : {1, . . . , K} → {1, . . . , K} such that Dk = Eπ(k) for k = 1, . . . , K.

In other words, Lemma 4 implies that single linkage hierarchical clustering and (7) yield the same estimated clusters. Recalling the connection between (3) and (7) established in Section 2.1, this implies a close connection between convex clustering and single linkage hierarchical clustering.

2.3. Convex clustering and k-means clustering

We now establish a connection between convex clustering and k-means clustering. k-means clustering seeks to partition the n observations into K clusters by minimizing the within cluster sum of squares. That is, the clusters are given by the partition 1, . . . , K of {1, . . . , n} that solves the optimization problem

minimizeμ1,,μKRp,D1,,DKk=1KiDkXi.μk22. (12)

We consider convex clustering (1) with q = 0,

minimizeURn×p12i=1nXi.Ui.22+λi<iI(Ui.Ui.), (13)

where I(Ui.Ui.) is an indicator function that equals one if Ui.Ui′.. Note that (13) is no longer a convex optimization problem.

We now establish a connection between (12) and (13). For a given value of λ, (13) is equivalent to

minimizeURn×p,K,μ1,,μKRp,E1,,EK12k=1KiEkXi.μk22+λi<ik=1KI(iEk,iEk), (14)

subject to the constraint that {μ1, . . . , μK} are the unique rows of U and Ek = {i : Ui. = μk}. Note that I(iEk,iEk) is an indicator function that equals to one if iEk and iEk. Thus, we see from (12) and (14) that k-means clustering is equivalent to convex clustering with q = 0, up to a penalty term λi<ik=1KI(iEk,iEk).

To interpret the penalty term, we consider the case when there are two clusters E1 and E2. The penalty term reduces to λ|E1| · (n – |E1|), where |E1| is the cardinality of the set E1. The term λ|E1| · (n – |E1|) is minimized when |E1| is either 1 or n – 1, encouraging one cluster taking only one observation. Thus, compared to k-means clustering, convex clustering with q = 0 has the undesirable behavior of producing clusters whose sizes are highly unbalanced.

3. Properties of convex clustering

We now study the properties of convex clustering (3) with q ∈ {1, 2}. In Section 3.1, we establish the range of the tuning parameter λ in (3) such that convex clustering yields a non-trivial solution with more than one cluster. We provide finite sample bounds for the prediction error of convex clustering in Section 3.2. Finally, we provide unbiased estimates of the degrees of freedom for convex clustering in Section 3.3.

3.1. Range of λ that yields non-trivial solution

In this section, we establish the range of the tuning parameter λ such that convex clustering (3) yields a solution with more than one cluster.

Lemma 5

Let

λupper{minω1nDx+(I1nDDT)ωforq=1,minω{maxi<i{(1nDx+(I1nDDT)ω)C(i,i)2}}forq=2.} (15)

Convex clustering (3) with q = 1 or q = 2 yields a non-trivial solution of more than one cluster if and only if λ < λupper.

By Lemma 5, we see that calculating λupper boils down to solving a convex optimization problem. This can be solved using a standard solver such as CVX in MATLAB. In the absence of such a solver, a loose upper bound on λupper is given by 1nDx for q = 1, or maxi<i1nDC(i,i)x2 for q = 2.

Therefore, to obtain the entire solution path of convex clustering, we need only consider values of λ that satisfy λλupper.

3.2. Bounds on prediction error

In this section, we assume the model x = u + ϵ, where ϵRnp is a vector of independent sub-Gaussian noise terms with mean zero and variance σ2, and u is an arbitrary np-dimensional mean vector. We refer the reader to pages 24-25 in Boucheron, Lugosi and Massart (2013) for the properties of sub-Gaussian random variables. We now provide finite sample bounds for the prediction error of convex clustering (3). Let λ be the tuning parameter in (3) and let λ=λnp.

Lemma 6

Suppose that x = u + ϵ, where ϵRnp and the elements of ϵ are independent sub-Gaussian random variables with mean zero and variance σ2. Let û be the estimate obtained from (3) with q = 1. If λ4σlog(p(n2))n3p2, then

12npu^u223λ2Du1+σ2[1n+log(np)n2p]

holds with probability at least 12p(n2)exp{min(c1log(np),c2plog(np))}, where c1 and c2 are positive constants appearing in Lemma 10.

We see from Lemma 6 that the average prediction error is bounded by the oracle quantity ∥Du1 and a second term that decays to zero as n, p → ∞. Convex clustering with q = 1 is prediction consistent only if λ′∥Du1 = o (1). We now provide a scenario for which λ′∥Du1 = o (1) holds.

Suppose that we are in the high-dimensional setting in which p > n and the true underlying clusters differ only with respect to a fixed number of features (Witten and Tibshirani, 2010). Also, suppose that each element of Du — that is, UijUi′j — is of order O(1). Therefore, ∥Du1 = O(n2), since by assumption only a fixed number of features have different means across clusters. Assume that nlog(p(n2))p2=o(1). Under these assumptions, convex clustering with q = 1 is prediction consistent.

Next, we present a finite sample bound on the prediction error for convex clustering with q = 2.

Lemma 7

Suppose that x = u + ϵ, where ϵRnp and the elements of ϵ are independent sub-Gaussian random variables with mean zero and variance σ2. Let û be the estimate obtained from (3) with q = 2. If λ4σlog(p(n2))n3p, then

12npu^u223λ2i<iDC(i,i)u2+σ2[1n+log(np)n2p]

holds with probability at least 12p(n2)exp{min(c1log(np),c2plog(np))}, where c1 and c2 are positive constants appearing in Lemma 10.

Under the scenario described above, DC(i,i)u2=O(1), and therefore i<iDC(i,i)u2=O(n2). Convex clustering with q = 2 is prediction consistent if nlog(p(n2))p=o(1).

3.3. Degrees of freedom

Convex clustering recasts the clustering problem as a penalized regression problem, for which the notion of degrees of freedom is established (Efron, 1986). Under this framework, we provide an unbiased estimator of the degrees of freedom for clustering. Recall that û is the solution to convex clustering (3). Suppose that Var(x) = σ2I. Then, the degrees of freedom for convex clustering is defined as 1σ2j=1npCov(u^j,xj) (see, e.g., Efron, 1986). An unbiased estimator of the degrees of freedom for convex clustering with q = 1 follows directly from Theorem 3 in Tibshirani and Taylor (2012).

Lemma 8

Assume that x ~ MVN(u, σ2I), and let û be the solution to (3) with q = 1. Furthermore, let B^1={j:(Du^)j0}. We define the matrix DB^1 by removing the rows of D that correspond to B^1. Then

d^f1=tr(IDB^1T(DB^1DB^1T)DB^1) (16)

is an unbiased estimator of the degrees of freedom of convex clustering with q = 1.

The following corollary follows directly from Corollary 1 in Tibshirani and Taylor (2011).

Corollary 1

Assume that x ~ MVN(u, σ2I), and let û be the solution to (3) with q = 1. The fit û has degrees of freedom

df1(u^)=E[number of unique elements inu^].

There is an interesting interpretation of the degrees of freedom estimator for convex clustering with q = 1. Suppose that there are K estimated clusters, and all elements of the estimated means corresponding to the K estimated clusters are unique. Then the degrees of freedom is Kp, the product of the number of estimated clusters and the number of features.

Next, we provide an unbiased estimator of the degrees of freedom for convex clustering with q = 2.

Lemma 9

Assume that x ~ MVN(u, σ2I), and let û be the solution to (3) with q = 2. Furthermore, let B^2={(i,i):DC(i,i)u^20}. We define the matrix DB^2 by removing rows of D that correspond to B^2. Let P=(IDB^2T(DB^2DB^2T)DB^2) be the projection matrix onto the complement of the space spanned by the rows of DB^2. Then

d^f2=tr([I+λP(i,i)B^2(DC(i,i)TDC(i,i)DC(i,i)u^2DC(i,i)TDC(i,i)u^u^TDC(i,i)TDC(i,i)DC(i,i)u^23)]1P) (17)

is an unbiased estimator of the degrees of freedom of convex clustering with q = 2.

When λ = 0, DC(i,i)u^20 for all i < i′. Therefore, P=IRnp×np and the degrees of freedom estimate is equal to tr(I) = np. When λ is sufficiently large that B^2 is an empty set, one can verify that P = IDT (DDT)D is a projection matrix of rank p, using the fact that rank(D) = p(n – 1) from Lemma 1(i). Therefore d̂f2 = tr(P) = p.

We now assess the accuracy of the proposed unbiased estimators of the degrees of freedom. We simulate Gaussian clusters with K = 2 as described in Section 4.1 with n = p = 20 and σ = 0.5. We perform convex clustering with q = 1 and q = 2 across a fine grid of tuning parameters λ. For each λ, we compare the quantities (16) and (17) to

1σ2j=1np(u^juj)(xjuj), (18)

which is an unbiased estimator of the true degrees of freedom, 1σ2j=1npCov(u^j,xj), averaged over 500 data sets. In addition, we plot the point-wise intervals of the estimated degrees of freedom (mean ± 2 × standard deviation). Note that (18) cannot be computed in practice, since it requires knowledge of the unknown quantity u. Results are displayed in Figure 1. We see that the estimated degrees of freedom are quite close to the true degrees of freedom.

Fig 1.

Fig 1

We compare the true degrees of freedom of convex clustering (x-axis), given in (18), to the proposed unbiased estimators of the degrees of freedom (y-axis), given in Lemmas 8 and 9. Panels (a) and (b) contain the results for convex clustering with q = 1 and q = 2, respectively. The red line is the mean of the estimated degrees of freedom for convex clustering over 500 data sets, obtained by varying the tuning parameter λ. The shaded bands indicate the point-wise intervals of the estimated degrees of freedom (mean ± 2 × standard deviation), over 500 data sets. The black line indicates y = x.

4. Simulation studies

We compare convex clustering with q = 1 and q = 2 to the following proposals:

  1. Single linkage hierarchical clustering with the dissimilarity matrix defined by the Euclidean distance between two observations.

  2. The k-means clustering algorithm (Lloyd, 1982).

  3. Average linkage hierarchical clustering with the dissimilarity matrix defined by the Euclidean distance between two observations.

We apply convex clustering (3) with q = {1, 2} using the R package cvxclustr (Chi and Lange, 2014b). In order to obtain the entire solution path for convex clustering, we use a fine grid of λ values for (3), in a range guided by Lemma 5. We apply the other methods by allowing the number of clusters to vary over a range from 1 to n clusters. To evaluate and quantify the performance of the different clustering methods, we use the Rand index (Rand, 1971). A high value of the Rand index indicates good agreement between the true and estimated clusters.

We consider two different types of clusters in our simulation studies: Gaussian clusters and non-convex clusters.

4.1. Gaussian clusters

We generate Gaussian clusters with K = 2 and K = 3 by randomly assigning each observation to a cluster with equal probability. For K = 2, we create the mean vectors μ1 = 1p and μ2 = −1p. For K = 3, we create the mean vectors μ1 = −3 · 1p, μ2 = 0p, and μ3 = 3 · 1p. We then generate the n × p data matrix X according to Xi. ~ MVN(μk, σ2I) for iDk. We consider n = p = 30 and σ = {1, 2}. The Rand indices for K = 2 and K = 3, averaged over 200 data sets, are summarized in Figures 2 and 3, respectively.

Fig 2.

Fig 2

Simulation results for Gaussian clusters with K = 2, n = p = 30, averaged over 200 data sets, for two noise levels σ = {1, 2}. Colored lines correspond to single linkage hierarchical -clustering (Inline graphic), average linkage hierarchical clustering (Inline graphic), k-means clustering (1074i03), convex clustering with q = 1 (Inline graphic), and convex clustering with q = 2 (Inline graphic).

Fig 3.

Fig 3

Simulation results for Gaussian clusters with K = 3, n = p = 30, averaged over 200 data sets, for two noise levels σ = {1, 2}. Line types are as described in Figure 2.

Recall from Section 2.2 that there is a connection between convex clustering and single linkage clustering. However, we note that the two clustering methods are not equivalent. From Figure 2(a), we see that single linkage hierarchical clustering performs very similarly to convex clustering with q = 2 when the signal-to-noise ratio is high. However, from Figure 2(b), we see that single linkage hierarchical clustering outperforms convex clustering with q = 2 when the signal-to-noise ratio is low.

We also established a connection between convex clustering and k-means clustering in Section 2.3. From Figure 2(a), we see that k-means clustering and convex clustering with q = 2 perform similarly when two clusters are estimated and the signal-to-noise ratio is high. In this case, the first term in (14) can be made extremely small if the clusters are correctly estimated, and so both k-means and convex clustering yield the same (correct) cluster estimates. In contrast, when the signal-to-noise ratio is low, the first term in (14) is relatively large regardless of whether or not the clusters are correctly estimated, and so convex clustering focuses on minimizing the penalty term in (14). Therefore, when convex clustering with q = 2 estimates two clusters, one cluster is of size one and the other is of size n – 1, as discussed in Section 2.3. Figure 2(b) illustrates this phenomenon when both methods estimate two clusters: convex clustering with q = 2 has a Rand index of approximately 0.5 while k-means clustering has a Rand index of one.

All methods outperform convex clustering with q = 1. Moreover, k-means clustering and average linkage hierarchical clustering outperform single linkage hierarchical clustering and convex clustering when the signal-to-noise ratio is low. This suggests that the minimum signal needed for convex clustering to identify the correct clusters may be larger than that of average linkage hierarchical clustering and k-means clustering. We see similar results for the case when K = 3 in Figure 3.

4.2. Non-convex clusters

We consider two types of non-convex clusters: two circles clusters (Ng, Jordan and Weiss, 2002) and two half-moon clusters (Hocking et al., 2011; Chi and Lange, 2014a). For two circles clusters, we generate 50 data points from each of the two circles that are centered at (0, 0) with radiuses two and 10, respectively. We then add Gaussian random noise with mean zero and standard deviation 0.1 to each data point. For two half-moon clusters, we generate 50 data points from each of the two half-circles that are centered at (0, 0) and (30, 3) with radius 30, respectively. We then add Gaussian random noise with mean zero and standard deviation one to each data point. Illustrations of both types of clusters are given in Figure 4. The Rand indices for both types of clusters, averaged over 200 data sets, are summarized in Figure 5.

Fig 4.

Fig 4

Illustrations of two circles clusters and two half-moons clusters with n = 100.

Fig 5.

Fig 5

Simulation results for the two circles and two half-moons clusters with n = 100, averaged over 200 data sets. Line types are as described in Figure 2.

We see from Figure 5 that convex clustering with q = 2 and single linkage hierarchical clustering have similar performance, and that they outperform all of the other methods. Single linkage hierarchical clustering is able to identify non-convex clusters since it is an agglomerative algorithm that merges the closest pair of observations not yet belonging to the same cluster into one cluster. In contrast, average linkage hierarchical clustering and k-means clustering are known to perform poorly on identifying non-convex clusters (Ng, Jordan and Weiss, 2002; Hocking et al., 2011). Again, convex clustering with q = 1 has the worst performance.

4.3. Selection of the tuning parameter λ

Convex clustering (3) involves a tuning parameter λ, which determines the estimated number of clusters. Some authors have suggested a hold-out validation approach to select tuning parameters for clustering problems (see, for instance, Tan and Witten, 2014; Chi, Allen and Baraniuk, 2014). In this section, we present an alternative approach for selecting λ using the unbiased estimators of the degrees of freedom derived in Section 3.3.

The Bayesian Information Criterion (BIC) developed in Schwarz (1978) has been used extensively for model selection. However, it is known that the BIC does not perform well unless the number of observations is far larger than the number of parameters (Chen and Chen, 2008, 2012). For convex clustering (3), the number of observations is equal to the number of parameters. Thus, we consider the extended BIC (Chen and Chen, 2008, 2012), defined as

eBICq,γ=nplog(RSSqnp)+d^fqlog(np)+2γd^fqlog(np), (19)

where RSSq=xu^q22,u^q is the convex clustering estimate for a given value of q and λ, γ ∈ [0, 1], and d̂fq is given in Section 3.3. Note that we suppress the dependence of ûq and d̂fq on λ for notational convenience. We see that when γ = 0, the extended BIC reduces to the classical BIC.

To evaluate the performance of the extended BIC in selecting the number of clusters, we generate Gaussian clusters with K = 2 and K = 3 as described in Section 4.1, with n = p = 20, and σ = 0.5. We perform convex clustering with q = 2 over a fine grid of λ, and select the value of λ for which the quantity eBICq,γ is minimized. We consider γ ∈ {0, 0.5, 0.75, 1}. Table 1 reports the proportion of datasets for which the correct number of clusters was identified, as well as the average Rand index.

Table 1.

Simulation study to evaluate the performance of the extended BIC for tuning parameter selection for convex clustering with q = 2. Results are reported over 100 simulated data sets. We report the proportion of data sets for which the correct number of clusters was identified, and the average Rand index.

eBIC2,γ Correct number of clusters Rand index
Gaussian clusters, K = 2 γ = 0 0.94 0.9896
γ = 0.5 0.98 0.9991
γ = 0.75 0.99 0.9995
γ =1 0.99 0.9995

Gaussian clusters, K = 3 γ = 0 0.06 0.7616
γ = 0.5 0.59 0.9681
γ = 0.75 0.70 0.9768
γ =1 0.84 0.9873

From Table 1, we see that the extended BIC is able to select the true number of clusters accurately for K = 2. When K = 3, the classical BIC (γ = 0) fails to select the true number of clusters. In contrast, the extended BIC with γ = 1 has the best performance.

5. Discussion

Convex clustering recasts the clustering problem into a penalized regression problem. By studying its dual problem, we show that there is a connection between convex clustering and single linkage hierarchical clustering. In addition, we establish a connection between convex clustering and k-means clustering. We also establish several statistical properties of convex clustering. Through some numerical studies, we illustrate that the performance of convex clustering may not be appealing relative to traditional clustering methods, especially when the signal-to-noise ratio is low.

Many authors have proposed a modification to the convex clustering problem (1),

minimizeURn×p12i=1nXi.Ui.22+λQq(W,U), (20)

where W is an n × n symmetric matrix of positive weights, and Qq(W,U)=i<iWiiUi.Ui.q (Pelckmans et al., 2005; Hocking et al., 2011; Lindsten, Ohlsson and Ljung, 2011; Chi and Lange, 2014a). For instance, the weights can be defined as Wii=exp(ϕXi.Xi.22) for some constant ϕ > 0. This yields better empirical performance than (1) (Hocking et al., 2011; Chi and Lange, 2014a). We leave an investigation of the properties of (20) to future work.

Acknowledgments

We thank Ashley Petersen, Ali Shojaie, and Noah Simon for helpful conversations on earlier drafts of this manuscript. We thank the editor and two reviewers for helpful comments that improved the quality of this manuscript. D. W. was partially supported by a Sloan Research Fellowship, NIH Grant DP5OD009145, and NSF CAREER DMS-1252624.

Appendix A: Proof of Lemmas 2–3

Proof of Lemma 2

We rewrite problem (3) as

minimizeuRnp,η1R[p(n2)]12xu22+λPq(η1)subject toη1=Du,

with the Lagrangian function

L(u,η1,ν)12xu22+λPq(η1)+νT(Duη1), (A-1)

where νR[p(n2)] is the Lagrangian dual variable. In order to derive the dual problem, we need to minimize the Lagrangian function over the primal variables u and η1. Recall from (4) that Pq() is the dual norm of Pq(). It can be shown

infη1R[p(n2)]L(u,η1,ν)={12xu22+νTDuifPq(ν)λ,otherwise,}

and

infη1R[p(n2)],uRnpL(u,η1,ν)={12xDTν22+12x22ifPq(νλ.otherwise.}

Therefore, the dual problem for (3) is

minimizeνR[p(n2)]12xDTν22subject toPq(ν)λ. (A-2)

We now establish an explicit relationship between the solution to convex clustering and its dual problem. differentiating the Lagrangian function (A-1) with respect to u and setting it equal to zero, we obtain

u^=xDTν^,

where ν^ is the solution to the dual problem, which satisfies Pq(ν^)λ by (A-2). Multiplying both sides by D, we obtain the relationship (6).

Proof of Lemma 3

We rewrite (7) as

minimizeγR[p(n2)],η2R[p(n2)]12Dxγ22+λPq(η2)subject toη2=γ,

with the Lagrangian function

L(γ,η2,ν)=12Dxγ22+λPq(η2)+(ν)T(γη2), (A-3)

where νR[p(n2)] is the Lagrangian dual variable. In order to derive the dual problem, we minimize the Lagrangian function over the primal variables γ and η2. It can be shown that

infη2R[p(n2)]L(γ,η2,ν)={12Dxγ22+(ν)TγifPq(ν)λ,otherwise,}

and

infη2R[p(n2)],γR[p(n2)]L(γ,η2,ν)={12Dxν22+12Dx22ifPq(ν)λ.otherwise.}

Therefore, the dual problem for (7) is

minimizeνR[p(n2)]12Dxν22subject toPq(ν)λ. (A-4)

We now establish an explicit relationship between the solution to (7) and its dual problem. Differentiating the Lagrangian function (A-3) with respect to γ and setting it equal to zero, we obtain

γ^=Dxν^,

where ν^ is the solution to the dual problem, which we know from (A-4) satisfies Pq(ν^)λ.

Appendix B: Proof of Lemma 5

Proof of Lemma 5

Since D is not of full rank by Lemma 1(i), the solution to (5) in the absence of constraint is not unique, and takes the form

ν^=(DDT)Dx+(ID(DTD)DT)ω=(DT)x+(IDD)ω=1nDx+(I1nDDT)ω, (B-1)

for ωR[p(n2)]. The second equality follows from Lemma 1(iii) and the last equality follows from Lemma 1(ii).

Let û be the solution to (3). Substituting ν^ given in (B-1) into (6), we obtain

Du^=DxDDTν^=Dx1nDDTDxDDTω+1nDDTDDTω=DxDxDDTω+DDTω=0.

Recall from Definition 1 that all observations are estimated to belong to the same cluster if = 0. For any ν^ in (B-1), picking λ=Pq(ν^)) guarantees that the constraint on the dual problem (5) is inactive, and therefore that convex clustering has a trivial solution of = 0.

Since ν^ is not unique, Pq(ν^) is not unique. In order to obtain the smallest tuning parameter λ such that = 0, we take

λupperminωR[p(n2)]Pq(1nDx+(I1nDDT)ω).

Any tuning parameter λλupper results in an estimate for which all observations belong to a single cluster. The proof is completed by recalling the definition of the dual norm Pq() in (4).

Appendix C: Proof of Lemmas 6–7

To prove Lemmas 6 and 7, we need a lemma on the tail bound for quadratic forms of independent sub-Gaussian random variables.

Lemma 10

(Hanson and Wright, 1971) Let z be a vector of independent sub-Gaussian random variables with mean zero and variance σ2. Let M be a symmetric matrix. Then, there exists some constants c1, c2 > 0 such that for any t > 0,

Pr(zTMzt+σ2tr(M))exp{min(c1t2σ4MF,c2tσ2Msp)},

where ∥ · ∥F and ∥ · ∥sp are the Frobenius norm and spectral norm, respectively.

In order to simplify our analysis, we start by reformulating (3) as in Liu, Yuan and Ye (2013). Let D=AΛVβT be the singular value decomposition of D, where AR[p(n2)]×p(n1),ΛRp(n1)×p(n1), and VβRnp×p(n1). Construct VαRnp×p such that V=[Vα,Vβ]Rnp×np is an orthogonal matrix, that is, VTV = VVT = I. Note that VαTVβ=0.

Let β=VβTuRp(n1) and α=VαTuRp. Also, let λ=λnp. Optimization problem (3) then becomes

minimizeαRp,βRp(n1)12npxVααVββ2+λPq(Zβ), (C-1)

where Z=AΛR[p(n2)]×p(n1). Note that rank(Z) = p(n – 1) and therefore, there exists a pseudo-inverse ZRp(n1)×[p(n2)] such that ZZ = I. Recal from Section 1 that the set C(i,i) contains the row indices of D such that DC(i,i)u=Ui.Ui.. Let the submatrices ZC(i,i) and ZC(i,i) denote the rows of Z and the columns of Z, respectively, corresponding to the indices in the set C(i,i). By Lemma 1(v),

Λmin(Z)=Λmin(D)=1Λmax(Z)=nΛmax(Z)=Λmax(D)=1Λmin(Z)=n. (C-2)

Let α^ and β^ denote the solution to (C-1).

Proof of Lemma 6

We establish a finite sample bound for the prediction error of convex clustering with q = 1 by analyzing (C-1). First, note that u^=Vαα^+Vββ^ and u=Vαα+Vββ. Thus, 12npu^u2=12npVα(α^α)+Vβ(β^β)2. Recall from (2) that P1(Zβ) = ∥Zβ1. By the definition of α^ and β^, we have

12npx(Vαα^+Vββ^)2+λZβ^112npx(Vαα+Vββ)2+λZβ1,

implying

12npVα(α^α)+Vβ(β^β)2+λZβ^11npG(α^,β^)+λZβ1, (C-3)

where G(α^,β^)=ϵT[Vα(α^α)+Vβ(β^β)]. Recall that VαTVα=I and VαTVβ=0. By the optimality condition of (C-1),

α^=VαT(xVββ^)=VαT(Vαα+Vββ+ϵVββ^)=α+VαTϵ.

Therefore, substituting α^α=VαTϵ into G(α^,β^), we obtain

1npG(α^,β^)=1npϵT[Vα(α^α)+Vβ(β^β)]=1npϵTVαVαTϵ+ϵTVβ(β^β)1npϵTVαVαTϵ+1npϵTVβ(β^β)=1npϵTVαVαTϵ+1npϵTVβZZ(β^β)1npϵTVαVαTϵ+1npϵTVβZZ(β^β)1.

We now establish bounds for 1npϵTVαVαTϵ and 1npϵTVβZ that hold with high probability.

Bound for 1npϵTVαVαTϵ

First, note that VαVαT is a projection matrix of rank p, and therefore VαVαTsp=1 and VαVαTF=p. By Lemma 10 and taking z = ϵ and M=VαVαT, we have that

Pr(ϵTVαVαTϵt+σ2p)exp{min(c1t2σ4p,c2tσ2)},

where c1 and c2 are constants in Lemma 10. Picking t=σ2plog(np), we have

Pr(1npϵTVαVαTϵσ2[1n+log(np)n2p])exp{min(c1log(np),c2plog(np))}. (C-4)

Bound for 1npϵTVβZ

Let ej be a vector of length p(n2) with a one in the jth entry and zeroes in the remaining entries. Let vj=ejT(Z)TVβTϵ. Using the fact that Λmax(Vβ) = 1 and Λmax(Z)=1n (C-2), we know that each vj is a sub-Gaussian random variable with zero mean and variance at most σ2n. Therefore, by the union bound,

Pr(maxjvjz)p(n2)Pr(vjz)2p(n2)exp(nz22σ2).

Picking z=2σlog(p(n2))n, we obtain

Pr(ϵTVβZ2σlog(p(n2))n)2p(n2). (C-5)

Combining the two upper bounds

Setting λ>4σlog(p(n2))n3p2 and combining the results from (C-4) and (C-5), we obtain

1npG(α^,β^)σ2[1n+log(np)n2p]+λ2Z(β^β)1 (C-6)

with probability at least 12p(n2)exp{min(c1log(np),c2plog(np))}. Substituting (C-6) into (C-3), we obtain

12npVα(α^α)+Vβ(β^β)2+λZβ^1σ2[1n+log(np)n2p]+λ2Z(β^β)1+λZβ1.

We get Lemma 6 by an application of the triangle inequality and by rearranging the terms.

Proof of Lemma 7

We establish a finite sample bound for the prediction error of convex clustering with q = 2 by analyzing (C-1). Recall from (2) that P2(Zβ)=i<iZC(i,i)β2. By the definition of α^ and β^, we have

12npx(Vαα^+Vββ^)2+λi<iZC(i,i)β^212npx(Vαα+Vββ)2+λi<iZC(i,i)β2,

implying

12npVα(α^α)+Vβ(β^β)2+λi<iZC(i,i)β^21npG(α^,β^)+λi<iZC(i,i)β2, (C-7)

where G(α^,β^)=ϵT[Vα(α^α)+Vβ(β^β)]. Again, by the optimality condition of (C-1), we have that α^α=VαTϵ. Substituting this into 1npG(α^,β^), we obtain

1npG(α^,β^)=1npϵT[Vα(α^α)+Vβ(β^β)]=1npϵTVαVαTϵ+ϵTVβ(β^β)1npϵTVαVαTϵ+1npϵTVβ(β^β)=1npϵTVαVαTϵ+1npϵTVβZZ(β^β)=1npϵTVαVαTϵ+1npi<i(ϵTVβZC(i,i))(ZC(i,i)(β^β))1npϵTVαVαTϵ+1npi<i(ϵTVβZC(i,i))(ZC(i,i)(β^β))1npϵTVαVαTϵ+1npi<iϵTVβZC(i,i)2ZC(i,i)(β^β)21npϵTVαVαTϵ+1npmaxi<iϵTVβZC(i,i)2i<iZC(i,i)(β^β)2,

where the second inequality follows from an application of the triangle inequality and the third inequality from an application of the Cauchy-Schwarz inequality. We now establish bounds for 1npϵTVαVαTϵ and 1npmaxi<iϵTVβZC(i,i)2 that hold with large probability.

Bound for 1npϵTVαVαTϵ

This is established in the proof of Lemma 6 in (C-4), i.e.,

Pr(1npϵTVαVαTϵσ2[1n+log(np)n2p])1np.

Bound for 1npmaxi<iϵTVβZC(i,i)2

First, note that there are p indices in each set C(i,i). Therefore,

ϵTVβZC(i,i)2pϵTVβZC(i,i).

Note that

1npmaxi<iϵTVβZC(i,i)21n2pmaxi<iϵTVβZC(i,i)=1n2pϵTVβZ. (C-8)

Therefore, using (C-8),

Pr(1npmaxi<iϵTVβZC(i,i)22σlog(p(n2))n3p)Pr(ϵTVβZ2σlog(p(n2))n)2p(n2), (C-9)

where the last inequality follows from (C-5) in the proof of Lemma 6.

Therefore, for λ>4σlog(p(n2))n3p, we have λ2<1npmaxi<iϵTVβZC(i,i)2 with probability at most 2p(n2). Combining the results from (C-4) and (C-9), we have that

1npG(α^,β^)σ2[1n+log(np)n2p]+λ2i<iZC(i,i)(β^β)2 (C-10)

with probability at least 12p(n2)exp{min(c1log(np),c2plog(np))}. Substituting (C-10) into (C-7), we obtain

12npVα(α^α)+Vβ(β^β)2+λi<iZC(i,i)β^2σ2[1n+log(np)n2p]+λ2i<iZC(i,i)(β^β)2+λi<iZC(i,i)β2.

We get Lemma 7 by an application of the triangle inequality and by rearranging the terms.

Appendix D: Proof of Lemma 9

Proof of Lemma 9

Directly from the dual problem (5), DTν^ is the projection of x onto the convex set K={DTν:P2(ν)λ}. Using the primal-dual relationship u^=xDTν^, we see that û is the residual from projecting x onto the convex set K. By Lemma 1 of Tibshirani and Taylor (2012), û is continuous and almost differentiable with respect to x. Therefore, by Stein's formula, the degrees of freedom can be characterized as E[tr(u^x)].

Recall that DC(i,i) denotes the rows of D corresponding to the indices in the set C(i,i). Let B^2={(i,i):DC(i,i)u^20}. By the optimality condition of (3) with q = 2, we obtain

(xu^)=λi<iDC(i,i)TgC(i,i), (D-1)

where

gC(i,i)={DC(i,i)u^DC(i,i)u^2if(i,i)B^2.{Γ:Γ21}if(i,i)B^2.}

We define the matrix DB^2 by removing the rows of D that correspond to elements in B^2. Let P=(IDB^2T(DB^2DB^2T)DB^2) be the projection matrix onto the complement of space spanned by the rows of DB^2.

By the definition of DB^2, we obtain DB^2u^=0. Therefore, = û. Multiplying P onto both sides of (D-1), we obtain

Pxu^=λPi<iDC(i,i)TgC(i,i)=λP(i,i)B^2DC(i,i)TDC(i,i)u^DC(i,i)u^2, (D-2)

where the second equality follows from the fact that PDC(i,i)T=0 for any (i,i)B^2.

Vaiter et al. (2014) showed that there exists a neighborhood around almost every x such that the set B^2 is locally constant with respect to x. Therefore, the derivative of (D-2) with respect to x is

P=u^x=λP(i,i)B^2(DC(i,i)TDC(i,i)DC(i,i)u^2DC(i,i)TDC(i,i)u^u^TDC(i,i)TDC(i,i)DC(i,i)u^23)u^x, (D-3)

using the fact that for any matrix A with Av20,vATAvAv2=ATAAv2ATAvvTATAAv23.

Solving (D-3) for u^x, we have

u^x=[I+λP(i,i)B^2(DC(i,i)TDC(i,i)DC(i,i)u^2DC(i,i)TDC(i,i)u^u^TDC(i,i)TDC(i,i)DC(i,i)u^23)]1P. (D-4)

Therefore, an unbiased estimator of the degrees of freedom is of the form

tr(u^x)=tr([I+λP(i,i)B^2(DC(i,i)TDC(i,i)DC(i,i)u^2DC(i,i)TDC(i,i)u^u^TDC(i,i)TDC(i,i)DC(i,i)u^23)]1P).

Contributor Information

Kean Ming Tan, Department of Biostatistics, University of Washington, Seattle, WA 98195, U.S.A., keanming@uw.edu.

Daniela Witten, Departments of Statistics and Biostatistics, University of Washington, Seattle, WA 98195, U.S.A., dwitten@uw.edu.

References

  1. Bach F, Jenatton R, Mairal J, Obozinski G. Convex optimization with sparsity-inducing norms. Optimization for Machine Learning. 2011:19–53. [Google Scholar]
  2. Boucheron S, Lugosi G, Massart P. Concentration Inequalities: a Nonasymptotic Theory of Independence. OUP Oxford. 2013 [Google Scholar]
  3. Boyd S, Vandenberghe L. Convex Optimization. Cambridge university press; 2004. MR2061575. [Google Scholar]
  4. Chen J, Chen Z. Extended Bayesian information criteria for model selection with large model spaces. Biometrika. 2008;95:759–771. MR2443189. [Google Scholar]
  5. Chen J, Chen Z. Extended BIC for small-n-large-P sparse GLM. Statistica Sinica. 2012;22:555. MR2954352. [Google Scholar]
  6. Chi EC, Allen GI, Baraniuk RG. Convex biclustering. arXiv preprint arXiv. 2014:1408.0856. [Google Scholar]
  7. Chi E, Lange K. Splitting methods for convex clustering. Journal of Computational and Graphical Statistics. 2014a doi: 10.1080/10618600.2014.948181. in press. [DOI] [PMC free article] [PubMed] [Google Scholar]
  8. Chi E, Lange K. cvxclustr: Splitting methods for convex clustering. R package version 1.1.1. 2014b doi: 10.1080/10618600.2014.948181. http://cran.r-project.org/web/packages/cvxclustr. [DOI] [PMC free article] [PubMed]
  9. Duchi J, Singer Y. Efficient online and batch learning using forward backward splitting. The Journal of Machine Learning Research. 2009;10:2899–2934. MR2579916. [Google Scholar]
  10. Efron B. How biased is the apparent error rate of a prediction rule? Journal of the American Statistical Association. 1986;81:461–470. MR0845884. [Google Scholar]
  11. Hanson DL, Wright FT. A bound on tail probabilities for quadratic forms in independent random variables. The Annals of Mathematical Statistics. 1971;42:1079–1083. MR0279864. [Google Scholar]
  12. Haris A, Witten D, Simon N. Convex modeling of interactions with strong heredity. Journal of Computational and Graphical Statistics. 2015 doi: 10.1080/10618600.2015.1067217. in press. [DOI] [PMC free article] [PubMed] [Google Scholar]
  13. Hastie T, Tibshirani R, Friedman J. The Elements of Statistical Learning; Data Mining, Inference and Prediction. Springer Verlag; New York: 2009. MR2722294. [Google Scholar]
  14. Hocking TD, Joulin A, Bach F, Vert J-P, et al. Clusterpath: an algorithm for clustering using convex fusion penalties. 28th International Conference on Machine Learning. 2011 [Google Scholar]
  15. Jain AK, Dubes RC. Algorithms for Clustering Data. Prentice-Hall; 1988. MR0999135. [Google Scholar]
  16. Lindsten F, Ohlsson H, Ljung L. Statistical Signal Processing Workshop (SSP) IEEE; 2011. Clustering using sum-of-norms regularization: with application to particle filter output computation. pp. 201–204. [Google Scholar]
  17. Liu J, Yuan L, Ye J. Guaranteed sparse recovery under linear transformation. Proceedings of the 30th International Conference on Machine Learning (ICML-13) 2013:91–99. [Google Scholar]
  18. Lloyd S. Least squares quantization in PCM. IEEE Transactions on Information Theory. 1982;28:129–137. MR0651807. [Google Scholar]
  19. Ng AY, Jordan MI, Weiss Y. On spectral clustering: analysis and an algorithm. Advances in Neural Information Processing Systems. 2002 [Google Scholar]
  20. Pelckmans K, De Brabanter J, Suykens J, De Moor B. Convex clustering shrinkage. PASCAL Workshop on Statistics and Optimization of Clustering Workshop. 2005 [Google Scholar]
  21. Radchenko P, Mukherjee G. Consistent clustering using 1 fusion penalty. arXiv preprint arXiv. 2014:1412.0753. [Google Scholar]
  22. Rand WM. Objective criteria for the evaluation of clustering methods. Journal of the American Statistical association. 1971;66:846–850. [Google Scholar]
  23. Schwarz G. Estimating the dimension of a model. The Annals of Statistics. 1978;6:461–464. MR0468014. [Google Scholar]
  24. Tan KM, Witten DM. Sparse biclustering of transposable data. Journal of Computational and Graphical Statistics. 2014;23:985–1008. doi: 10.1080/10618600.2013.852554. MR3270707. [DOI] [PMC free article] [PubMed] [Google Scholar]
  25. Tibshirani RJ, Taylor J. The solution path of the generalized lasso. The Annals of Statistics. 2011;39:1335–1371. MR2850205. [Google Scholar]
  26. Tibshirani RJ, Taylor J. Degrees of freedom in lasso problems. The Annals of Statistics. 2012;40:1198–1232. MR2985948. [Google Scholar]
  27. Tibshirani R, Saunders M, Rosset S, Zhu J, Knight K. Sparsity and smoothness via the fused lasso. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 2005;67:91–108. MR2136641. [Google Scholar]
  28. Vaiter S, Deledalle C-A, Peyré G, Fadili JM, Dossal C. The degrees of freedom of partly smooth regularizers. arXiv preprint arXiv. 2014:1404.5557. MR3281282. [Google Scholar]
  29. Witten DM, Tibshirani R. A framework for feature selection in clustering. Journal of the American Statistical Association. 2010;105:713–726. doi: 10.1198/jasa.2010.tm09415. MR2724855. [DOI] [PMC free article] [PubMed] [Google Scholar]
  30. Zhu C, Xu H, Leng C, Yan S. Convex optimization procedure for clustering: theoretical revisit. Advances in Neural Information Processing Systems. 2014 [Google Scholar]

RESOURCES