Gaussian Mixture Model for estimating the density on arrays of double.
The initialization of the Gaussian centers is performed by k-means, then the EM algorithm runs until the centers stabilize.
434445464748495051525354
LaSVM<double[]> svm; @Before public void setUp() throws Exception { GaussianGenerator g = new GaussianGenerator(10, 5.0f, 0.1); train = g.generateList(50); DoubleGaussL2 k = new DoubleGaussL2(1.0); svm = new LaSVM<double[]>(k); svm.setC(1.0); }
454647484950515253545556
/** * @throws java.lang.Exception */ @Before public void setUp() throws Exception { GaussianGenerator gen = new GaussianGenerator(2, 2, 1.0); List<TrainingSample<double[]>> list = gen.generateList(100, 100); train = new ArrayList<double[]>(); for (TrainingSample<double[]> t : list) { train.add(t.sample); } }
515253545556575859606162
@Before public void setUp() throws Exception { int dim = 128; GaussianGenerator gen = new GaussianGenerator(dim, 0, 1.0); list = gen.generateList(dim); k = new DoubleGaussL2(2.0); pca = new KernelPCA<double[]>(k); pca.train(list);
444546474849505152535455
495051525354555657585960
*/ @Before public void setUp() throws Exception { GaussianGenerator gen = new GaussianGenerator(dim); list = gen.generateList(nbSamples); pca = new DoublePCA(); pca.train(list);
424344454647484950515253
4546474849505152535455
* @throws java.lang.Exception */ @Before public void setUp() throws Exception { GaussianGenerator g = new GaussianGenerator(10, 5.0f, 1.0); train = g.generateList(10); DoubleGaussL2 k = new DoubleGaussL2(1.0); svm = new LaSVMI<double[]>(k); }
3839404142434445464748
LaSVM<double[]> svm; @Before public void setUp() throws Exception { GaussianGenerator g = new GaussianGenerator(10, 5.0f, 1.0); train = g.generateList(10); DoubleGaussL2 k = new DoubleGaussL2(1.0); svm = new LaSVM<double[]>(k); }
/** * @throws java.lang.Exception */ @Before public void setUp() throws Exception { GaussianGenerator gen = new GaussianGenerator(8, 2, 0.1); List<TrainingSample<double[]>> list = gen.generateList(1000, 1000); train = new ArrayList<double[]>(); for(TrainingSample<double[]> t : list) { train.add(t.sample); } }