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); }
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)); }