/// <summary> /// Creates the clustering algorithm. /// </summary> /// private IMulticlassClassifier<double[]> createClustering(double[][] data) { if (rbKMeans.Checked) return new KMeans((int)numKMeans.Value).Learn(data); if (rbMeanShift.Checked) { var kernel = new Accord.Statistics.Distributions.DensityKernels.GaussianKernel(2); return new MeanShift(2, kernel, (double)numRadius.Value).Learn(data); } if (rbGMM.Checked) return new GaussianMixtureModel((int)numGaussians.Value).Learn(data); throw new Exception(); }