|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.siefkes.nlstego.predict.PredictionManager
public final class PredictionManager
Manages the predictions of items, combining different prediction models.
Created (26.11.2001 09:32:34).
| Constructor Summary | |
|---|---|
PredictionManager(Configuration conf)
Creates a new instance. |
|
| Method Summary | |
|---|---|
void |
addItem(String key,
boolean train)
Registers an actual request. |
List<PredictedToken> |
choosePredictions()
Delegates to choosePredictions(int), setting the number of
predictions to return to getNumberOfPredictions(). |
List<PredictedToken> |
choosePredictions(int number)
Selects the most valuable predictions. |
int |
getID()
Returns the unique ID of this instance. |
double |
getMinProbability()
A standard get*(). |
Iterator<FetchStats> |
getPredictionModelList()
Returns an iterator over the registered prediction models. |
String |
printModelStats()
Prints statistical information about the used models. |
void |
registerPredictionModel(FetchStats model)
Registers a prediction model with this prediction manager. |
String |
toString()
Returns a String that represents the value of this object. |
boolean |
unregisterPredictionModel(FetchStats model)
Unregisters a prediction model from this prediction manager. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PredictionManager(Configuration conf)
Created (26.11.2001 09:34:51) by Christian Siefkes.
conf - the Configuration to use| Method Detail |
|---|
public List<PredictedToken> choosePredictions()
throws IllegalStateException,
ConcurrentModificationException
choosePredictions(int), setting the number of
predictions to return to getNumberOfPredictions().
PredictedTokens with the most valuable
predictions; will have between 0 (if no more predictions with the minimum
probability exist) and getNumberOfPredictions() elements; sorted
according to their probability
IllegalStateException - if this method was called but there are no
registered prediction models
ConcurrentModificationException - might be thrown if prediction
models are (un)registered during a call to this method
public List<PredictedToken> choosePredictions(int number)
throws IllegalStateException,
ConcurrentModificationException
Created (26.11.2001 09:53:36) by Christian Siefkes.
number - the number of predictions to return
PredictedTokens with the most valuable
predictions; will have between 0 (if no more predictions with the minimum
probability exist) and number elements; sorted according to
their probability
IllegalStateException - if this method was called but there are no
registered prediction models
ConcurrentModificationException - might be thrown if prediction
models are (un)registered during a call to this methodregisterPredictionModel(FetchStats),
unregisterPredictionModel(FetchStats)public double getMinProbability()
get*(). Created (04.10.2001 16:56:09) by Christian Siefkes.
public void addItem(String key,
boolean train)
throws IllegalStateException,
ConcurrentModificationException
updatePredictions to add new ones. For performance reasons,
this method is not synchronized so you are not allowed to register
or unregister prediction models during a call to this method.Created (03.01.2002 14:02:41) by Christian Siefkes.
key - the key of the item currently requestedtrain - true iff the models should be trained, i.e.
this request should be incorporated into the prediction models; otherwise
only the internal state of the models will be changed so the next call to
choosePredictions(int) will find suitable predictions (this happens
in any case)
IllegalStateException - if this method was called but there are no
registered prediction models
ConcurrentModificationException - might be thrown if prediction
models are (un)registered during a call to this methodregisterPredictionModel(FetchStats),
unregisterPredictionModel(FetchStats)public String toString()
Created (04.10.2001 17:42:12) by Christian Siefkes.
toString in class Objectpublic Iterator<FetchStats> getPredictionModelList()
FetchStats.
public String printModelStats()
public void registerPredictionModel(FetchStats model)
model - the model to registerpublic boolean unregisterPredictionModel(FetchStats model)
model - the model to unregister
public int getID()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||