Interface SMInterval
- All Superinterfaces:
SimilarityMeasure
- All Known Implementing Classes:
SMIntervalImpl
The interval in the case means that a valid value exists in this range, but it is not sure where it is. It can't be assumed that valid values are in the intersection of query and case interval. Therefore, the three strategies must be distinguished:
The optimistic one assumes that valid points are in the intersection. With the imprecise query one point is requested from all the possible points of the precise case. Therefore, we just have to distinguish the following two situations:
- $z_i \not= \emptyset$: The local similarity is one, because an arbitrary element of $z_i$ or $z_i$ itself can be returned.
- $z_i = \emptyset$: The local similarity must consider the ``distance'' from $x_{ilb}$ to $y_{iub}$ and $x_{iub}$ to $y_{ilb}$, so that \[sim^*_{Ai}(x_i,y_i) = \max\left(sim_{Ai}(x_{ilb},y_{iub}), sim_{Ai}(x_{iub},y_{ilb})\right)\]
Summarizing, a local similarity measure can be defined as: \[ sim^*_{Ai}(x_i, y_i) = \left\{ \begin{array}{c@{\quad}l} 1 & \mbox{if} \quad z_i \not= \emptyset\\ \max\left(\begin{array}{l} sim_{Ai}(x_{ilb},y_{iub}),\\ sim_{Ai}(x_{iub},y_{ilb}) \end{array}\right) & \mbox{otherwise} \end{array} \right. \]
The pessimistic strategy assumes that no valid point is in the intersection which leads to the local similarity \[sim^*_{Ai}(x_i, y_i)=\\underset{\forall x_{is}\in x_i, y_{it}\in y_i}{\min}\left\{sim_{Ai}(x_{is},y_{it})\right\}\]
The average strategy calculates the probability that a valid point is in the intersection $`z_i`$, e.g. by calculating the relation between the intersection size and the case interval size. Consequently, the similarity measure is defined as: $`sim^*_{Ai}(x_i, y_i) = \begin{cases} \frac{|y_{iub}-y_{ilb}|}{|z_{iub}-z_{ilb}|} & \text{, if } z_i =\not \emptyset \\ 0 &, otherwise \end{cases}`$
- Author:
- Rainer Maximini
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Strategy
Default strategy for similarity computations isStrategy.OPTIMISTIC
.static final String
Name of similarity measure is "Interval".Fields inherited from interface de.uni_trier.wi2.procake.similarity.SimilarityMeasure
LOG_ORDER_NAME_NOT_FOUND
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Similarity measure for intervals can work also on the natural order of a AtomicDataClass if available.void
setOrderName
(String orderName) void
setSimilarityToUse
(String newValue) In general, the element objects of the interval are compared with their default similarity measure.void
setStrategy
(Strategy strategy) Methods inherited from interface de.uni_trier.wi2.procake.similarity.SimilarityMeasure
compute, getDataClass, getName, getSystemName, isForceOverride, isReusable, setForceOverride
-
Field Details
-
NAME
Name of similarity measure is "Interval".- See Also:
-
DEFAULT_STRATEGY
Default strategy for similarity computations isStrategy.OPTIMISTIC
.
-
-
Method Details
-
getOrderName
String getOrderName() -
setOrderName
- Throws:
ProCAKENameNotFoundException
-
getSimilarityToUse
String getSimilarityToUse()- Returns:
- The defined name of the
SimilarityMeasure
that should be used for the elements. - See Also:
-
setSimilarityToUse
In general, the element objects of the interval are compared with their default similarity measure. But in some situations it can be necessary to use another similarity measure for the elements of an interval. Therefore, it exists the possibility to specify a similarity measure name that should be used instead. For eachDataObject
a similarity measure with that name should exist. Otherwise, the comparision of objects are ignored.Summarizing:
- If the
newValue
isnull
the default measures of the objects are used. This is the default behaviour. - If the
newValue
is the name of a similarity measure, for each data class whose objects can be occured in the interval a similarity measure with this name must exist.
- Parameters:
newValue
- The name of the similarity measure that should be used for the elements.
- If the
-
getStrategy
Strategy getStrategy() -
setStrategy
-
removeOrder
void removeOrder()Similarity measure for intervals can work also on the natural order of a AtomicDataClass if available. Therefore, it is possible to remove an already assigned order.
-