Examples of SigmoidFunction


Examples of com.neuralnetwork.shared.functions.SigmoidFunction

     * Test method for {@link com.neuralnetwork.shared.functions
     * .SigmoidFunction#equals()}.
     */
    @Test
    public final void testEquals() {
        IActivationFunction f = new SigmoidFunction();
        IActivationFunction f1 = new SigmoidFunction();
       
        assertEquals(f, f1);
        assertEquals(f, f);
       
        f = new SigmoidFunction();
        f1 = null;
       
        assertFalse(f.equals(f1));
        assertFalse(f.equals(new DoubleValue(0.0)));
    }
View Full Code Here

Examples of com.neuralnetwork.shared.functions.SigmoidFunction

     * Test method for {@link com.neuralnetwork.shared.functions
     * .SigmoidFunction#hashCode()}.
     */
    @Test
    public final void testHashCode() {
        IActivationFunction f = new SigmoidFunction();
        IActivationFunction f1 = new SigmoidFunction();
       
        assertEquals(f.hashCode(), f1.hashCode());
        assertEquals(f.hashCode(), f.hashCode());
    }
View Full Code Here

Examples of com.neuralnetwork.shared.functions.SigmoidFunction

     * @param expected
     *      the expected output from the sigmoid function
     */
    private void testValue(final double input, final double expected) {
        LOGGER.debug("===== Sigmoid Function Test. =====");
        IActivationFunction f = new SigmoidFunction();
        double v = f.activate(input);
        LOGGER.debug(" Input: " + input);
        LOGGER.debug(" Value: " + v);
        LOGGER.debug(" Expected: " + expected);
        assertEquals(v, expected , DELTA * Math.ulp(expected));
        LOGGER.debug("==================================");
View Full Code Here

Examples of com.neuralnetwork.shared.functions.SigmoidFunction

     *      the expected output from the sigmoid function
     */
    private void testDerivativeValue(final double input,
        final double expected) {
        LOGGER.debug("===== Sigmoid Derivative Test. =====");
        IActivationFunction f = new SigmoidFunction();
        double v = f.derivative(input);
        LOGGER.debug(" Input: " + input);
        LOGGER.debug(" Value: " + v);
        LOGGER.debug(" Expected: " + expected);
        assertEquals(v, expected , DELTA * Math.ulp(expected));
        LOGGER.debug("====================================");
View Full Code Here

Examples of com.neuralnetwork.shared.functions.SigmoidFunction

    Neuron o1 = new OutputNeuron();
    m.addOutputLink(o);
    m.addOutputLink(o1);
    m.setActivationFunction(null);
    assertEquals(m.getActivationFunction(), null);
    m.setActivationFunction(new SigmoidFunction());
    assertEquals(m.getActivationFunction(), new SigmoidFunction());
  }
View Full Code Here

Examples of com.neuralnetwork.shared.functions.SigmoidFunction

    Neuron o1 = new OutputNeuron();
    m.addOutputLink(o);
    m.addOutputLink(o1);
    m.setActivationFunction(null);
    assertEquals(m.getActivationFunction(), null);
    m.setActivationFunction(new SigmoidFunction());
    assertEquals(m.getActivationFunction(), new SigmoidFunction());
  }
View Full Code Here

Examples of com.neuralnetwork.shared.functions.SigmoidFunction

    n1 = new InputNeuron();
    assertFalse(n.equals(n1));
    n1.setType(null);
    n1.setActivationFunction(null);
    assertEquals(n, n1);
    n.setActivationFunction(new SigmoidFunction());
    assertFalse(n.equals(n1));
   
    Neuron i = new InputNeuron();
    Neuron i1 = new InputNeuron();
    Neuron m = new HiddenNeuron();
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.