public static <T> SVM<T> fit(T[] x, MercerKernel<T> kernel) {
        return fit(x, kernel, 0.5, 1E-3);
    }
@Test
    public void testSixClusters() throws Exception {
        System.out.println("Six clusters");

        CSVFormat format = CSVFormat.Builder.create().setDelimiter(' ').build();
        double[][] data = Read.csv(Paths.getTestData("clustering/rem.txt"), format).toArray();
        SVM<double[]> model = SVM.fit(data, new GaussianKernel(1.0), 0.2, 1E-3);

        double[] x = new double[201];
        double[] y = new double[201];
        for (int i = 0; i < x.length; i++) {
            x[i] = -5 + i * 0.1;
            y[i] = -5 + i * 0.1;
        }

        double[][] grid = new double[201][201];
        for (int i = 0; i < grid.length; i++) {
            for (int j = 0; j < grid[i].length; j++) {
                double[] point = {-5 + i * 0.1, -5 + j * 0.1};
                grid[j][i] = model.score(point);
            }
        }

        // ScatterPlot.of(data).canvas().window();
        // Heatmap.of(x, y, grid).canvas().window();

        java.nio.file.Path temp = Write.object(model);
        Read.object(temp);
    }