Package fr.lip6.jkernelmachines.kernel.typed

Examples of fr.lip6.jkernelmachines.kernel.typed.DoubleGaussL2


   * Test method for
   * {@link fr.lip6.jkernelmachines.density.SMODensity#train(java.util.List)}.
   */
  @Test
  public final void testTrainListOfT() {
    DoubleGaussL2 k = new DoubleGaussL2();
    ParzenDensity<double[]> de = new ParzenDensity<double[]>(k);
    de.train(train);

    for (double[] x : train) {
      assertTrue(!Double.isNaN(de.valueOf(x)));
View Full Code Here


  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);
  }
View Full Code Here

    assertEquals(1.0, svm.getB(), 1e-15);
  }

  @Test
  public final void testSetKernel() {
    DoubleGaussL2 k = new DoubleGaussL2();
    svm.setKernel(k);
    assertEquals(k, svm.getKernel());
  }
View Full Code Here

    DataPreProcessing.centerList(trainlist);
    DataPreProcessing.reduceList(trainlist);
    DataPreProcessing.normalizeList(trainlist);
   
    //learning
    DoubleGaussL2 kernel = new DoubleGaussL2();
    kernel.setGamma(2.0);
    LaSVM<double[]> svm = new LaSVM<double[]>(kernel);
    svm.setC(10);
    svm.setE(5);
       
    AccuracyEvaluator<double[]> accev = new AccuracyEvaluator<double[]>();
View Full Code Here

   * {@link fr.lip6.jkernelmachines.density.SDCADensity#train(java.lang.Object)}
   * .
   */
  @Test
  public final void testTrainT() {
    DoubleGaussL2 k = new DoubleGaussL2();
    SDCADensity<double[]> de = new SDCADensity<double[]>(k);
    de.train(train.get(0));

    for (double[] x : train) {
      assertTrue(!Double.isNaN(de.valueOf(x)));
View Full Code Here

   * {@link fr.lip6.jkernelmachines.density.SDCADensity#train(java.util.List)}
   * .
   */
  @Test
  public final void testTrainListOfT() {
    DoubleGaussL2 k = new DoubleGaussL2();
    SDCADensity<double[]> de = new SDCADensity<double[]>(k);
    de.setC(1.);
    de.train(train);
   
    for (double[] x : train) {
View Full Code Here

   
    GaussianGenerator g = new GaussianGenerator(10, 5.0f, 1.0);
    train = g.generateList(10);
   
    svm = new GradMKL<double[]>();
    svm.addKernel(new DoubleGaussL2());
  }
View Full Code Here

  /**
   * Test method for {@link fr.lip6.jkernelmachines.classifier.GradMKL#addKernel(fr.lip6.jkernelmachines.kernel.Kernel)}.
   */
  @Test
  public final void testAddKernel() {
    DoubleGaussL2 k = new DoubleGaussL2(1.0);
    svm.addKernel(k);
    assertTrue(svm.getKernels().contains(k));
  }
View Full Code Here

  /**
   * Test method for {@link fr.lip6.jkernelmachines.classifier.GradMKL#setClassifier(fr.lip6.jkernelmachines.classifier.KernelSVM)}.
   */
  @Test
  public final void testSetClassifier() {
    LaSVM<double[]> lasvm = new LaSVM<double[]>(new DoubleGaussL2());
    svm.setClassifier(lasvm);
    assertEquals(lasvm, svm.getClassifier());
  }
View Full Code Here

   
    GaussianGenerator g = new GaussianGenerator(10, 5.0f, 1.0);
    train = g.generateList(10);
   
    svm = new SimpleMKL<double[]>();
    svm.addKernel(new DoubleGaussL2());
  }
View Full Code Here

TOP

Related Classes of fr.lip6.jkernelmachines.kernel.typed.DoubleGaussL2

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.