Example |
VectorLib vlib=new VectorLib(); ClusteringLib clib=new ClusteringLib(); int[][] data={{20, 30}, {30, 20}, {30, 30}, {70, 70}, {80, 80}}; int[] clusters=clib.Clustering("kmeans", data, 2); double[] V=clib.getVariance(data, clusters); vlib.view("Vw", V[0]); vlib.view("Vb", V[1]); |
Output |
Vw = 77.77777777777777 Vb = 5840.277777777778 |