Add neural network part

This commit is contained in:
Yorick Barbanneau 2023-12-19 16:35:34 +01:00
parent 36fcbc6ffe
commit eaf2d3f44c
2 changed files with 349 additions and 1 deletions

View file

@ -0,0 +1,320 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="125.54364mm"
height="51.666546mm"
viewBox="0 0 125.54363 51.666546"
version="1.1"
id="svg1334"
sodipodi:docname="transformation.svg"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<title
id="title69752">Schéma d'un neurone formel</title>
<sodipodi:namedview
id="namedview206"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="1"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="false"
inkscape:zoom="2.3472523"
inkscape:cx="188.94433"
inkscape:cy="97.560881"
inkscape:window-width="1920"
inkscape:window-height="1055"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg1334" />
<defs
id="defs1331">
<marker
style="overflow:visible"
id="marker5385"
refX="0"
refY="0"
orient="auto-start-reverse"
inkscape:stockid="RoundedArrow"
markerWidth="6.1347523"
markerHeight="5.9304953"
viewBox="0 0 6.1347524 5.9304951"
inkscape:isstock="true"
inkscape:collect="always"
preserveAspectRatio="xMidYMid">
<path
transform="scale(0.7)"
d="m -0.21114562,-4.1055728 6.42229122,3.21114561 a 1,1 90 0 1 0,1.78885438 L -0.21114562,4.1055728 A 1.236068,1.236068 31.717474 0 1 -2,3 v -6 a 1.236068,1.236068 148.28253 0 1 1.78885438,-1.1055728 z"
style="fill:context-stroke;fill-rule:evenodd;stroke:none"
id="path5383" />
</marker>
</defs>
<rect
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.270611;stroke-dasharray:none;stroke-opacity:1"
id="rect24349"
width="125.54364"
height="51.666546"
x="0"
y="0" />
<path
style="fill:none;stroke:#333333;stroke-width:0.239808;stroke-dasharray:none;stroke-opacity:1"
d="M 9.2755582,8.0681982 V 31.543678 l 26.4341628,0.06416"
id="path5386"
sodipodi:nodetypes="ccc" />
<path
style="fill:none;fill-opacity:1;stroke:#b183f5;stroke-width:0.365;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker5385)"
d="m 25.108068,39.039396 c -0.06465,7.178468 31.190757,7.329311 30.999212,0.116384"
id="path2419"
sodipodi:nodetypes="cc" />
<circle
style="fill:#ffffff;fill-opacity:1;stroke:#b183f5;stroke-width:0.365001;stroke-dasharray:none;stroke-opacity:1"
id="circle9232"
cx="40.802994"
cy="44.261894"
r="3.3143868" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:8.46667px;font-family:'DejaVu Math TeX Gyre';-inkscape-font-specification:'DejaVu Math TeX Gyre Bold';fill:#ffffff;fill-opacity:1;stroke:#b183f5;stroke-width:0.365001;stroke-dasharray:none;stroke-opacity:1"
x="59.675766"
y="49.062462"
id="text9670"><tspan
sodipodi:role="line"
id="tspan9668"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:8.46667px;font-family:'DejaVu Math TeX Gyre';-inkscape-font-specification:'DejaVu Math TeX Gyre Bold';stroke-width:0.365"
x="59.675766"
y="49.062462" /></text>
<ellipse
style="fill:#20cc8a;fill-opacity:1;stroke:none;stroke-width:0.21351;stroke-dasharray:none;stroke-opacity:1"
id="path48415"
cx="9.2827892"
cy="10.181797"
rx="0.95572156"
ry="1.033904" />
<ellipse
style="fill:#ff2bd5;fill-opacity:1;stroke:none;stroke-width:0.21351;stroke-dasharray:none;stroke-opacity:1"
id="circle55138"
cx="9.3026228"
cy="31.427582"
rx="0.95572156"
ry="1.033904" />
<metadata
id="metadata69688">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:title>Schéma d'un neurone formel</dc:title>
<dc:creator>
<cc:Agent>
<dc:title>ephase - https://xieme-art.org</dc:title>
</cc:Agent>
</dc:creator>
<dc:rights>
<cc:Agent>
<dc:title>CC BY-SA</dc:title>
</cc:Agent>
</dc:rights>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
<dc:date>2023.11.14</dc:date>
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<ellipse
style="fill:#20cc8a;fill-opacity:1;stroke:none;stroke-width:0.21351;stroke-dasharray:none;stroke-opacity:1"
id="circle8958"
cx="27.699566"
cy="31.732548"
rx="0.95572156"
ry="1.033904" />
<ellipse
style="fill:#ff2bd5;fill-opacity:1;stroke:none;stroke-width:0.21351;stroke-dasharray:none;stroke-opacity:1"
id="circle9035"
cx="27.699566"
cy="10.181797"
rx="0.95572156"
ry="1.033904" />
<g
aria-label="+1"
id="text10757"
style="font-size:3.175px;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';fill:none;stroke:#333333;stroke-width:0.3"
transform="matrix(0.76854301,0,0,0.83141335,2.5219626,-6.1335098)">
<path
d="m 2.9606805,18.790292 v 0.930176 h 0.9162231 v 0.127124 H 2.9606805 v 0.933277 H 2.8041009 V 19.847592 H 1.8894281 v -0.127124 h 0.9146728 v -0.930176 z"
style="font-weight:200;-inkscape-font-specification:'DejaVu Sans Ultra-Light'"
id="path11625" />
<path
d="m 4.6846062,20.653745 h 0.5115967 v -2.044837 l -0.6340698,0.254248 v -0.142627 l 0.6309692,-0.254248 h 0.1581299 v 2.187464 h 0.5115966 v 0.127124 H 4.6846062 Z"
style="font-weight:200;-inkscape-font-specification:'DejaVu Sans Ultra-Light'"
id="path11627" />
</g>
<g
aria-label="+1"
id="g11664"
style="font-size:3.175px;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';fill:none;stroke:#333333;stroke-width:0.3"
transform="matrix(0.76854301,0,0,0.83141335,24.720595,18.736189)">
<path
d="m 2.9606805,18.790292 v 0.930176 h 0.9162231 v 0.127124 H 2.9606805 v 0.933277 H 2.8041009 V 19.847592 H 1.8894281 v -0.127124 h 0.9146728 v -0.930176 z"
style="font-weight:200;-inkscape-font-specification:'DejaVu Sans Ultra-Light'"
id="path11660" />
<path
d="m 4.6846062,20.653745 h 0.5115967 v -2.044837 l -0.6340698,0.254248 v -0.142627 l 0.6309692,-0.254248 h 0.1581299 v 2.187464 h 0.5115966 v 0.127124 H 4.6846062 Z"
style="font-weight:200;-inkscape-font-specification:'DejaVu Sans Ultra-Light'"
id="path11662" />
</g>
<g
id="g10671"
transform="matrix(0.76854301,0,0,0.83141335,5.6184642,-7.0134222)">
<path
style="fill:none;stroke:#333333;stroke-width:0.3;stroke-dasharray:none;stroke-opacity:1"
d="M 74.269237,14.914462 V 48.583765"
id="path8812" />
<path
style="fill:none;stroke:#333333;stroke-width:0.3;stroke-dasharray:none;stroke-opacity:1"
d="m 57.43459,31.73758 33.66929,0.02307"
id="path8844" />
</g>
<ellipse
style="fill:#ff2bd5;fill-opacity:1;stroke:none;stroke-width:0.21351;stroke-dasharray:none;stroke-opacity:1"
id="circle11696"
cx="62.697567"
cy="19.407637"
rx="0.95572156"
ry="1.033904" />
<ellipse
style="fill:#ff94ea;fill-opacity:1;stroke:none;stroke-width:0.21351;stroke-dasharray:none;stroke-opacity:1"
id="circle11728"
cx="62.943821"
cy="19.15873"
rx="0.95572156"
ry="1.033904" />
<ellipse
style="fill:#20cc8a;fill-opacity:1;stroke:none;stroke-width:0.21351;stroke-dasharray:none;stroke-opacity:1"
id="circle11760"
cx="54.525642"
cy="10.980155"
rx="0.95572156"
ry="1.033904" />
<ellipse
style="fill:#20cc8a;fill-opacity:1;stroke:none;stroke-width:0.21351;stroke-dasharray:none;stroke-opacity:1"
id="circle11792"
cx="70.964676"
cy="27.676205"
rx="0.95572156"
ry="1.033904" />
<g
aria-label="+1"
id="g12624"
style="font-size:3.175px;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';fill:none;stroke:#333333;stroke-width:0.3"
transform="matrix(0.76854301,0,0,0.83141335,87.079834,-6.1335098)">
<path
d="m 2.9606805,18.790292 v 0.930176 h 0.9162231 v 0.127124 H 2.9606805 v 0.933277 H 2.8041009 V 19.847592 H 1.8894281 v -0.127124 h 0.9146728 v -0.930176 z"
style="font-weight:200;-inkscape-font-specification:'DejaVu Sans Ultra-Light'"
id="path12620" />
<path
d="m 4.6846062,20.653745 h 0.5115967 v -2.044837 l -0.6340698,0.254248 v -0.142627 l 0.6309692,-0.254248 h 0.1581299 v 2.187464 h 0.5115966 v 0.127124 H 4.6846062 Z"
style="font-weight:200;-inkscape-font-specification:'DejaVu Sans Ultra-Light'"
id="path12622" />
</g>
<path
style="fill:none;stroke:#333333;stroke-width:0.239808;stroke-dasharray:none;stroke-opacity:1"
d="M 93.833429,8.0681982 V 31.543678 l 26.434181,0.06416"
id="path12610"
sodipodi:nodetypes="ccc" />
<ellipse
style="fill:#20cc8a;fill-opacity:1;stroke:none;stroke-width:0.21351;stroke-dasharray:none;stroke-opacity:1"
id="circle12612"
cx="93.833427"
cy="10.160443"
rx="0.95572156"
ry="1.033904" />
<ellipse
style="fill:#ff2bd5;fill-opacity:1;stroke:none;stroke-width:0.21351;stroke-dasharray:none;stroke-opacity:1"
id="circle12614"
cx="93.860497"
cy="31.427582"
rx="0.95572156"
ry="1.033904" />
<ellipse
style="fill:#20cc8a;fill-opacity:1;stroke:none;stroke-width:0.21351;stroke-dasharray:none;stroke-opacity:1"
id="circle12616"
cx="112.41719"
cy="31.677452"
rx="0.95572156"
ry="1.033904" />
<ellipse
style="fill:#ff94ea;fill-opacity:1;stroke:none;stroke-width:0.21351;stroke-dasharray:none;stroke-opacity:1"
id="circle12618"
cx="94.174332"
cy="31.148285"
rx="0.95572156"
ry="1.033904" />
<g
aria-label="+1"
id="g12630"
style="font-size:3.175px;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';fill:none;stroke:#333333;stroke-width:0.3"
transform="matrix(0.76854301,0,0,0.83141335,109.27848,18.736189)">
<path
d="m 2.9606805,18.790292 v 0.930176 h 0.9162231 v 0.127124 H 2.9606805 v 0.933277 H 2.8041009 V 19.847592 H 1.8894281 v -0.127124 h 0.9146728 v -0.930176 z"
style="font-weight:200;-inkscape-font-specification:'DejaVu Sans Ultra-Light'"
id="path12626" />
<path
d="m 4.6846062,20.653745 h 0.5115967 v -2.044837 l -0.6340698,0.254248 v -0.142627 l 0.6309692,-0.254248 h 0.1581299 v 2.187464 h 0.5115966 v 0.127124 H 4.6846062 Z"
style="font-weight:200;-inkscape-font-specification:'DejaVu Sans Ultra-Light'"
id="path12628" />
</g>
<path
style="fill:none;fill-opacity:1;stroke:#b183f5;stroke-width:0.365;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker5385)"
d="m 69.966949,37.999178 c -0.06465,7.178468 31.190761,7.329311 30.999211,0.116384"
id="path17538"
sodipodi:nodetypes="cc" />
<circle
style="fill:#ffffff;fill-opacity:1;stroke:#b183f5;stroke-width:0.365001;stroke-dasharray:none;stroke-opacity:1"
id="circle17540"
cx="85.661873"
cy="43.221676"
r="3.3143868" />
<g
aria-label="1"
id="text17574"
style="font-weight:200;font-size:3.175px;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans Ultra-Light';fill:none;stroke:#b183f5;stroke-width:0.3"
transform="translate(2.1166667,-8.4666671)">
<path
d="m 38.081648,53.635724 h 0.511597 v -2.044837 l -0.63407,0.254249 v -0.142627 l 0.630969,-0.254248 h 0.15813 v 2.187463 h 0.511597 v 0.127124 h -1.178223 z"
id="path20398" />
</g>
<g
aria-label="2"
id="text19525"
style="font-weight:200;font-size:3.175px;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans Ultra-Light';fill:none;stroke:#b183f5;stroke-width:0.3"
transform="translate(2.1166667,-8.4666671)">
<path
d="m 82.906343,52.628191 h 1.32085 v 0.125574 h -1.48208 v -0.162781 l 0.576709,-0.599963 q 0.21394,-0.217041 0.387573,-0.401526 0.16123,-0.172082 0.215491,-0.26665 0.05426,-0.09457 0.05426,-0.249597 0,-0.268201 -0.164331,-0.430982 -0.119373,-0.117822 -0.384473,-0.117822 -0.155029,0 -0.356567,0.08992 -0.08837,0.04031 -0.300757,0.178284 v -0.164332 q 0.08992,-0.06356 0.26355,-0.141076 0.196887,-0.08837 0.390674,-0.08992 0.299206,0 0.500744,0.153479 0.196887,0.153479 0.196887,0.506946 0,0.142627 -0.05271,0.269751 -0.06201,0.148828 -0.195337,0.302307 -0.03876,0.04496 -0.246496,0.258899 z"
id="path20395" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 13 KiB

View file

@ -99,10 +99,38 @@ D'un neurone vers l'infini...
![Exemple d'un réseau de neurones](./images/reseau_neurones.svg) ![Exemple d'un réseau de neurones](./images/reseau_neurones.svg)
Dans un réseau de neurones, chacune a son propre poid et biais, les paramètres Dans un réseau de neurones, chacun a son propre poid et biais, les paramètres
du réseau sont composés de l'ensemble des poids et biais. Tous les neurones du réseau sont composés de l'ensemble des poids et biais. Tous les neurones
d'une même couche ont **les mêmes fonctions**. d'une même couche ont **les mêmes fonctions**.
Le réseaux est organisés en couche. Les **reseaux de neuronnes complètement
connectés**, toutes les sorties des neuronnes de la couche 0 sont connectés aux
entrées de tous les neurines de la couche 1.
### Application de transformation
Les résultats obtenus en sortie de notre réseaux noe sont pas forcément
compatibles avec la séparation linéaires. Il est alors possible d'appliquer une
**matrice de transformation**, ce qui reviens à appliquer une autre couche à
notre réseau.
![Schéma de transformation](./images/transformation.svg)
Dans le schéma ci-dessus:
1. La première transformation est \\(
W = \begin{pmatrix}
+\frac{1}{2} -\frac{1}{2} \\\
-\frac{1}{2} +\frac{1}{2}
\end{pmatrix}
\\) ce qu nous donne \\(Wx\\)
2. La seconde est \\(g(u) = max\\{0,x\\}\\) ce qu nous donne \\(h(x) = g(Wx)\\)
Au final, nous avons \\({w_{2}}^{t}h(x)+ b_{2} = (4 4)h(x) - 1 \implies y = {w_{2}}^{t}h(x)+ b_{2} \\)
Ce n'est rien d'autre qu'un réseaux de neurones avec une couche cachée \\(h\\)
[wiki_neurone]:https://commons.wikimedia.org/w/index.php?title=User:Nicolas.Rougier [wiki_neurone]:https://commons.wikimedia.org/w/index.php?title=User:Nicolas.Rougier
[mcculloch]:https://fr.wikipedia.org/wiki/Warren_McCulloch [mcculloch]:https://fr.wikipedia.org/wiki/Warren_McCulloch
[pitts]:https://fr.wikipedia.org/wiki/Walter_Pitts [pitts]:https://fr.wikipedia.org/wiki/Walter_Pitts