operator: smooth
description:
smooth[dx] ket
smooths peaks into Gaussian's
eg:
smooth[dx] a|x: 3>
returns:
a/4 |x: 3 - dx> + a/2 |x: 3> + a/4 |x: 3 + dx>
usually invoked in form: smooth[dx]^power
also used to enable similarity between nearby integers
examples:
smooth[0.5] |age: 30>
0.25|age: 29.5> + 0.5|age: 30> + 0.25|age: 30.5>
-- show what this looks like:
bar-chart[40] smooth[0.5] |age: 30>
----------
age: 29.5 : ||||||||||||||||||||
age: 30 : ||||||||||||||||||||||||||||||||||||||||
age: 30.5 : ||||||||||||||||||||
----------
smooth[1]^5 |age: 40>
0.001|age: 35> + 0.01|age: 36> + 0.044|age: 37> + 0.117|age: 38> + 0.205|age: 39> + 0.246|age: 40> + 0.205|age: 41> + 0.117|age: 42> + 0.044|age: 43> + 0.01|age: 44> + 0.001|age: 45>
-- show what this looks like:
bar-chart[40] smooth[1]^5 |age: 40>
----------
age: 35 :
age: 36 : |
age: 37 : |||||||
age: 38 : |||||||||||||||||||
age: 39 : |||||||||||||||||||||||||||||||||
age: 40 : ||||||||||||||||||||||||||||||||||||||||
age: 41 : |||||||||||||||||||||||||||||||||
age: 42 : |||||||||||||||||||
age: 43 : |||||||
age: 44 : |
age: 45 :
----------
rescale[1] smooth[1]^5 |age: 40>
0.004|age: 35> + 0.04|age: 36> + 0.179|age: 37> + 0.476|age: 38> + 0.833|age: 39> + |age: 40> + 0.833|age: 41> + 0.476|age: 42> + 0.179|age: 43> + 0.04|age: 44> + 0.004|age: 45>
age-simm (*,*) #=> simm(smooth[1]^5 |_self1>, smooth[1]^5 |_self2>)
age-simm(|age: 36>, |age: 40>)
0.227|simm>
see also:
rescale, simm, Gaussian
Home