Package network.aika.neuron.activation
Class Activation
- java.lang.Object
-
- network.aika.neuron.activation.Activation
-
- All Implemented Interfaces:
Comparable<Activation>
public class Activation extends Object implements Comparable<Activation>
TheActivationclass is the most central class in Aika. On the one hand it stores the activation value for a given neuron in theStatesubstructure. On the other hand it specifies where this activation is located within the document and to which interpretation it belongs. TheActivation.Keytherefore consists of the logic node to which this activation belongs. If this logic node is an or-node, then this activation automatically also belongs to the neuron as well. Furthermore, the key contains the char range within the document and the relational id (rid). The relational id might be used to store the word pos for instance. Lastly, the key contain the interpretation node of this activation, specifying to which interpretation this activation belongs.The activations are linked to each other on two levels. The fields
inputsandoutputscontain the activation links within the logic layer. The fieldsinputLinksandoutputLinkscontain the links on the neural layer.- Author:
- Lukas Molzberger
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classActivation.Builderstatic classActivation.Modestatic classActivation.OscillatingActivationsExceptionstatic classActivation.RecursiveDepthExceededException
-
Field Summary
Fields Modifier and Type Field Description static Comparator<Activation>ACTIVATION_ID_COMPdoublealternativeCachedWeightSumstatic intBEGINSearchNodebestChildNodebooleanblockedDecisioncachedDecisionThe cached decision is used to avoid having to explore the same currentSearchState twice even though nothing that influences this currentSearchState has changed.SearchNodecachedSearchNodeThe cached search node is used to avoid having to recompute the activation values and weights that are associated with this search node.static Comparator<Activation>CANDIDATE_COMPOptioncurrentOptionstatic booleanDEBUG_OUTPUTint[]debugCountsint[]debugDecisionCountsstatic intENDOptionfinalOptionlongmarkedAncDescstatic ActivationMAX_ACTIVATIONstatic intMAX_SELF_REFERENCING_DEPTHstatic ActivationMIN_ACTIVATIONOptionrootOption
-
Method Summary
-
-
-
Field Detail
-
BEGIN
public static int BEGIN
-
END
public static int END
-
ACTIVATION_ID_COMP
public static final Comparator<Activation> ACTIVATION_ID_COMP
-
MAX_SELF_REFERENCING_DEPTH
public static int MAX_SELF_REFERENCING_DEPTH
-
DEBUG_OUTPUT
public static boolean DEBUG_OUTPUT
-
MIN_ACTIVATION
public static final Activation MIN_ACTIVATION
-
MAX_ACTIVATION
public static final Activation MAX_ACTIVATION
-
rootOption
public Option rootOption
-
currentOption
public Option currentOption
-
finalOption
public Option finalOption
-
markedAncDesc
public long markedAncDesc
-
blocked
public boolean blocked
-
cachedDecision
public Decision cachedDecision
The cached decision is used to avoid having to explore the same currentSearchState twice even though nothing that influences this currentSearchState has changed.
-
alternativeCachedWeightSum
public double alternativeCachedWeightSum
-
cachedSearchNode
public SearchNode cachedSearchNode
The cached search node is used to avoid having to recompute the activation values and weights that are associated with this search node.
-
bestChildNode
public SearchNode bestChildNode
-
debugCounts
public int[] debugCounts
-
debugDecisionCounts
public int[] debugDecisionCounts
-
CANDIDATE_COMP
public static Comparator<Activation> CANDIDATE_COMP
-
-
Method Detail
-
setInputNodeActivation
public void setInputNodeActivation(OrActivation inputNodeActivation)
-
getInputNodeActivation
public OrActivation getInputNodeActivation()
-
getOutputNodeActivation
public InputActivation getOutputNodeActivation()
-
setOutputNodeActivation
public void setOutputNodeActivation(InputActivation outputNodeActivation)
-
lookupSlot
public Position lookupSlot(int slot)
-
length
public Integer length()
-
getId
public int getId()
-
getDocument
public Document getDocument()
-
getThreadId
public int getThreadId()
-
getNewVisitedId
public long getNewVisitedId()
-
getVisitedId
public long getVisitedId()
-
checkVisited
public boolean checkVisited(long v)
-
getLabel
public String getLabel()
-
getType
public INeuron.Type getType()
-
getText
public String getText()
-
getINeuron
public INeuron getINeuron()
-
getNeuron
public Neuron getNeuron()
-
getSynapseById
public Synapse getSynapseById(int synapseId)
-
checkDependenciesSatisfied
public boolean checkDependenciesSatisfied(long v)
-
markHasCandidate
public void markHasCandidate(long v)
-
getUpperBound
public double getUpperBound()
-
setUpperBound
public void setUpperBound(double ub)
-
getLowerBound
public double getLowerBound()
-
setLowerBound
public void setLowerBound(double lb)
-
getTargetValue
public Double getTargetValue()
-
getInputValue
public Double getInputValue()
-
getDecision
public Decision getDecision()
-
getNextDecision
public Decision getNextDecision(Option parent, SearchNode sn)
-
getFinalDecision
public Decision getFinalDecision()
-
getLinkBySynapseId
public Link getLinkBySynapseId(int synapseId)
-
process
public double process(SearchNode sn) throws Activation.OscillatingActivationsException, Activation.RecursiveDepthExceededException
-
computeValueAndWeight
public State computeValueAndWeight(SearchNode sn) throws Activation.RecursiveDepthExceededException
-
processBounds
public void processBounds() throws Activation.RecursiveDepthExceededException
-
computeBounds
public void computeBounds() throws Activation.RecursiveDepthExceededException
-
setInputState
public void setInputState(Activation.Builder input)
-
needsPropagation
public boolean needsPropagation(SearchNode sn, boolean lowerBoundChange, boolean upperBoundChange)
-
checkSelfReferencing
public boolean checkSelfReferencing(Activation act)
-
isFinalActivation
public boolean isFinalActivation()
-
getFinalState
public State getFinalState()
-
getValue
public double getValue()
-
getSequence
public Integer getSequence()
-
getCandidateId
public Integer getCandidateId()
-
setCandidateId
public void setCandidateId(Integer candidateId)
-
computeOptionProbabilities
public void computeOptionProbabilities()
-
searchStateToString
public String searchStateToString()
-
toStringDetailed
public String toStringDetailed()
-
getExpectedState
public State getExpectedState()
-
getOptions
public Collection<Option> getOptions()
-
compareTo
public int compareTo(Activation act)
- Specified by:
compareToin interfaceComparable<Activation>
-
slotsToString
public String slotsToString()
-
identityToString
public String identityToString()
-
linksToString
public String linksToString()
-
saveState
public void saveState(SearchNode sn)
-
-