Esempio n. 1
0
        public static float evaluate_pdf(SymbolHeuristics se, int value)
        {
            float x = (se.count * ((float)value) - se.sum);
            float y = -0.5F * x * x / (se.count * se.var_sum);

            float pdf = (float)(Math.Sqrt(se.count / se.var_sum) * Math.Exp(y) / Math.Sqrt(2.0F * ((float)Math.PI)));

            return(pdf);
        }
Esempio n. 2
0
        public static float evaluate_pdf(SymbolHeuristics se, int value)
        {
            float x = (se.count * ((float)value) - se.sum);
            float y = -0.5F * x * x / (se.count * se.var_sum);

            float pdf = (float)(Math.Sqrt(se.count / se.var_sum) * Math.Exp(y) / Math.Sqrt(2.0F * ((float)Math.PI)));

            return pdf;
        }