1 --- rlab-2.2.9-old/clibs/sprannlib/src/stat/parzen.c 2006-07-20 18:00:45.000000000 -0400
2 +++ rlab-2.2.9/clibs/sprannlib/src/stat/parzen.c 2006-11-16 00:32:51.000000000 -0500
7 + * FUNC Calculate the criterion function.
10 +static double func (double s)
12 + double sk, fc, f, ff, p, dis;
15 + sk = -1.0 / (2.0 * s * s);
18 + for (i = 0; i < size; i++)
20 + for (f = ff = j = 0; j < size; j++)
25 + p = exp((double) (sk * dis));
30 + fc += ff / (f * s * s);
32 + fc -= (double) (size * dim);
38 * PARZEN_BEST_S Calculate optimal value of parzen smoothing parameter s for
39 * a certain class. It uses the following inputs:
46 - * FUNC Calculate the criterion function.
49 -static double func (double s)
51 - double sk, fc, f, ff, p, dis;
54 - sk = -1.0 / (2.0 * s * s);
57 - for (i = 0; i < size; i++)
59 - for (f = ff = j = 0; j < size; j++)
64 - p = exp((double) (sk * dis));
69 - fc += ff / (f * s * s);
71 - fc -= (double) (size * dim);