public class CompetitiveGroup extends NeuronGroup
Modifier and Type | Class and Description |
---|---|
static class |
CompetitiveGroup.UpdateMethod
Specific implementation of competitive learning.
|
DEFAULT_GROUP_SIZE, DEFAULT_LAYOUT, FLUSH_FREQUENCY
Constructor and Description |
---|
CompetitiveGroup(Network newRoot,
CompetitiveGroup oldNet)
Copy constructor.
|
CompetitiveGroup(Network root,
int numNeurons)
Constructs a competitive network with specified number of neurons.
|
Modifier and Type | Method and Description |
---|---|
CompetitiveGroup |
deepCopy(Network newParent)
Returns a deep copy of a copyable group using the same root network as
the original.
|
double |
getLeakyLearningRate()
Return leaky learning rate.
|
double |
getLearningRate()
Return the learning rate.
|
double |
getLoseValue()
Return the loser value.
|
boolean |
getNormalizeInputs()
Return the normalize inputs value.
|
double |
getSynpaseDecayPercent() |
java.lang.String |
getTypeDescription()
Return a human-readable name for this type of neuron group.
|
CompetitiveGroup.UpdateMethod |
getUpdateMethod() |
boolean |
getUseLeakyLearning()
Return the leaky learning value.
|
double |
getWinValue()
Return the winner value.
|
void |
normalizeAllIncomingWeights()
Normalize all weights coming in to this network.
|
void |
normalizeIncomingWeights()
Normalize weights coming in to this network, separately for each neuron.
|
void |
randomize()
Randomize and normalize weights.
|
void |
randomizeIncomingWeights()
Randomize all weights coming in to this network.
|
void |
setLeakyLearningRate(double leakyRate)
Sets the leaky learning rate.
|
void |
setLearningRate(double rate)
Sets learning rate.
|
void |
setLoseValue(double loseValue)
Sets the loser value.
|
void |
setNormalizeInputs(boolean normalizeInputs)
Sets the normalize inputs value.
|
void |
setSynpaseDecayPercent(double synpaseDecayPercent) |
void |
setUpdateMethod(CompetitiveGroup.UpdateMethod updateMethod) |
void |
setUseLeakyLearning(boolean useLeakyLearning)
Sets the leaky learning value.
|
void |
setWinValue(double winValue)
Sets the winner value.
|
void |
update()
Updates all the neurons in the neuron group according to their
NeuronUpdateRule(s).
|
addIncomingSg, addNeuron, addNeuron, addOutgoingSg, applyInputs, applyLayout, applyLayout, clearActivations, clearNeuronList, containsAsIncoming, containsAsOutgoing, containsNeuron, copyActivations, delete, forceSetActivationLevels, forceSetActivations, getActivations, getBetweenNeuronInterval, getBiases, getCenterX, getCenterY, getExternalActivations, getFourCorners, getGridThreshold, getHeight, getIncomingSgs, getIncomingWeights, getLabelsOfActiveNeurons, getLayout, getMaxDim, getMaxX, getMaxY, getMinX, getMinY, getMostActiveNeuron, getNeuronList, getNeuronsInRadius, getNeuronType, getNumSubSamples, getOutgoingSg, getOutgoingWeights, getPosition, getSpikeIndexes, getTestData, getUpdateMethodDesecription, getWidth, inFanInOfSomeNode, isAllClamped, isAllUnclamped, isEmpty, isInputMode, isRecordAsSpikes, isRecording, isSpikingNeuronGroup, isUseSubSampling, offset, printActivations, prune, randomizeBiases, randomizeOutgoingWeights, readNextInputs, removeIncomingSg, removeNeuron, removeOutgoingSg, resetSubsamplingIndices, setActivationLevels, setActivations, setBetweenNeuronInterval, setClamped, setGridThreshold, setIncrement, setInputMode, setInputValues, setLayout, setLayoutBasedOnSize, setLayoutBasedOnSize, setLocation, setLowerBound, setNeuronType, setNeuronType, setNumSubSamples, setRecordAsSpikes, setSpikingNeuronGroup, setTestData, setUpperBound, setUseSubSampling, setXYZCoordinatesFromFile, size, startRecording, stopRecording, testAndSetIfSpiking, toString, writeActsToFile
getId, getLabel, getParentGroup, getParentNetwork, getStateInfo, hasParentGroup, isMarkedForDeletion, isTopLevelGroup, recursivelySetIds, setId, setLabel, setMarkedForDeletion, setParentGroup, setStateInfo
public CompetitiveGroup(Network root, int numNeurons)
numNeurons
- size of this network in neuronsroot
- reference to Network.public CompetitiveGroup(Network newRoot, CompetitiveGroup oldNet)
newRoot
- new root networkoldNet
- old network.public CompetitiveGroup deepCopy(Network newParent)
CopyableGroup
deepCopy
in interface CopyableGroup<NeuronGroup>
deepCopy
in class NeuronGroup
newParent
- the parent network for this group, potentially
different from the original (used when copying and pasting
from one network to another)public java.lang.String getTypeDescription()
NeuronGroup
getTypeDescription
in class NeuronGroup
public void update()
NeuronGroup
update
in class NeuronGroup
public void normalizeIncomingWeights()
public void normalizeAllIncomingWeights()
public void randomizeIncomingWeights()
randomizeIncomingWeights
in class NeuronGroup
public void randomize()
randomize
in class NeuronGroup
public double getLearningRate()
public void setLearningRate(double rate)
rate
- The new epsilon value.public final double getLoseValue()
public final void setLoseValue(double loseValue)
loseValue
- The new loser valuepublic final double getWinValue()
public final void setWinValue(double winValue)
winValue
- The new winner valuepublic double getLeakyLearningRate()
public void setLeakyLearningRate(double leakyRate)
leakyRate
- Leaky rate value to setpublic boolean getNormalizeInputs()
public void setNormalizeInputs(boolean normalizeInputs)
normalizeInputs
- Normalize inputs value to setpublic boolean getUseLeakyLearning()
public void setUseLeakyLearning(boolean useLeakyLearning)
useLeakyLearning
- The leaky learning value to setpublic double getSynpaseDecayPercent()
public void setSynpaseDecayPercent(double synpaseDecayPercent)
synpaseDecayPercent
- the synpaseDecayPercent to setpublic CompetitiveGroup.UpdateMethod getUpdateMethod()
public void setUpdateMethod(CompetitiveGroup.UpdateMethod updateMethod)
updateMethod
- the updateMethod to set