Download GROK User Guide August 28, 2013

Transcript
2.4
Region scores and aggregate functions
Function
count
first
last
min
max
product
sum
zero
Formula
f (x, y) = x + 1
f (x, y) = x
f (x, y) = y
f (x, y) = min(x, y)
f (x, y) = max(x, y)
f (x, y) = xy
f (x, y) = x + y
f (x, y) = 0
Initial
0
–
0
–
–
1
0
0
6
Description
Count the number of score updates.
Use the first defined value.
Replace existing value with new one.
Use minimum of values.
Use maximum of values.
Use product of values.
Use sum of values.
Set score to zero.
Table 1: Aggregate functions descriptions. Formulas describe how an updated score
value is computed from the existing value x and a novel value y. Scores are initialized
to a value that depends on the aggregate function; the initial value is undefined (–) for
some functions. The last function defines simple assignment semantics and is the
default.
the score function is composed piecewise by three neighboring regions whose score
annotation values are 8, 13 and 5. The modification affects the interval from 110 to
150 – denoted as half-open interval [110, 150) – and multiplies all scores with 2. The
modified score function is composed of five regions.
set_score([110, 150), 2, product)
Before:
After:
[100, 120): 8
[100, 110): 8
[120, 135): 13
[110, 120): 2*8 = 16
[135, 160): 5
[120, 135): 2*13 = 26
[135, 150): 2*5 = 10
[150, 160): 5