קובץ:Regression cercle gruntz pathologique anim.gif
תוכן הדף אינו נתמך בשפות אחרות.
מראה
מתוך ויקיפדיה, האנציקלופדיה החופשית
גודל התצוגה המקדימה הזאת: 349 × 600 פיקסלים. רזולוציות אחרות: 139 × 240 פיקסלים | 390 × 670 פיקסלים.
לקובץ המקורי (390 × 670 פיקסלים, גודל הקובץ: 52 ק"ב, סוג MIME: image/gif, בלולאה, 38 תמונות, 19 שניות)
זהו קובץ שמקורו במיזם ויקישיתוף. תיאורו בדף תיאור הקובץ המקורי (בעברית) מוצג למטה. |
תקציר
תיאורRegression cercle gruntz pathologique anim.gif |
English: Pathological case for the standard Gauss-Newton circle fitting: the point (3 ; 1) i close to the center of the model circle, which leads to a difficult convergence and a "weird looking" figure (although it is the correct total least squares model).
Français : Cas pathologique pour la régression circulaire utilisant la méthode de Gauss-Newton standard : le point (3 ; 1) est proche du centre du cercle modèle, cequi rend la convergence difficile, et donne une figure "bizarre" (bien qu'il s'agisse du modèle correct du point de vue des moindres carrés totaux). |
תאריך יצירה | |
מקור |
נוצר על־ידי מעלה היצירה Coope, Ian D., Circle fitting by Linear and Nonlinear Least Squares, in "Journal of Optimization Theory and Applications", vol. 76, No. 2, pp. 381-388, february 1993 Gruntz, D., Finding the Best Fit Circle, in "The MathWorks Newsletter", Vol. 1, p. 5, 1990 http://groups.google.com/group/sci.math.num-analysis/msg/f936dad6ff285069 |
יוצר | Cdang (Christophe Dang Ngoc Chan) |
Scilab source
This media was created with Scilab, a free open-source software. Here is a listing of the Scilab source used to create this file. |
Code source similaire à File:Regression cercle gruntz anim.gif, mais avec un point de plus, et une condition plus robuste sur k.
// **********
// Initialisation
// **********
clear;
// données (D. Gruntz + I. D. Coope)
X0 = [0.7, 3.3, 5.6, 7.5, 6.4, 4.4, 0.3, -1.1, 3];
Y0 = [4.0, 4.7, 4.0, 1.3, -1.1, -3.0, -2.5, 1.3, 0.5];
// Paramètres de Newton-Raphson
precision = 1e-7; // condition d'arrêt
itermax = 60; // idem
Ainit = [3,0, 1] // cercle initial
// **********
// fonctions
// **********
function [ACx, ACy, AC] = caracteristiques(Xexp, Yexp, A)
// calcule les caractéristiques du modèle
// par rapport aux points expérimentaux
// C(1) : xcentre (scalaire)
// C(2) : ycentre (scalaire)
// Xexp, Yexp : points mesurés (vecteur de nombres)
// ACx : vecteur de composante x des vecteurs AC>
// " y "
// AC : longueurs des vecteurs AC>
ACx = (A(1) - Xexp)';
ACy = (A(2) - Yexp)';
AC = ((ACx.^2 + ACy.^2).^(0.5));
endfunction
function [S] = residus(Xexp, Yexp, C)
// Xexp, Yexp : coordonnées des points expérimentaux (vecteurs)
// C : coordonnées du centre (vecteur)
[ACx, ACy, AC] = caracteristiques(Xexp, Yexp, C);
res = abs(C(3) - AC);
S = sum(res);
endfunction
function []=affichage(X, Y, A, R, k)
clf;
subplot(2,1,1)
plot2d(X, Y, style = -1) //, frameflag=4)
isoview(-1.5, 7.5, -3.5, 5.5);
xstring(-1.8, 5.3, 'C('+string(A(1))+' ; '+string(A(2))+') ; r = '+string(A(3)))
// modèle
plot(A(1), A(2), 'r+')
diametre = 2*A(3);
xarc(A(1) - A(3), A(2) + A(3),...
diametre, diametre,...
0, 360*64)
a = get('hdl'); // ellipse
a.foreground = 5; // couleur
subplot(2,1,2)
plot2d(R, rect=[1, 5, 38, 15])
xstring(0.5, 0.1, 'α = '+string(k)+' ; R = '+string(R($)))
// halt
endfunction
function [A, R]=regression_circulaire(Xexp, Yexp, Ainit, imax, epsilon)
// Xexp, Yexp : points expérimentaux
// A(1) : xcentre
// A(2) : ycentre
// A(3) : rayon
// Ainit : valeur initiale de A
// imax, epsilon : condition d'arrêt
i = 1;
k = 1;
A = Ainit';
dA = [1 1 1]';
drapeau = %t; // pour la 1re itération
R(1) = residus(Xexp, Yexp, A')
affichage(Xexp, Yexp, Ainit, R, 1)
disp('i = '+string(i)+' ; k = 1 ; R = '+string(R(i)))
nom = 'cercle_gruntz_pathologique'+string(i)+'.png';
xs2png(0,nom)
while drapeau & (i <= imax)
i = i+1;
[ACx, ACy, AC] = caracteristiques(Xexp, Yexp, A);
J = [ACx./AC, ACy./AC, -ones(ACx)]; // matrice des vecteurs unité
f = -(AC - A(3)*(ones(Xexp))');
dA = J\f;
drapeau2 = %t // pour une 1re exécution
while drapeau2 & (k>=0.1) // teste la divergence sur 1 étape
A = A + k*dA;
R(i) = residus(Xexp, Yexp, A')
drapeau2 = (R(i) >= R(i-1)) // vrai si diverge
if drapeau2 then k = k*0.75; // atténue si diverge
k0 = k; // pour affichage de la valeur
else k0 = k; // pour affichage de la valeur
k = (1 + k)/2; // réduit l'atténuation si converge
end
end
if k < 0.1 then
k = 0.1;
k0 = k;
end
drapeau = (abs(R(i) - R(i-1)) > epsilon)
disp('i = '+string(i)+' ; k = '+string(k0)+' ; R = '+string(R(i)))
affichage(Xexp, Yexp, A', R, k0)
nom = 'cercle_gruntz_pathologique'+string(i)+'.png';
xs2png(0,nom)
end
endfunction
// **********
// programme principal
// **********
// lecture des données
// Xdef, Ydef : vecteurs ligne
Xdef = X0;
Ydef = Y0;
fenetre = scf(0); // création de la fenêtre graphique
fenetre.figure_size = [400,800];
// regression
[Aopt, res] = regression_circulaire(Xdef, Ydef, Ainit, itermax, precision)
centre = Aopt(1:2);
rayon = Aopt(3);
R = res($);
print(%io(2), centre)
print(%io(2), rayon)
print(%io(2), R)
רישיון
אני, בעל זכויות היוצרים על היצירה הזאת, מפרסם אותה בזאת תחת הרישיונות הבאים:
מוענקת בכך הרשות להעתיק, להפיץ או לשנות את המסמך הזה, לפי תנאי הרישיון לשימוש חופשי במסמכים של גנו, גרסה 1.2 או כל גרסה מאוחרת יותר שתפורסם על־ידי המוסד לתוכנה חופשית; ללא פרקים קבועים, ללא טקסט עטיפה קדמית וללא טקסט עטיפה אחורית. עותק של הרישיון כלול בפרק שכותרתו הרישיון לשימוש חופשי במסמכים של גנו.http://www.gnu.org/copyleft/fdl.htmlGFDLGNU Free Documentation Licensetruetrue |
הקובץ הזה מתפרסם לפי תנאי רישיונות קריאייטיב קומונז ייחוס-שיתוף זהה 3.0 לא מותאם, 2.5 כללי, 2.0 כללי ו־1.0 כללי.
- הנכם רשאים:
- לשתף – להעתיק, להפיץ ולהעביר את העבודה
- לערבב בין עבודות – להתאים את העבודה
- תחת התנאים הבאים:
- ייחוס – יש לתת ייחוס הולם, לתת קישור לרישיון, ולציין אם נעשו שינויים. אפשר לעשות את זה בכל צורה סבירה, אבל לא בשום צורה שמשתמע ממנה שמעניק הרישיון תומך בך או בשימוש שלך.
- שיתוף זהה – אם תיצרו רמיקס, תשנו, או תבנו על החומר, חובה עליכם להפיץ את התרומות שלך לפי תנאי רישיון זהה או תואם למקור.
הנכם מוזמנים לבחור את הרישיון הרצוי בעיניכם.
פריטים שמוצגים בקובץ הזה
מוצג
ערך כלשהו ללא פריט ויקינתונים
12 בדצמבר 2012
היסטוריית הקובץ
ניתן ללחוץ על תאריך/שעה כדי לראות את הקובץ כפי שנראה באותו זמן.
תאריך/שעה | תמונה ממוזערת | ממדים | משתמש | הערה | |
---|---|---|---|---|---|
נוכחית | 16:59, 12 בדצמבר 2012 | 670 × 390 (52 ק"ב) | Cdang | {{Information |Description ={{en|1=Pathological case for the standard Gauss-Newton circle fitting: the point (3 ; 1) i close to the center of the model circle, which leads to a difficult convergence and a "weird looking" figure (although it is the c... |
שימוש בקובץ
אין בוויקיפדיה דפים המשתמשים בקובץ זה.
שימוש גלובלי בקובץ
אתרי הוויקי השונים הבאים משתמשים בקובץ זה:
- שימוש באתר fr.wikipedia.org
מטא־נתונים
קובץ זה מכיל מידע נוסף, שכנראה הגיע ממצלמה דיגיטלית או מסורק שבהם הקובץ נוצר או עבר דיגיטציה.
אם הקובץ שונה ממצבו הראשוני, כמה מהנתונים להלן עלולים שלא לשקף באופן מלא את הקובץ הנוכחי.
הערה בקובץ GIF | Created with GIMP |
---|