RelaxedKmeans
RelaxedKmeans module
- class markovianSBM.RelaxedKmeans.RelaxedKmeans[source]
Bases:
objectClass solving the Semi Definite Program which is a relaxed version of the K means problem.
- compute_costs()[source]
Show the value of the objective function of the SDP with the matrix $B^*$ which is the solution of the K means problem and with $hat{B}$ which is the optimal solution of the SDP.
- visualize_B_matrices()[source]
Method providing a vizualisation of the matrices $B^*$ (optimal solution of the K-means problem) and $hat{B}$ optimal solution of the SDP relaxation. This allows to easily see if a final rounding step on the rows of $hat{B}$ could allow to reach a relevant clustering of the nodes of the graph.