|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.cmu.minorthird.classify.OnlineClassifierLearner edu.cmu.minorthird.classify.OnlineVersion
public class OnlineVersion
Online version of a BatchClassifierLearner.
Constructor Summary | |
---|---|
OnlineVersion()
|
|
OnlineVersion(BatchClassifierLearner innerLearner)
|
|
OnlineVersion(BatchClassifierLearner innerLearner,
double loadFactor)
|
|
OnlineVersion(BatchClassifierLearner innerLearner,
double loadFactor,
OnlineClassifierLearner bootstrapLearner,
int minBatchTrainingSize)
Emulate on-line learning with a batch algorithm. |
Method Summary | |
---|---|
void |
addExample(Example example)
Subclasses should use this method to perform whatever incremental update is needed after in response to a new example. |
void |
completeTraining()
A promise from the caller that no further examples will be added. |
double |
getBatchLoadFactor()
|
OnlineClassifierLearner |
getBootstrapLearner()
|
Classifier |
getClassifier()
Subclasses should use this method to return the current classifier. |
BatchClassifierLearner |
getInnerLearner()
|
int |
getMinBatchTrainingSize()
|
ExampleSchema |
getSchema()
Returns the ExampleSchema - constraints on what the Examples will be. |
void |
reset()
'forget' everything about the last learning task, and start a new task. |
void |
setBatchLoadFactor(double d)
|
void |
setBootstrapLearner(OnlineClassifierLearner learner)
|
void |
setInnerLearner(BatchClassifierLearner learner)
|
void |
setMinBatchTrainingSize(int m)
|
void |
setSchema(ExampleSchema schema)
Accept an ExampleSchema - constraints on what the Examples will be. |
Methods inherited from class edu.cmu.minorthird.classify.OnlineClassifierLearner |
---|
copy, hasNextQuery, nextQuery, setInstancePool |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OnlineVersion(BatchClassifierLearner innerLearner, double loadFactor, OnlineClassifierLearner bootstrapLearner, int minBatchTrainingSize)
innerLearner
- batch learning algorithmloadFactor
- re-train batch algorithm when number of available
examples is loadFactor * M, where M is the number of examples
available at the last training round.bootstrapLearner
- on-line learner used for the first few roundsminBatchTrainingSize
- use online bootstrapLearner until minBatchTrainingSize examples are available.public OnlineVersion(BatchClassifierLearner innerLearner, double loadFactor)
public OnlineVersion(BatchClassifierLearner innerLearner)
public OnlineVersion()
Method Detail |
---|
public BatchClassifierLearner getInnerLearner()
public void setInnerLearner(BatchClassifierLearner learner)
public OnlineClassifierLearner getBootstrapLearner()
public void setBootstrapLearner(OnlineClassifierLearner learner)
public double getBatchLoadFactor()
public void setBatchLoadFactor(double d)
public int getMinBatchTrainingSize()
public void setMinBatchTrainingSize(int m)
public final void setSchema(ExampleSchema schema)
ClassifierLearner
public final ExampleSchema getSchema()
ClassifierLearner
public final void reset()
OnlineClassifierLearner
reset
in interface ClassifierLearner
reset
in class OnlineClassifierLearner
public final void addExample(Example example)
OnlineClassifierLearner
addExample
in interface ClassifierLearner
addExample
in class OnlineClassifierLearner
public final void completeTraining()
OnlineClassifierLearner
completeTraining
in interface ClassifierLearner
completeTraining
in class OnlineClassifierLearner
public final Classifier getClassifier()
OnlineClassifierLearner
getClassifier
in interface ClassifierLearner
getClassifier
in class OnlineClassifierLearner
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |