|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface supported by every objects that can be used like a function. Every units in a neural network, and neural networks themselves are of this type. A functional unit has the only constraint of being a multivariate real-vector-valued function.
The FunctionalUnit
interface has methods that provide
information about the type of function encapsulated by the object such as
number of inputs and outputs and whether it is differentiable or not. It
also provides methods to read the values and derivatives of the function for
a given single input pattern or a whole batch of patterns, in which case
some extra information can also be recorded.
For a complete list of FunctionalUnit
included in this
package see FunctionalUnit Chart
Nested Class Summary | |
static class |
FunctionalUnit.ProcessPatternResult
Return type for the method processPattern(double[], boolean, boolean) . |
Field Summary | |
static double[] |
EMPTY_PATTERN
An empty pattern is a pattern of size 0. |
Method Summary | |
java.lang.Object |
clone()
|
int |
getInputCount()
Indicates the number of variables of the function. |
int |
getOutputCount()
Indicates the number of values returned by the function. |
boolean |
isDifferentiable()
Indicates whether or not the function is differentiable. |
boolean |
isStateless()
Indicates whether or not the function output depends solely of the current input (and not of the previous pattern it has processed). |
boolean |
isTwiceDifferentiable()
Indicates whether or not the function is twice differentiable. |
DataSet |
processDataSet(DataSet dataSet,
java.lang.String[] recordList)
Processes a set of input patterns and record the requested information. |
FunctionalUnit.ProcessPatternResult |
processPattern(double[] inputPattern,
boolean computeDerivative,
boolean computeSecondDerivative)
Processes an input pattern and returns its output pattern and derivative (if requested). |
void |
reset()
Reset internal transient state for non stateless functions. |
Field Detail |
public static final double[] EMPTY_PATTERN
BiasUnit
.
Method Detail |
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
public int getInputCount()
public int getOutputCount()
public boolean isDifferentiable()
true
if it differentiable, false
otherwise.public boolean isStateless()
true
if output depends solely on current input
false
otherwise.public boolean isTwiceDifferentiable()
true
if it twice differentiable,
false
otherwise.public DataSet processDataSet(DataSet dataSet, java.lang.String[] recordList)
DataNames.DERIVATIVES
, for the second derivatives use
DataNames.SECOND_DERIVATIVES
and for the error patterns, use
DataNames.ERROR_PATTERNS
. Derivatives are available only when
the function is differentiable. Error patterns required
DataNames.TARGET_PATTERNS
to be in the provided data set.
DataNames.OUTPUT_PATTERNS
and any other keywords
supported requested. Each FunctionalUnit
may provide extra keywords of its own.DataNames
public FunctionalUnit.ProcessPatternResult processPattern(double[] inputPattern, boolean computeDerivative, boolean computeSecondDerivative)
public void reset()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |