org.micropsi.nodenet
Interface OutputFunctionIF

All Known Implementing Classes:
OFAbs, OFBandpass, OFGauss, OFHighpass, OFKBANN, OFLinear, OFLogistic, OFLowpass, OFSemilinear, OFSigmoidal, OFSine, OFTanh

public interface OutputFunctionIF

OutputFunctionIF. An output function is a function f(x) = y. f can be parametrized by any number of constant parameters.


Method Summary
 double calculate(double value, OutputFunctionParameter[] params)
          When a gate uses this output function and its value is to be calculated, this method will be called.
 OutputFunctionParameter[] constructEmptyParameters()
          Defines the set of parameters for this output function.
 java.lang.String getDisplayName()
          Returns the display name of this output function.
 

Method Detail

getDisplayName

public java.lang.String getDisplayName()
Returns the display name of this output function. The string returned will be used in the editor and has no technical meaning.

Returns:
a String to be used in the editor for identifying this output function ,must not be null

constructEmptyParameters

public OutputFunctionParameter[] constructEmptyParameters()
Defines the set of parameters for this output function. The default semilinear output function, for instance, will return one parameter, {theta}. You can define any number of parameters here. These parameters will be passed to the calculate method in the order you define here, so you can quickly access the parameters by index in calculate(...)

Returns:
the array of parameters this function uses, must not be null

calculate

public double calculate(double value,
                        OutputFunctionParameter[] params)
When a gate uses this output function and its value is to be calculated, this method will be called. The given parameters are the objects returned on initialisation by getParameters(), but with the current values. The order defined in constructEmptyParameters() will be preserved, so implementations of this method can access the parameter objects by index.

Parameters:
value - the gate value
params - the parameter array, never null
Returns:
the output function result

(c) by Micropsi Project: http://www.cognitive-agents.org

.