com.kpro.algorithm
Class LearnAlgorithm
java.lang.Object
com.kpro.algorithm.LearnAlgorithm
- Direct Known Subclasses:
- Learn_Constant, LearnAlgBasic, LearnAlgStand
public abstract class LearnAlgorithm
- extends java.lang.Object
An abstract class covering all learning algorithms. The learning algorithm
alters the weights configuration after examining the current database after
the addition of a new policy.
- Version:
- 29.09.11
- Author:
- ngerstle
Field Summary |
(package private) java.lang.String[] |
extraArgs
|
(package private) java.util.Properties |
weightsConfig
|
Constructor Summary |
LearnAlgorithm(java.util.Properties weightsConfig,
java.lang.String[] extraArgs)
Constructor for a learning algorithm. |
Method Summary |
protected abstract java.util.Properties |
applyML(Gio theIO)
The place to implement the actual algorithm for learning. |
void |
learn(Gio theIO)
runs the learning algorithm, and puts the results in the newWeight buffer in theIO(Gio) |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
weightsConfig
java.util.Properties weightsConfig
extraArgs
java.lang.String[] extraArgs
LearnAlgorithm
public LearnAlgorithm(java.util.Properties weightsConfig,
java.lang.String[] extraArgs)
- Constructor for a learning algorithm. accepts a weights configuration file.
- Parameters:
weightsConfig
- the weights configuration fileextraArgs
- extra arguments defined in configuration file
learn
public void learn(Gio theIO)
- runs the learning algorithm, and puts the results in the newWeight buffer in theIO(Gio)
- Parameters:
theIO
-
applyML
protected abstract java.util.Properties applyML(Gio theIO)
- The place to implement the actual algorithm for learning.
- Parameters:
theIO
- the current database, via Gio
- Returns:
- a modified properties, such that it more accurately reflects the relationships between policies