|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A filter determines how to integrate new semantic distance values
into the table. Implementations should take care of outliers
by ignoring them (they determine what should be considered an
outlier). In particular, the distance values may be
Distance.INFINITY
, in which case special action
should be taken to ensure the bogus value does not propogate.
Method Summary | |
---|---|
Distance |
recalculate(Distance previous_age,
Distance increment)
Update the age of the model as a function of the previous_age value and the increment
amount of time since the last call to this function.
|
void |
recalculate(SemanticDistanceModel.Tuple current,
Distance age,
Distance val)
Recalcualate the semantic distance and weight of a tuple given the tuple's contents (distance and previous weight) the new observed value. |
void |
recalculate(SemanticDistanceModel.Tuple old,
Distance age,
Set vals)
Recalculate the semantic distance given the old distance and the new observed values (in order). |
Distance |
sum(Distance current_age,
Distance addum_age)
Update the age of the model as a function of the current_age |
void |
sum(SemanticDistanceModel.Tuple current,
Distance curr_age,
int curr_clients,
SemanticDistanceModel.Tuple addum,
Distance addum_age,
int addum_clients)
Recalculate the semantic distance and weight of a tuple given a new distance value from another semantic distance table. |
void |
update_priority(SemanticDistanceModel.Tuple t,
SemanticDistanceModel.BoundedPrioQueue q)
Recalcualte the priority of t . |
Methods inherited from interface ostore.util.QuickSerializable |
---|
serialize |
Method Detail |
public void recalculate(SemanticDistanceModel.Tuple current, Distance age, Distance val)
val
that is considered an outlier (i.e., in that
case it should just return old
so the value does
not change.
current
- the tuple to be updated
(contains the current semantic distance)age
- the age of the current modelval
- the new value recordedpublic void recalculate(SemanticDistanceModel.Tuple old, Distance age, Set vals)
old
- the old semantic distanceage
- the age of the current modelvals
- the new Set<Distance> values recordedpublic Distance recalculate(Distance previous_age, Distance increment)
previous_age
value and the increment
amount of time since the last call to this function.
This is usually only called each time we receive a new observation.
previous_age
- the previous age valueincrement
- the amount of time since the previous call
to this function
public void sum(SemanticDistanceModel.Tuple current, Distance curr_age, int curr_clients, SemanticDistanceModel.Tuple addum, Distance addum_age, int addum_clients)
current
- the tuple to be updatedcurr_age
- the age of the current modelcurr_clients
- the number of clients represented by the
current modeladdum
- the new tuple from the other tableaddum_age
- the age of the other modeladdum_clients
- the number of clients represented by the
other modelpublic Distance sum(Distance current_age, Distance addum_age)
current_age of this model and the
addum_age
of the table we are incorporating into
this model.
public void update_priority(SemanticDistanceModel.Tuple t, SemanticDistanceModel.BoundedPrioQueue q)
t
. This is used to
determine its position in the table's prio queue. Smaller
values are more likely to be kept than larger values.
t
- the tupleq
- the prio queue this tuple is to be placed in
or is already in. WARNING: if t
is already
in the queue, then its priority is not yet updated. The
queue may not be in order.
t
as a distance.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |