Package org.neuroph.util

Examples of org.neuroph.util.Properties


        assertEquals(1, result, 0.0);
    }

    @Test
    public void testgetOutputwithproperties() {
        Properties properties = new Properties();
        properties.setProperty("transferFunction.slope", 1.0);
        instance = new Linear(properties);//again
        double result = instance.getOutput(input);
        assertEquals(expected, result, 0.0);
    }
View Full Code Here


        assertEquals(expected, result, 0.0);
    }

    @Test
    public void testgetDerivativewthproperties() {
        Properties properties = new Properties();
        properties.setProperty("transferFunction.slope", 1.0);
        instance = new Linear(properties);//and again
        double result = instance.getDerivative(input);
        assertEquals(1.0, result, 0.0);
    }
View Full Code Here

    public void testGetProperties() {
        double ylow=6,yhigh=7;
        Step instance = new Step();
        instance.setYHigh(yhigh);
        instance.setYLow(ylow);
        Properties expResult = new Properties();
        expResult.setProperty("transferFunction.yHigh", new Double(yhigh).toString());
        expResult.setProperty("transferFunction.yLow",new Double(ylow).toString());
        Properties result = instance.getProperties();
        assertEquals(expResult, result);
        }
View Full Code Here

        assertEquals(expected, result, 0.0);
    }

    @Test
    public void testgetOutputwthProperties() {
        Properties properties = new Properties();
        properties.setProperty("transferFunction.slope", 1d);
        properties.setProperty("transferFunction.yHigh", .9d);
        properties.setProperty("transferFunction.yLow", .3d);
        properties.setProperty("transferFunction.xHigh", .8d);
        properties.setProperty("transferFunction.xLow", .6d);
        instance = new Ramp(properties);
        double result = instance.getOutput(input);
        assertEquals(expected, result, 0.0);
    }
View Full Code Here

        assertEquals(expected, result, 0.0);
    }

    @Test
    public void testgetDerivativewthProperties() {
        Properties properties = new Properties();
        //properties.setProperty("transferFunction.slope", .5d);
        properties.setProperty("transferFunction.yHigh", .9d);
        properties.setProperty("transferFunction.yLow", .3d);
        properties.setProperty("transferFunction.xHigh", .8d);
        properties.setProperty("transferFunction.xLow", .6d);
        Ramp instance = new Ramp(properties);
        double result = instance.getDerivative(input);
        assertEquals(expected_derivative, result, 0.0);
    }
View Full Code Here

  /**
   * Returns the properties of this function
   * @return properties of this function
   */
  public Properties getProperties() {
    Properties properties = new Properties();
    properties.setProperty("transferFunction.yHigh", new Double(yHigh).toString());
    properties.setProperty("transferFunction.yLow", new Double(yLow).toString());
    return properties;
  }
View Full Code Here

TOP

Related Classes of org.neuroph.util.Properties

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.