Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
" The below script needs to be able to find the current output cell; this is an easy method to get it.\r\n",
" </div>\r\n",
" <script type='text/javascript'>\r\n",

" function timeout(ms, promise) {\r\n",
" return new Promise(function (resolve, reject) {\r\n",
" setTimeout(function () {\r\n",
Expand All @@ -72,10 +71,7 @@
" })\r\n",
" }\r\n",
"\r\n",


"\r\n",

"\r\n",
" if (!rootUrl.endsWith('/')) {\r\n",
" rootUrl = `${rootUrl}/`;\r\n",
Expand All @@ -90,7 +86,6 @@
" headers: {\r\n",
" 'Content-Type': 'text/plain'\r\n",
" },\r\n",

" }));\r\n",
"\r\n",
" if (response.status == 200) {\r\n",
Expand All @@ -102,8 +97,6 @@
" }\r\n",
"}\r\n",
"\r\n",


" .then((root) => {\r\n",
" // use probing to find host url and api resources\r\n",
" // load interactive helpers and language services\r\n",
Expand Down Expand Up @@ -152,13 +145,11 @@
" \r\n",
" \r\n",
" require_script.onload = function() {\r\n",

" };\r\n",
"\r\n",
" document.getElementsByTagName('head')[0].appendChild(require_script);\r\n",
"}\r\n",
"else {\r\n",

"}\r\n",
"\r\n",
" </script>\r\n",
Expand Down Expand Up @@ -243,6 +234,14 @@
"Show($\"Plage X1 : [{X.Select(p => p[0]).Min():F2}, {X.Select(p => p[0]).Max():F2}] X2 : [{X.Select(p => p[1]).Min():F2}, {X.Select(p => p[1]).Max():F2}]\");\n"
]
},
{
"cell_type": "markdown",
"id": "lecture-c3b86b54",
"metadata": {},
"source": [
"**Lecture ancrée** : Le jeu de données synthétique compte 200 points, 2 classes équilibrées (100 + 100) et 2 features, avec X1 dans [-2,35, 6,09] et X2 dans [-1,05, 6,66] — le support de toutes les expériences suivantes."
]
},
{
"cell_type": "markdown",
"id": "881c2ccb",
Expand Down Expand Up @@ -349,6 +348,13 @@
"Show($\"Objectif [k~1, p=1 Manhattan, blend=0.5] = {FI(Objective(new[] { 0.00, 0.00, 0.5 }))}\");\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Lecture ancrée** : Les tests de sanité de l’objectif CV 5-fold donnent 0.7150 (k~11, Euclidien, blend=0), 0.7200 (blend=1) et 0.6600 (k~1, Manhattan, blend=0.5) — le blend distance-weighting apporte +0.005, un k trop petit dégrade. La précision CV s’étale ainsi de 0.66 à 0.72 sur ces trois points de contrôle de l’espace (k, distance, blend)."
]
},
{
"cell_type": "markdown",
"id": "7d5fd4d4",
Expand Down Expand Up @@ -413,6 +419,13 @@
"Show($\" -> p = [{FI(gridBest[0], \"F3\")}, {FI(gridBest[1], \"F3\")}, {FI(gridBest[2], \"F3\")}]\");\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Lecture ancrée** : Grid Search énumère les 5³ = 125 combinaisons et trouve 0.7650 en p = [1.000, 0.000, 0.000] — un coin du cube de recherche, typique d’une grille régulière. Ce 0.7650 sert de plancher : le tableau final affiche tous les gaps relatifs à Grid."
]
},
{
"cell_type": "markdown",
"id": "b3d053df",
Expand Down Expand Up @@ -476,6 +489,13 @@
"Show($\" -> p = [{FI(randBest[0], \"F3\")}, {FI(randBest[1], \"F3\")}, {FI(randBest[2], \"F3\")}]\");\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Lecture ancrée** : Random Search atteint 0.7600 en 60 évaluations seulement (moitié moins que Grid) avec p = [0.964, 0.023, 0.215] — l’échantillonnage uniforme couvre mieux les dimensions peu sensibles."
]
},
{
"cell_type": "markdown",
"id": "ed2df85e",
Expand Down Expand Up @@ -653,6 +673,13 @@
"Show($\" -> p = [{FI(bayesBest[0], \"F3\")}, {FI(bayesBest[1], \"F3\")}, {FI(bayesBest[2], \"F3\")}]\");\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Lecture ancrée** : Bayesian Optimization (GP + Expected Improvement) converge vers 0.7700 en 5+25 = 30 évaluations, p = [0.692, 0.617, 0.719] : 5 points d’initialisation aléatoire puis 25 itérations GP+EI — moins de la moitié du budget de Grid pour un meilleur optimum."
]
},
{
"cell_type": "markdown",
"id": "3ee3bbcc",
Expand Down Expand Up @@ -776,6 +803,13 @@
"Show($\" -> p = [{FI(gaBest[0], \"F3\")}, {FI(gaBest[1], \"F3\")}, {FI(gaBest[2], \"F3\")}]\");\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Lecture ancrée** : L’Algorithme Génétique atteint 0.7750 en 71 évaluations, p = [0.684, 0.854, 0.449] — le meilleur résultat from-scratch, à égalité avec PSO, obtenu par sélection, croisement et mutation des configurations les plus performantes."
]
},
{
"cell_type": "markdown",
"id": "b287c9fa",
Expand Down Expand Up @@ -901,6 +935,13 @@
"Show($\" -> p = [{FI(psoBest[0], \"F3\")}, {FI(psoBest[1], \"F3\")}, {FI(psoBest[2], \"F3\")}]\");\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Lecture ancrée** : PSO atteint lui aussi 0.7750 en 72 évaluations, p = [0.717, 0.926, 0.491] — deux métaheuristiques différentes, deux configurations, le même optimum."
]
},
{
"cell_type": "markdown",
"id": "bed2b341",
Expand Down Expand Up @@ -1089,6 +1130,13 @@
"Show($\" (Grid = plancher de reference, best = {FI(gridVal)})\");\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Lecture ancrée** : Sparklines et tableau résument la hiérarchie : GA et PSO 0.7750 (+0.0100 vs Grid), Bayes 0.7700 (+0.0050 en 30 evals seulement), Grid 0.7650 (plancher), Random 0.7600 (-0.0050) — les méthodes informées dominent à budget réduit. Les sparklines racontent la convergence : GA monte dès la première génération puis stagne, Bayes reste sur un long plateau d’initialisation avant de décoller, Grid ne progresse que par marches de la grille."
]
},
{
"cell_type": "markdown",
"id": "35b62223",
Expand Down Expand Up @@ -1275,6 +1323,13 @@
"Show(\"Regions @ = haute precision (objectif maximise). Les methodes adapatives (Bayes/GA/PSO) y convergent plus vite que Grid.\");\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Lecture ancrée** : La carte de chaleur (tranche weightBlend=0.72, k vertical 1->50 × distPow 1->4) révèle les régions @ de haute précision, échelle 0.6500 (vide) -> 0.7600 (@) — un paysage multimodal : les symboles s’organisent en bandes par ligne de k, pas en simple gradient, d’où l’intérêt des méthodes adaptatives (Bayes/GA/PSO) sur une grille régulière."
]
},
{
"cell_type": "markdown",
"id": "t2m1",
Expand Down Expand Up @@ -1453,6 +1508,13 @@
" Show($\" {r.TrainerName} : {FI(r.ValidationMetrics.Accuracy)}\");"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Lecture ancrée** : ML.NET AutoML, avec un budget de 30 secondes, effectue 405 essais (meilleur entraîneur : SdcaLogisticRegressionBinary) sur le split déterministe seed 424242 (165 train / 35 test) : accuracy test 0.7714, AUC 0.7467. Le top-3 des entraîneurs est saturé par SdcaLogisticRegressionBinary (0.7714 aux trois rangs)."
]
},
{
"cell_type": "code",
"execution_count": 14,
Expand Down Expand Up @@ -1549,6 +1611,14 @@
"Show($\" => {winner} devant sur ce split (ecart {FI(Math.Abs(binMetric.Accuracy - fsTestAcc), \"F4\")}).\");"
]
},
{
"cell_type": "markdown",
"id": "lecture-t2-exp",
"metadata": {},
"source": [
"**Lecture ancrée** : Sur le même split de test (35 pts), le k-NN from-scratch config Grid (k=49, distPow=1.000, blend=0.000) rend 0.7143 contre 0.7714 pour AutoML (écart 0.0571) — mais la CV 5-fold sur tout le jeu rappelle que le from-scratch atteint 0.7750 : l’écart mesure aussi le split, pas seulement les méthodes. Sur 35 points de test, un écart de 0.0571 représente deux points mal classés de différence."
]
},
{
"cell_type": "markdown",
"id": "t2m2",
Expand Down Expand Up @@ -1645,4 +1715,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
}
}
Loading
Loading