Package util

Examples of util.SummedGaussian


   * @param totalSum
   * @param stdev
   */
  public Odor(int numCols, double totalSum, double stdev)
  {
    inputGaussian = new SummedGaussian(stdev, totalSum);

    inputs = inputGaussian.getNumRandomZScores(numCols)[1];
   
    // DEBUG
    if (Main.VERBOSE)
View Full Code Here


    //Initialize mitral cells
    this.mitralCell.setParentIndex(network.indexOf(this));
    this.mitralCell.initialize(network);
   
    this.granuleActivationThresholdGaussian =
        new SummedGaussian(DEFAULT_GRANULE_GAUSSIAN_STDEV, Main.ODOR_INPUT_SUM*3.0);
   
    //Initialize granules
    //TODO Mess around w/ weights here
   
    double[] activationThresholdArray = this.granuleActivationThresholdGaussian.getNumRandomZScores(network.getGranulesPerColumn())[1];
View Full Code Here

  @Test
  public void testGetMean()
  {
    double[] zscores = {0.1, 1.0, 1.5, 2.0, 2.5, 3.0};
   
    SummedGaussian g = new SummedGaussian(zscores, Util.arraySum(zscores));
    Odor o = new Odor(zscores.length, g);
   
    assert(o.getMean() == g.getMean() && o.getMean() == Util.arrayMean(zscores));
  }
View Full Code Here

  @Test
  public void testGetStandardDeviation()
  {
    double[] zscores = {0.1, 1.0, 1.5, 2.0, 2.5, 3.0};
   
    SummedGaussian g = new SummedGaussian(zscores, Util.arraySum(zscores));
   
    Odor o = new Odor(zscores.length, g);
   
    assert(o.getStandardDeviation() == g.getStandardDeviation()
        && o.getStandardDeviation() == Util.standardDeviation(zscores));
  }
View Full Code Here

  @Test
  public void testGetInputs()
  {
    double[] zscores = {0.1, 1.0, 1.5, 2.0, 2.5, 3.0};
    SummedGaussian g = new SummedGaussian(zscores, Util.arraySum(zscores));
   
    Odor o1 = new Odor(zscores.length, g);
   
    assert( Util.arrayContains(zscores,o1.getInputs()));
  }
View Full Code Here

    Odor o2 = new Odor();
   
    assert( o1.equals(o2));
   
    double[] zscores = {0.1, 1.0, 1.5, 2.0, 2.5, 3.0};
    SummedGaussian g = new SummedGaussian(zscores, Util.arraySum(zscores));
   
    o1 = new Odor(3, g);
    o2 = new Odor(3, g);
   
    assert (o1.equals(o2));
View Full Code Here

    Odor o2 = new Odor();
   
    assert( o1.compareTo(o2) == Integer.MIN_VALUE);
   
    double[] zscores = {0.1, 1.0, 1.5, 2.0, 2.5, 3.0};
    SummedGaussian g = new SummedGaussian(zscores, Util.arraySum(zscores));
   
    o1 = new Odor(3, g);
    o2 = new Odor(3, g);
   
    assert ( o1.compareTo(o2) != 0 );
View Full Code Here

TOP

Related Classes of util.SummedGaussian

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.