public class WTMLearningFunction extends java.lang.Object implements LearningFunction
Modifier and Type | Field and Description |
---|---|
protected FunctionLearn |
functionalModel
Reference to function model
|
protected LearningDataModel |
learningData
Reference to learning data
|
protected int |
maxIteration
Max number of iteration
|
protected FunctionMetric |
metrics
Reference to metrics
|
protected NeighbourhoodFunctionModel |
neighbourhoodFunction
Reference to neighbourhood function model
|
protected NetworkModel |
networkModel
Reference to network model
|
protected TopologyModel |
topology
Reference to topology model
|
Constructor and Description |
---|
WTMLearningFunction(NetworkModel networkModel,
int maxIteration,
FunctionMetric metrics,
LearningDataModel learningData,
FunctionLearn functionalModel,
NeighbourhoodFunctionModel neighbourhoodFunction)
Creates a new instance of WTMLearningFunction
|
Modifier and Type | Method and Description |
---|---|
protected void |
changeNeuronWeight(int neuronNumber,
double[] vector,
double factor,
double influence)
Change neuron weights for specified neuron number, iteration, input data vector and distance
and distance to winning neuron
|
void |
changeWeight(int neuronNumber,
double[] vector,
int iteration)
Change specified neuron weight
|
protected int |
getBestNeuron(double[] vector)
Return number of best neuron for specified input vector
|
FunctionLearn |
getFunctionalModel()
Return function model
|
LearningDataModel |
getLearningData()
Return reference to learning data
|
int |
getMaxIteration()
Return maximal number of iteration
|
FunctionMetric |
getMetrics()
Return metrics
|
NeighbourhoodFunctionModel |
getNeighbourhoodFunction()
Return reference to neighbourhood function
|
NetworkModel |
getNetworkModel()
Return network model
|
void |
learn()
Start learning process
|
void |
setFunctionalModel(FunctionLearn functionalModel)
Set functional learning factor model
|
void |
setLearningData(LearningDataModel learningData)
Set reference to learning data
|
void |
setMaxIteration(int maxIteration)
Set max iteration
|
void |
setMetrics(FunctionMetric metrics)
Set metrics
|
void |
setNeighboorhoodFunction(NeighbourhoodFunctionModel neighbourhoodFunction)
Set reference to neighbourhood function
|
void |
setNetworkModel(NetworkModel networkModel)
Set network model
|
protected FunctionMetric metrics
protected NetworkModel networkModel
protected int maxIteration
protected LearningDataModel learningData
protected FunctionLearn functionalModel
protected TopologyModel topology
protected NeighbourhoodFunctionModel neighbourhoodFunction
public WTMLearningFunction(NetworkModel networkModel, int maxIteration, FunctionMetric metrics, LearningDataModel learningData, FunctionLearn functionalModel, NeighbourhoodFunctionModel neighbourhoodFunction)
networkModel
- reference to network ModelmaxIteration
- max number of iterationmetrics
- reference to metricslearningData
- reference to learning datafunctionalModel
- reference to functional ModelneighbourhoodFunction
- reference to neighbourhood function. If null this
is set to a FractionNeighbourhoodFunction
.public void setNeighboorhoodFunction(NeighbourhoodFunctionModel neighbourhoodFunction)
neighbourhoodFunction
- reference to neighbourhood functionpublic NeighbourhoodFunctionModel getNeighbourhoodFunction()
public FunctionMetric getMetrics()
FunctionMetric
public void setMetrics(FunctionMetric metrics)
metrics
- metricspublic void setNetworkModel(NetworkModel networkModel)
networkModel
- network modelpublic NetworkModel getNetworkModel()
public void setMaxIteration(int maxIteration)
maxIteration
- max iterationpublic int getMaxIteration()
public void setLearningData(LearningDataModel learningData)
learningData
- reference to learning datapublic LearningDataModel getLearningData()
public void setFunctionalModel(FunctionLearn functionalModel)
functionalModel
- functional learning factor modelpublic FunctionLearn getFunctionalModel()
protected int getBestNeuron(double[] vector) throws java.lang.Exception
vector
- input vectorjava.lang.Exception
- any error.public void changeWeight(int neuronNumber, double[] vector, int iteration) throws java.lang.Exception
neuronNumber
- neuron Numbervector
- input vectoriteration
- iteration numberjava.lang.Exception
- any error.protected void changeNeuronWeight(int neuronNumber, double[] vector, double factor, double influence) throws java.lang.Exception
neuronNumber
- neuron numbervector
- input vectorfactor
- the iteration number or factor.influence
- cells in neighbourhood have a reduced influence.java.lang.Exception
- any error.public void learn() throws java.lang.Exception
learn
in interface LearningFunction
java.lang.Exception
- any error.