All Downloads are FREE. Search and download functionalities are using the official Maven repository.

aima.core.learning.neural.LogSigActivationFunction Maven / Gradle / Ivy

Go to download

AIMA-Java Core Algorithms from the book Artificial Intelligence a Modern Approach 3rd Ed.

The newest version!
package aima.core.learning.neural;

/**
 * @author Ravi Mohan
 * 
 */
public class LogSigActivationFunction implements ActivationFunction {

	public double activation(double parameter) {

		return 1.0 / (1.0 + Math.pow(Math.E, (-1.0 * parameter)));
	}

	public double deriv(double parameter) {
		// parameter = induced field
		// e == activation
		double e = 1.0 / (1.0 + Math.pow(Math.E, (-1.0 * parameter)));
		return e * (1.0 - e);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy