|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkohonen.WTALearningFunction
public class WTALearningFunction
Winner Takes All - algorytm there only winnig neuron
weights are changed according to the formula w(k+1) = w(k) + n * (x-w) where
w(k+1) - neuron weight in k +1 interation
w(k) - neruon weight for k iteration
n - value of learning function factor for k iteriation
x - learning vector od data
w - neuron weight
WTMLearningFunction
Field Summary | |
---|---|
protected LearningFactorFunctionalModel |
functionalModel
reference to function model |
protected LearningDataModel |
learningData
reference to learning data |
protected int |
maxIteration
max number of iteration |
protected MetricModel |
metrics
reference to metrics |
protected NetworkModel |
networkModel
reference to network model |
Constructor Summary | |
---|---|
WTALearningFunction(NetworkModel networkModel,
int maxIteration,
MetricModel metrics,
LearningDataModel learningData,
LearningFactorFunctionalModel functionalModel)
Creates a new instance of WTALearningFunction. |
Method Summary | |
---|---|
protected void |
changeNeuronWeight(int neuronNumber,
double[] vector,
int iteration)
Change neuron weights for specified neuron number,iteration and input data vector |
protected int |
getBestNeuron(double[] vector)
Return number of the best neuron for specified input vector |
LearningFactorFunctionalModel |
getFunctionalModel()
Return function model |
LearningDataModel |
getLearningData()
Return reference to learning data |
int |
getMaxIteration()
Return maximal number of iteration |
MetricModel |
getMetrics()
Return metrics |
NetworkModel |
getNetworkModel()
Return network model |
boolean |
isShowComments()
Return information if learning process dispalys information about learning process. |
void |
learn()
Start learning process |
void |
setFunctionalModel(LearningFactorFunctionalModel functionalModel)
Set functional learning factor model |
void |
setLearningData(LearningDataModel learningData)
Set reference to learning data |
void |
setMaxIteration(int maxIteration)
Set max interation |
void |
setMetrics(MetricModel metrics)
Set metrics |
void |
setNetworkModel(NetworkModel networkModel)
Set network model |
void |
setShowComments(boolean showComments)
Set if comments durring learning process must be shown. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected MetricModel metrics
protected NetworkModel networkModel
protected int maxIteration
protected LearningDataModel learningData
protected LearningFactorFunctionalModel functionalModel
Constructor Detail |
---|
public WTALearningFunction(NetworkModel networkModel, int maxIteration, MetricModel metrics, LearningDataModel learningData, LearningFactorFunctionalModel functionalModel)
networkModel
- network modelmaxIteration
- iteration numbermetrics
- metricslearningData
- learnig datafunctionalModel
- functional modelMetricModel
,
LearningData
,
NetworkModel
,
LearningFactorFunctionalModel
Method Detail |
---|
public boolean isShowComments()
public void setShowComments(boolean showComments)
showComments
- true if comments must be shown, false otherwisepublic MetricModel getMetrics()
MetricModel
public void setMetrics(MetricModel metrics)
metrics
- metricspublic void setNetworkModel(NetworkModel networkModel)
networkModel
- network modelpublic NetworkModel getNetworkModel()
public void setMaxIteration(int maxIteration)
maxIteration
- max interationpublic int getMaxIteration()
public void setLearningData(LearningDataModel learningData)
learningData
- reference to learning datapublic LearningDataModel getLearningData()
public void setFunctionalModel(LearningFactorFunctionalModel functionalModel)
functionalModel
- functional learning factor modelpublic LearningFactorFunctionalModel getFunctionalModel()
protected int getBestNeuron(double[] vector)
vector
- input vector
protected void changeNeuronWeight(int neuronNumber, double[] vector, int iteration)
neuronNumber
- neuron numbervector
- input vectoriteration
- iteration numberpublic void learn()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |