Package com.neuralnetwork.shared.functions

Examples of com.neuralnetwork.shared.functions.IActivationFunction


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


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

     * 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

     * @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

     *      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

TOP

Related Classes of com.neuralnetwork.shared.functions.IActivationFunction

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.