10 lines
270 B
Mathematica
10 lines
270 B
Mathematica
|
function erreur = erreur_generalisation(D_test, D_app, beta_0, beta_d, d)
|
||
|
X = D_test(1, :)';
|
||
|
Y = D_test(2, :)';
|
||
|
|
||
|
beta = moindres_carres(D_app, beta_0, beta_d, d);
|
||
|
estimation = bezier(beta_0, beta, beta_d, X);
|
||
|
|
||
|
erreur = mean((estimation - Y).^2);
|
||
|
end
|