// single feature
 public int classify(StateOfNature[] classes, double x)
 {
     if (classes == null)
         return -1;
     double meu, sigma;
     composition_object_normal_distribution = new NormalDistribution();
     double maximum_likelihood = double.NegativeInfinity;
     int class_index = -1;
     for (int i = 0; i < classes.Length; i++)
     {
         if (classes[i] == null)
             continue;
         meu = classes[i].get_averaged_meu();
         sigma = classes[i].get_averaged_sigma();
         double likelihood = composition_object_normal_distribution.my_normal_function(x , meu, sigma);
         double prior = classes[i].prior;
         if (likelihood * prior > maximum_likelihood)
         {
             class_index = i;
             maximum_likelihood = likelihood * prior;
         }
     }
     return class_index;
 }
 private void button_render_Click(object sender, EventArgs e)
 {
     NormalDistribution obj_norm_dist = new NormalDistribution(Double.Parse(textBox_meu.Text), Double.Parse(textBox_sigma.Text));
     obj_norm_dist.fill_plot(chart_normal_distribution_probability_density_function);
 }
 public BayesianInferenceEngine()
 {
     composition_object_normal_distribution = new NormalDistribution();
 }