Loading

mapper.kernel.logistic


mapper
Since v1.0.0
Available on all platforms
See also

This function pushes onto the stack a kernel smoothing mapper using a logistic kernel. The mapper applies the Nadaraya-Watson kernel-weighted average algorithm.

Signature

Examples

NEWGTS 'random walk' RENAME 0.0 'i' STORE 1 1000 <% NaN NaN NaN $i RAND 0.5 - + DUP 'i' STORE ADDVALUE %> FOR DUP // Pseudo radius of the kernel (the kernel really has a diameter of 2 * radius + 1 steps) 8 'radius' STORE // Number of time units per radius unit 1 'step' STORE [ SWAP $step $radius 2 * 1 + mapper.kernel.logistic $radius $radius 0 ] MAP 0 GET '%2B:smoothed' RENAME