com.anji.integration
Class AnjiActivator
java.lang.Object
com.anji.integration.AnjiActivator
- All Implemented Interfaces:
- Activator, XmlPersistable
public class AnjiActivator
- extends java.lang.Object
- implements Activator
Simple neural network implementation of Activator interface.
- Author:
- Philip Tucker
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AnjiActivator
public AnjiActivator(AnjiNet aNet,
int aNumCycles)
throws java.lang.IllegalArgumentException
- Parameters:
aNet - ANNaNumCycles - number of times input pattern is "shown" to network before a result is
returned; this allows for recurrent connections to take effect
- Throws:
java.lang.IllegalArgumentException
next
public double[] next()
- Specified by:
next in interface Activator
- Returns:
- next output pattern
- See Also:
next(double[])
next
public double[] next(double[] newInputValues)
- Specified by:
next in interface Activator
- Parameters:
newInputValues - input activation pattern to be "shown" to network; if null, uses
previous values
- Returns:
- result of activation
next
public double[][] next(double[][] newInputValues)
- Specified by:
next in interface Activator
- Parameters:
newInputValues - input pattern sequence
- Returns:
- next output pattern sequence
- See Also:
next(double[])
setInputPattern
public void setInputPattern(Pattern array)
- Parameters:
array - glue between double arrays and neuron connections.
reset
public void reset()
- clear all memory in network, including neurons and recurrent connections
- Specified by:
reset in interface Activator
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
- See Also:
Object.toString()
toXml
public java.lang.String toXml()
- Specified by:
toXml in interface Activator- Specified by:
toXml in interface XmlPersistable
- Returns:
- String XML representation of object.
- See Also:
Activator.toXml()
getName
public java.lang.String getName()
- Specified by:
getName in interface Activator
- Returns:
- String identifier, preferably unique, of object.
- See Also:
Activator.getName()
setNumCycles
public void setNumCycles(int aNumCycles)
throws java.lang.IllegalArgumentException
- Parameters:
aNumCycles - number of times input pattern is "shown" to network before a result is
returned; this allows for recurrent connections to take effect
- Throws:
java.lang.IllegalArgumentException
getInputDimension
public int getInputDimension()
- Specified by:
getInputDimension in interface Activator
- Returns:
- dimension of input pattern
getOutputDimension
public int getOutputDimension()
- Specified by:
getOutputDimension in interface Activator
- Returns:
- dimension of output pattern
isRecurrent
public boolean isRecurrent()
- Returns:
- true if network contains any recurrent connections, false otherwise
getMinResponse
public double getMinResponse()
- Specified by:
getMinResponse in interface Activator
- Returns:
- min response
getMaxResponse
public double getMaxResponse()
- Specified by:
getMaxResponse in interface Activator
- Returns:
- max responses
getXmlRootTag
public java.lang.String getXmlRootTag()
- Specified by:
getXmlRootTag in interface XmlPersistable
- Returns:
- root tag
- See Also:
XmlPersistable.getXmlRootTag()
getXmld
public java.lang.String getXmld()
- Specified by:
getXmld in interface XmlPersistable
- Returns:
- id
- See Also:
XmlPersistable.getXmld()