コード例 #1
0
 public double CalculeErreur( Observation obs )
 {
     double somme = 0;
        for (int i = 0; i < poids.Count; i++)
        somme = somme + (poids[i] - obs.GetValue(i))
                       * (poids[i] - obs.GetValue(i));
        return Math.Sqrt(somme);
 }
コード例 #2
0
 public void ModifiePoids( Observation obs, double alpha)
 {
     for (int i=0; i< poids.Count; i++)
         poids[i]=poids[i]-alpha*(poids[i]-obs.GetValue(i));
 }