/* * File: ActivationFunction.java * Author: Justin Basilico * Course: PO CS 152: Neural Networks * Assignment: Final Project * Updated: 2001.12.18 * Created: 2001.12.04 * * Description: * This file contains the ActivationFunction interface, which is an interface * that is used to describe an activation that is used in a NeuralNetwork to * get the activation value of a unit in the network given the input * activation into the unit. * * Copyright: Justin Basilico (2001). */ import java.io.Serializable; /** * ActivationFunction interface * * This interface is to be implemented by a class that has an activation * function for units in a neural network. The function is defined to be a * function from the real numbers to the real numbers. The input number is the * total input into the unit in the network. The value returned should will be * used as the activation of that unit. The function to implement that does * this is getUnitActivation(double) which takes a double and returns a * double. * * The interface extends Serializable so that the function can be saved with a * NeuralNetwork that uses it. * * @author Justin Basilico * @version 2001.12.18 * @see NeuralNetwork */ public interface ActivationFunction extends Serializable { /** * getUnitActivation * * This method takes a double input that is the total input to a unit in a * neural network and returns the double activation value for that unit * from the given input. * * @param input The value of the input to a unit, as a double. * @return The activation for the unit given the input value, as a double. */ public double getUnitActivation( double input); // Total input to unit. }