Solves the Peng-Wei K-means SDP Relaxation using the FORCE algorithm.
gforce.FORCE(D, K, force_opts = NULL, D_Kmeans = NULL, X0 = NULL,
E = NULL, R_only = FALSE)a matrix \(D\) as defined above.
number of clusters.
tuning parameters. NULL signifies defaults will be used.
matrix to be used for initial integer solution. NULL signifies that D will be used.
initial iterate. NULL signifies that it will be generated randomly from D_Kmeans. If supplied, E must be supplied as well.
strictly feasible solutions. NULL signifies that it will be generated randomly. If supplied, X0 must be supplied as well.
logical expression. If R_only == FALSE, then the included
native code implementation will be used. Otherwise, an R implementation is used.
An object with following components
Z_TFinal iterate of the projected gradient descent algorithm run on the smoothed eigenvalue problem.
B_Z_TProjection of Z_T to the border of the positive semi-definite cone.
B_Z_T_opt_valObjective value of the \(K\)-means SDP relaxation at B_Z_T.
Z_bestIterate with best objective value found during projected gradient descent on the smoothed eigenvalue problem.
B_Z_bestProjection of Z_best to the border of the positive semi-definite cone.
B_Z_best_opt_valObjective value of the \(K\)-means SDP relaxation at B_Z_T.
km_bestBest clustering in terms of objective value of the SDP relaxation. This is found by running Lloyd's algorithm on the rows of D_kmeans_matrix.
B_kmPartnership matrix corresponding to km_best.
km_opt_valObjective value of the \(K\)-means SDP relaxation at B_km.
km_best_timeTime elapsed (in seconds) until km_best was found.
km_iter_bestNumber of times a \(K\)-means algorithm was run before km_best was found.
km_iter_totalTotal number of calls to a \(K\)-means solver (such as Lloyd's algorithm).
dual_certified1 if a dual certificate was found, and 0 otherwise.
dual_certified_grad_iterNumber of gradient updates performed before a dual certificate was found.
dual_certified_timeTime elapsed (in seconds) until dual certificate was found for B_km.
grad_iter_bestGradient iteration where Z_best was computed.
grad_iter_best_timeTime elapsed (in seconds) when the update grad_iter_best was performed.
total_timeTotal time elapsed (in seconds) during call to gforce.FORCE.
C. Eisenach and H. Liu. Efficient, Certifiably Optimal High-Dimensional Clustering. arXiv:1806.00530, 2018.
J. Peng and Y. Wei. Approximating K-means-type Clustering via Semidefinite Programming. SIAM Journal on Optimization, 2007.
J. Renegar. Efficient first-order methods for linear programming and semidefinite programming. arXiv:1409.5832, 2014.
# NOT RUN {
K <- 5
n <- 50
d <- 50
dat <- gforce.generator(K,d,n,3,graph='scalefree')
sig_hat <- (1/n)*t(dat$X)%*%dat$X
gam_hat <- gforce.Gamma(dat$X)
D <- diag(gam_hat) - sig_hat
res <- gforce.FORCE(D,K)
# }
Run the code above in your browser using DataLab