Examples of DoubleGaussChi2


Examples of JKernelMachines.fr.lip6.kernel.typed.DoubleGaussChi2

    if (files.size() != bow.size()){
      System.err.println("Bow and files of different size !!!! STOPING ...");
      return null;
    }

    DoubleGaussChi2 gaussKernel = new DoubleGaussChi2(gamma);
    double distmean = 0.0;

    if (bComptuteMeanDist){
      int cpt = 0;
      for (int i=0; i < files.size(); i++ ){
        for (int j = i + 1; j < files.size(); j++ ){
          distmean += gaussKernel.distChi2(bow.get(i).get(0), bow.get(j).get(0));
          cpt++;
        }
      }
      distmean = distmean / ((double)cpt);
      if (distmean < Double.MIN_VALUE)
        System.err.println("distmean = " + distmean + " to small - pathological signatures !!!!!! STOPING ...");

      gamma = 1/distmean;
      gaussKernel.setGamma(gamma);

      System.out.println("distmean = " + distmean + " gamma = " + gamma);
    }

    ThreadedSumKernel<ArrayList<double[]>> tsk = new ThreadedSumKernel<ArrayList<double[]>>();
View Full Code Here

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

  /**
   * @throws java.lang.Exception
   */
  @Before
  public void setUp() throws Exception {
    gausschi2 = new DoubleGaussChi2();
  }
View Full Code Here

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

  /**
   * Test method for {@link fr.lip6.jkernelmachines.kernel.typed.DoubleGaussChi2#DoubleGaussChi2(double)}.
   */
  @Test
  public final void testDoubleGaussChi2Double() {
    gausschi2 = new DoubleGaussChi2(1.0);
    assertEquals(1.0, gausschi2.getGamma(), 1e-15);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.