### sequence function: apply-normed-frequency-class

description:
apply-normed-frequency-class(e, X)
finds the normed frequency class of e in X,
then returns ket(e.label, nfc(e, X))
the algorithm:
drop all elements <= 0 from X
smallest = the min coeff in X
largest = the max coeff in X
f = the value of e.label in X
if largest <= 0 or f <= 0:
return 0
fc_max = math.floor(0.5 - math.log(smallest / largest, 2)) + 1
return 1 - math.floor(0.5 - math.log(f / largest, 2)) / fc_max
examples:
see also:
normed-frequency-class

Home