nl_tokens: end FUNCTION linspace () FUNCTION : kde_estimator_silverman ( vector ) Use s Silverman s rule of thumb to derive an empirical estimate for an optimal KDE bandwidth selection . Source : Silverman B . W . ( 1998 ) . Density Estimation for Statistics and Data Analysis . London : Chapman & Hall / CRC . p . 48 . ISBN 0 - 412 - 24620 - 1 .
pl_tokens: function kde_estimator_silverman ( <mask> ) { var sigma , N = vector . length , A ; // [0] Calculate the sample standard deviation: sigma = stdev ( vector ) ; // [1] Calculate the estimator: A = Math . pow ( ( 4 / ( 3 * N ) ) , 0.2 ) ; return A * sigma ; }