|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.siefkes.nlstego.predict.FetchStats
public abstract class FetchStats
Abstract class for collecting statistics about the fetching of items that can be used for predicting.
Created (11.09.2001 16:35:54).
| Field Summary | |
|---|---|
protected static Integer |
END_OF_SESSION
Constant used to mark the end of a session. |
protected static Integer |
START_OF_SESSION
Constant used to mark the start of a session. |
| Constructor Summary | |
|---|---|
protected |
FetchStats(Configuration conf,
StatelessFilter filter)
Creates a new instance. |
| Method Summary | |
|---|---|
void |
add(String key,
int sessionID)
Adds a request of an item, training the model. |
abstract void |
add(String key,
int sessionID,
boolean train)
Adds a request of an item. |
int |
getID()
Returns the unique ID of this instance. |
Integer |
getIDInteger()
Returns the unique ID of this instance as an Integer object, for easy storage in collections etc.. |
StatelessFilter |
getStatelessFilter()
Returns the optional filter that decides which predictions should be stored in the stateless (global) model; if null, all
predictions are stored. |
static Integer |
mapKey(String key)
Maps the key used to identify a document to a compact representation used for storing it in the FetchStats. |
abstract SortedMap |
predict(int number,
int sessionID)
Predicts the documents that will be probably fetched next. |
abstract String |
printModelStats()
Prints statistical information about this model. |
abstract void |
sessionEnded(int sessionID)
Marks a session as ended. |
void |
shutdown(boolean requestgraceful)
Shuts down this entity. |
static String |
unmapKey(int representation)
Maps the key used to identify an item to a compact representation used for storing it in the FetchStats. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final Integer START_OF_SESSION
Created (27.09.2001 12:11:47) by Christian Siefkes.
protected static final Integer END_OF_SESSION
Created (01.10.2001 10:53:53) by Christian Siefkes.
| Constructor Detail |
|---|
protected FetchStats(Configuration conf,
StatelessFilter filter)
Created (11.09.2001 16:35:54) by Christian Siefkes.
conf - the Configuration to usefilter - optional filter that decides which predictions should be stored
in the stateless (global) model; if null, all predictions are
stored| Method Detail |
|---|
public final void add(String key,
int sessionID)
Created (27.09.2001 12:16:43) by Christian Siefkes.
key - the key of the item currently requested
fetching the last document in this sessionsessionID - the ID of the current session (must be unique among all
sessions parallel in progress)
public abstract void add(String key,
int sessionID,
boolean train)
Created (27.09.2001 12:16:43) by Christian Siefkes.
key - the key of the item currently requested
fetching the last document in this sessionsessionID - the ID of the current session (must be unique among all
sessions parallel in progress)train - true iff the model should be trained, i.e.
this request should be incorporated into the prediction model; otherwise
only the internal state will be changed so the next call to predict(int, int) will find suitable predictions (this happens in any case)public static Integer mapKey(String key)
Created (27.09.2001 15:20:15) by Christian Siefkes.
key - the key of the document (the URL's external form)
public abstract SortedMap predict(int number,
int sessionID)
Created (27.09.2001 12:16:43) by Christian Siefkes.
number - the number of results to return, >0sessionID - the ID of the current session (must be unique among all
sessions parallel in progress)
number, all matching
documents that had at least minAccesses)public abstract void sessionEnded(int sessionID)
Created (27.09.2001 12:16:43) by Christian Siefkes.
sessionID - the ID of the current session (must be unique among all
sessions parallel in progress)public void shutdown(boolean requestgraceful)
Created (04.03.2002 11:31:28) by Christian Siefkes.
requestgraceful - a boolean; if set to true the entity
should wait for its current activity to stop and then shutdown, if set to
false it shuts down immediatelypublic abstract String printModelStats()
public static String unmapKey(int representation)
throws IndexOutOfBoundsException
Created (27.09.2001 15:20:15) by Christian Siefkes.
representation - the compact integer representation of a
key which must have been mapped before by mapKey
IndexOutOfBoundsException - if the key wasn't mapped beforepublic final int getID()
public final Integer getIDInteger()
public StatelessFilter getStatelessFilter()
null, all
predictions are stored.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||