design intelligence

Différences

Cette page vous donne les différences entre la révision choisie et la version actuelle de la page.

Lien vers cette vue

doc:moteur_inference [2013/10/25 13:01] (Version actuelle)
Ligne 1: Ligne 1:
 +====== Le moteur d'inférence ======
  
 +Le moteur d'inférence interprète cycliquement la base de règles en fonction de la base de faits. L’interprétation consiste à évaluer l'adéquation des règles avec la base de faits, à sélectionner la meilleure pour chaque type et à les appliquer. En fonction de leurs évaluations, de leurs sélections et éventuellement de leurs récompenses, le moteur d'inférence réévalue la pertinence des règles qui ne seraient pas au maximum puis élimine celles qui seraient en dessous d'un seuil minimum autorisé.
 +
 +Toutes les règles suivent exactement le même traitement, sauf les règles de récompense et les règles de contrôle.
 +
 +===== L'évaluation des règles =====
 +
 +L'évaluation d'une règle consiste à évaluer la crédibilité <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi> C </mi></math></html> d'une règle à être appliquée en fonction des événements de la base de faits. Plus précisément, la crédibilité représente le degré d’appariement entre une règle et le contenu de la mémoire événementielle. La crédibilité est bornée entre 0, une correspondance, et 1, une correspondance parfaite. Une règle avec une crédibilité nulle ne peut être sélectionnée.
 +
 +La première étape dans l'évaluation des règles consiste à vérifier, si la base de faits offre au moins un nombre d'évènements correspondant aux prémisses excitatrices de la règle (même type, même signe pour l'indice temporel). Un évènement ne peut satisfaire deux prémisses à la fois. Même si toutes les tolérances d'une prémisse sont à l'infini, la présence d'un événement correspondant reste évidemment obligatoire. Dans le cas où il manque un événement pour évaluer la condition excitatrice, la crédibilité est nulle.
 +
 +Dans le cas contraire, la seconde étape consiste à calculer le score de la condition excitatrice <html><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi> S </mi><mn> e </mn></msub></math></html> et celui de la condition inhibitrice <html><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi> S </mi><mn> i </mn></msub></math></html>. A noter que les calculs des scores représentent des distances entre les composantes de la condition et celles des événements idoines, il est considéré que chaque composantes est statistiquement indépendante des autres, même en ce qui concerne les composantes d'entrées. Aussi, il est conseillé de s'assurer de l'indépendance statistique des entrées. 
 +
 +Le calcul de la crédibilité <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi> C </mi></math></html> s'effectuera de la manière suivante :
 +
 +<html><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow><mi> C </mi><mo> = </mo><msub><mi> S </mi><mi> e </mi></msub><mo> - </mo><msub><mi> S </mi><mi> i </mi></msub><mspace width="3em"/></math></html>
 +
 +Si le score inhibiteur est supérieur au score excitateur alors la crédibilité est nulle.
 +
 +==== Le score de la condition excitatrice ====
 +
 +Les prémisses de la condition excitatrice sont considérées comme conjonctives. La distance de la condition excitatrice vis à vis de la base de faits correspond alors à la multiplication des distances des prémisses vis à vis d'un événement.
 +
 +Plus précisément, le score de la condition excitatrice revient à rechercher l’appariement qui minimise la distance entre les événements et les prémisses dans leur ensemble. Toutes les composantes sont évaluées, indice temporel, crédibilité, information, vecteur d’entrée. 
 +
 +Pour une configuration d'appariement possible entre les évènements de la base de faits et les prémisses de la condition excitatrice, l’appariement entre <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi> K </mi></math></html> prémisses <html><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi> P </mi><mi> k </mi></msub></math></html> ayant <html><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi> N </mi><mi> k </mi></msub></math></html> noyaux gaussiens (moyenne <html><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi> µ </mi><mi> k,n </mi></msub></math></html> avec un écart type <html><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi> σ </mi><mi> k,n </mi></msub></math></html>) et <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi> K </mi></math></html> événements <html><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi> E </mi><mi> k </mi></msub></math></html> de type idoines s’exprime de la manière suivante :
 +
 +<html><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow><munder><mo>∏</mo><mi fontsize="1em"> K </mi></munder><mo> exp </mo><mo>(</mo><mo>-</mo><munderover><mo movablelimits="false">∑</mo><mrow><mi> n </mi><mo> = </mo><mn> 1 </mn></mrow><mrow><msub><mi> N </mi><mi> k </mi></msub></mrow></munderover><mfrac><mrow><msup><mrow><mo stretchy="false">(</mo><msub><mi>μ</mi><mi>k,n</mi></msub><mo>−</mo><msub><mi>e</mi><mi>k,n</mi></msub><mo stretchy="false">)</mo></mrow><mrow><mn>2</mn></mrow></msup></mrow><mrow><mn> 2 </mn><msubsup><mi>σ</mi><mi>k,n</mi><mn>2</mn></msubsup></mrow></mfrac><mo>)</mo></mrow></math></html>
 +
 +Lorsque l'écart type <html><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>σ </mi><mi> k,n </mi></msub></math></html> d'une composante est nul, si la composante idoine de l'évènement <html><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi> e </mi><mi> k,n </mi></msub></math></html> est égale à <html><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi> µ </mi><mi> k,n </mi></msub></math></html> alors cela revient à multiplier par 1, sinon cela revient à multiplier par 0.
 +
 +Le score de la condition excitatrice <html><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi> S </mi><mn> e </mn></msub></math></html> correspond à l'appariement le plus avantageux soit, pour une configuration <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi> M </mi></math></html> de la mémoire événementielle à l'interprétation <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi> i </mi></math></html> :
 +
 +<html><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow><msub><mi>S</mi><mi>e</mi></msub><mo>=</mo><msub><mrow><mo>max</mo><mo>(</mo><mrow><munder><mo>∏</mo><mi fontsize="1em"> K </mi></munder><mo> exp </mo><mo>(</mo><mo>-</mo><munderover><mo movablelimits="false">∑</mo><mrow><mi> n </mi><mo> = </mo><mn> 1 </mn></mrow><mrow><msub><mi> N </mi><mi> k </mi></msub></mrow></munderover><mfrac><mrow><msup><mrow><mo stretchy="false">(</mo><msub><mi>μ</mi><mi>k,n</mi></msub><mo>−</mo><msub><mi>e</mi><mi>k,n</mi></msub><mo stretchy="false">)</mo></mrow><mrow><mn>2</mn></mrow></msup></mrow><mrow><mn> 2 </mn><msubsup><mi>σ</mi><mi>k,n</mi><mn>2</mn></msubsup></mrow></mfrac><mo>)</mo></mrow><mo>)</mo></mrow><msub><mi>M</mi><mi>i</mi></msub></msub></mrow></math></html>
 +
 +==== Le score de la condition inhibitrice ====
 +
 +Les prémisses de la condition inhibitrice sont considérées disjonctives. La distance de la condition inhibitrice avec la base de faits correspond à la somme des distances entre les prémisses inhibitrices avec l'évènement le plus en adéquation. Ainsi, l’appariement entre <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi> K </mi></math></html> prémisses <html><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi> P </mi><mi> k </mi></msub></math></html> ayant <html><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi> N </mi><mi> k </mi></msub></math></html> noyaux gaussiens (moyenne <html><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi> µ </mi><mi> k,n </mi></msub></math></html> avec un écart type <html><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi> σ </mi><mi> k,n </mi></msub></math></html>) et <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi> K </mi></math></html> événements <html><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi> E </mi><mi> k </mi></msub></math></html> de type idoines s’exprime de la manière suivante :
 +
 +<html><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow><munder><mo>∑</mo><mi fontsize="1em"> K </mi></munder><mo> exp </mo><mo>(</mo><mo>-</mo><munderover><mo movablelimits="false">∑</mo><mrow><mi> n </mi><mo> = </mo><mn> 1 </mn></mrow><mrow><msub><mi> N </mi><mi> k </mi></msub></mrow></munderover><mfrac><mrow><msup><mrow><mo stretchy="false">(</mo><msub><mi>μ</mi><mi>k,n</mi></msub><mo>−</mo><msub><mi>e</mi><mi>k,n</mi></msub><mo stretchy="false">)</mo></mrow><mrow><mn>2</mn></mrow></msup></mrow><mrow><mn> 2 </mn><msubsup><mi>σ</mi><mi>k,n</mi><mn>2</mn></msubsup></mrow></mfrac><mo>)</mo></mrow></math></html>
 +
 +Le score de la condition inhibitrice <html><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi> S </mi><mn> i </mn></msub></math></html> correspond à l'appariement le plus avantageux soit, pour une configuration <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi> M </mi></math></html> de la mémoire événementielle à l'interprétation <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi> i </mi></math></html> :
 +
 +<html><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow><msub><mi>S</mi><mi>i</mi></msub><mo>=</mo><munder><mo>∑</mo><mi> K </mi></munder><msub><mrow><mo>max</mo><mo>(</mo><mrow><mo> exp </mo><mo>(</mo><mo>-</mo><munderover><mo movablelimits="false">∑</mo><mrow><mi> n </mi><mo> = </mo><mn> 1 </mn></mrow><mrow><msub><mi> N </mi><mi> k </mi></msub></mrow></munderover><mfrac><mrow><msup><mrow><mo stretchy="false">(</mo><msub><mi>μ</mi><mi>k,n</mi></msub><mo>−</mo><msub><mi>e</mi><mi>k,n</mi></msub><mo stretchy="false">)</mo></mrow><mrow><mn>2</mn></mrow></msup></mrow><mrow><mn> 2 </mn><msubsup><mi>σ</mi><mi>k,n</mi><mn>2</mn></msubsup></mrow></mfrac><mo>)</mo></mrow><mo>)</mo></mrow><msub><mi>M</mi><mi>i</mi></msub></msub></mrow></math></html>
 +
 +==== Remarque sur le calcul de la distance ====
 +
 +=== La sensibilité ===
 +
 +La sensibilité du calcul numérique du score dépend de l'implémentation. Dans la version standard, lorsque le score devient inférieur à <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mn>1,17549</mn><mo>.</mo><msup><mn>10</mn><mn>-38</mn></msup></math></html>, il est considéré comme nul.
 +
 +=== La propagation de la crédibilité ===
 +
 +Concernant plus particulièrement la crédibilité, dans le cas où il serait souhaité que la valeur de crédibilité d'un évènement serve à pondérer le calcul d'un score, il faut que la distance entre crédibilités approxime la valeur de la crédibilité <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>c</mi></math></html> de l'évènement. Cela revient à déterminer dans une prémisse la moyenne <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>μ</mi></math></html> et l'écart type <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>σ</mi></math></html> de la composante dédiée à la crédibilité qui approxime au mieux la fonction d'identité, soit :
 +
 +<html><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow><msub><mrow><mo>[</mo><msubsup><mo mathsize="1.5"> &int; </mo><mn> 0 </mn><mn> 1 </mn></msubsup><msup><mrow><mo>(</mo><mo> exp </mo><mo>(</mo><mo>-</mo><mfrac><mrow><msup><mrow><mo stretchy="false">(</mo><mi>μ</mi><mo>−</mo><mi>c</mi><mo stretchy="false">)</mo></mrow><mrow><mn>2</mn></mrow></msup></mrow><mrow><mn> 2 </mn><msup><mi>σ</mi><mn> 2 </mn></msup></mrow></mfrac><mo>)</mo><mo>-</mo><mi>c</mi><mo>)</mo></mrow><mn> 2 </mn></msup><mo rspace="0">d</mo><mi>c</mi><mo>]</mo></mrow><mo>min</mo></msub></mrow></math></html>
 +
 +Une recherche par dichotomie évalue la composante optimale avec une moyenne <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>μ</mi><mo>=</mo><mn>1</mn></math></html> et un écart type <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>σ</mi><mo>≈</mo><mn>0,4213</mn></math></html>. La figure ci-dessous illustre la courbe des distances obtenues avec ces valeurs et la fonction identité <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mi> f </mi><mo> &ApplyFunction; </mo><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow><mo>=</mo><mi>x</mi></math></html> à titre de comparaison. 
 +
 +{{ :wiki:credibilite.png?nolink&450 |}}
 +===== La sélection des règles =====
 +
 +Le moteur d'inférence sélectionne, pour chaque type, la règle la plus adéquate parmi d’autres règles en fonction de leur niveau de spécialisation. La méthode utilisée consiste à sélectionner la règle qui maximise la vraisemblance, c'est-à-dire la règle possédant l’espérance maximale. Lorsqu’une règle est sélectionnée, un ajustement de sa condition peut s’effectuer. 
 +
 +==== L'espérance et la spécificité ====
 +
 +L’espérance <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi> ξ </mi></math></html> d’une règle <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi> r </mi></math></html> parmi <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi> N </mi></math></html> règles avec leur spécificité <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi> α </mi></math></html> avec leur crédibilité <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi> C </mi></math></html> à l’interprétation <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi> i </mi></math></html> s’écrit :
 +
 +<html><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow><msub><mi>ξ</mi><mi>r,i</mi></msub><mo>=</mo><mfrac><mrow><msub><mi>C</mi><mi>r,i</mi></msub><mo>×</mo><msub><mi>α</mi><mi>r</mi></msub></mrow><mrow><munderover><mo movablelimits="false">∑</mo><mrow><mi> n </mi><mo> = </mo><mn> 1 </mn></mrow><mrow><mi> N </mi></mrow></munderover><mo stretchy="false">(</mo><msub><mi>C</mi><mi>n,i</mi></msub><mo>×</mo><msub><mi>α</mi><mi>n</mi></msub><mo stretchy="false">)</mo></mrow></mrow></math></html>
 +
 +La valeur de l'espérance d'une règle est comprise entre 0 et 1, borne incluse. 
 +
 +La spécificité <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi> α </mi></math></html> d’une règle <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi> r </mi></math></html> se calcule à l’aide de l’ensemble des <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi> V </mi></math></html> variances des composantes des prémisses excitatrices :
 +
 +<html><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow><msub><mi>α</mi><mi>r</mi></msub><mo>=</mo><mfrac><mn>1</mn><mrow><munderover><mo movablelimits="false">Π</mo><mrow><mi> v </mi><mo> = </mo><mn> 1 </mn></mrow><mrow><msub><mi> V </mi></msub></mrow></munderover><msqrt><mn> 2 </mn><mi> π </mi><msubsup><mi>σ</mi><mi>v</mi><mn>2</mn></msubsup></msqrt></mrow></mfrac></mrow></math></html>
 +
 +Cependant, ce calcul pose problème de deux manières. Premièrement, aux limites avec des variances tendant vers zéro ou l'infini, ce calcul ne trouve pas de solution analytique. Secondement, ce calcul ne sert de comparaison uniquement pour les conditions de règles de même taille.
 +
 +Le premier problème est résolu empiriquement en posant <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mover><mn> 0 </mn><mo fontsize="1.5em"> ~ </mo></mover></math></html> comme valeur minimale (assimilée à zéro) de la variance <html><math xmlns="http://www.w3.org/1998/Math/MathML"><msup><mn>10</mn><mrow><mo>-</mo><mn>90</mn></mrow></msup></math></html> et <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mover><mi> ∞ </mi><mo fontsize="1.5em"> ~ </mo></mover></math></html> comme valeur maximale (assimilée à l'infini) <html><math xmlns="http://www.w3.org/1998/Math/MathML"><msup><mn>10</mn><mrow><mo>+</mo><mn>90</mn></mrow></msup></math></html>.
 +
 +Le second problème est résolu en rajoutant des prémisses avec des tolérances infinies <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mover><mi> ∞ </mi><mo fontsize="1.5em"> ~ </mo></mover></math></html> de sorte que toutes les conditions possèdent un même nombre de prémisses et en rajoutant à chaque prémisse une tolérance <html><math xmlns="http://www.w3.org/1998/Math/MathML"><msub subscriptshift="0.3em"><mi> σ </mi><mi> ∃ </mi></msub></math></html> nulle (<html><math xmlns="http://www.w3.org/1998/Math/MathML"><mover><mn> 0 </mn><mo fontsize="1.5em"> ~ </mo></mover></math></html>) ou infini (<html><math xmlns="http://www.w3.org/1998/Math/MathML"><mover><mi> ∞ </mi><mo fontsize="1.5em"> ~ </mo></mover></math></html>) représentant la nécessité ou non d'une correspondance avec un événement. Compte tenu de la structure des [[doc:base_de_connaissances#la condition|conditions des règles]], les prémisses rajoutées sont uniquement des prémisses capturant des événements internes possédant donc que trois composantes (crédibilité, information, indice temporel) et une tolérance <html><math xmlns="http://www.w3.org/1998/Math/MathML"><msub subscriptshift="0.3em"><mi> σ </mi><mi> ∃ </mi></msub></math></html> à <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mover><mi> ∞ </mi><mo fontsize="1.5em"> ~ </mo></mover></math></html>.
 +
 +Ainsi, en considérant une condition d'une règle <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi> r </mi></math></html> avec <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi> P </mi></math></html> prémisses regroupant <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi> V </mi></math></html> composantes dans un système décisionnel autorisant un maximum de <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi> M </mi></math></html> prémisses par condition, la spécificité <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi> α </mi></math></html> prend la forme suivante :
 +
 +<html><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow><msub><mi>α</mi><mi>r</mi></msub><mo>=</mo><mfrac><mn>1</mn><mrow><munderover><mo movablelimits="false">Π</mo><mrow><mi> v </mi><mo> = </mo><mn> 1 </mn></mrow><mrow><msub><mi> V </mi></msub></mrow></munderover><msqrt><mn> 2 </mn><mi> π </mi><msubsup><mi>σ</mi><mi>v</mi><mn>2</mn></msubsup></msqrt><mo>×</mo><msup><mover><mn> 0 </mn><mo fontsize="1.5em"> ~ </mo></mover><mi>P</mi></msup><mo>×</mo><msup><mover><mi> ∞ </mi><mo fontsize="1.5em"> ~ </mo></mover><mrow><mo>(</mo><mi>M</mi><mo>-</mo><mi>P</mi><mo>)</mo><mo>×</mo><mn>4</mn></mrow></msup></mrow></mfrac></mrow></math></html>
 +
 +Pour un type <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi> t </mi></math></html> de règle, la règle sélectionnée <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi> r </mi></math></html> en fonction de l'état de la mémoire évènementielle <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi> M </mi></math></html> à l’interprétation <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi> i </mi></math></html> correspond à celle qui maximise l’espérance <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi> ξ </mi></math></html> :
 +
 +<html><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow><msub><mi>r</mi><mi>t</mi></msub><mo>=</mo><mo>max</mo><msub><mrow><mo>(</mo><mi>ξ</mi><mo>)</mo></mrow><mrow><msub><mi>R</mi><mi>t</mi></msub><mo>,</mo><msub><mi>M</mi><mi>i</mi></msub></mrow></msub></math></html>
 +
 +Dans le cas où l'espérance maximale est nulle, aucune règle n'est sélectionnée. 
 +
 +Si plusieurs règles avancent la même espérance maximale, c'est la règle avec la plus grande spécificité calculée sur les prémisses inhibitrices qui l'emporte. Dans le cas où la spécificité serait identique, ce sera la première règle évaluée avec l'espérance maximale qui sera sélectionnée. L'ordre d'évaluation des règles ne change pas au cours des cycles d'interprétation.
 +
 +==== L'ajustement des prémisses ====
 +
 +En cas de sélection, une règle peut ajuster sa condition de façon à optimiser son espérance. Seules les prémisses excitatrices peuvent faire l'objet d'un ajustement.
 +
 +Chacune des règles possède un nombre maximal d'ajustements qui est fixé à l'initialisation. En effet, chaque règle comporte un nombre d’ajustement maximal afin d’optimiser l’espérance de la règle. Le calcul de l'ajustement s'effectue sur toutes les composantes dont la tolérance est ni nulle ni infinie. L'ajustement des composantes s'appuie sur l’hypothèse de leurs indépendances statistiques. Un noyau gaussien d'une composante est alors ajusté de la manière suivante à la énième sélection de la règle, avec les valeurs des événements <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi> x </mi></math></html> :
 +
 +<html><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow><msub><mi>μ</mi><mi>n</mi></msub><mo>=</mo><mfrac><mrow><msub><mi>μ</mi><mn>0</mn></msub><mo>+</mo><munderover><mo movablelimits="false">∑</mo><mrow><mi> i </mi><mo> = </mo><mn> 1 </mn></mrow><mrow><mi>i</mi><mo>=</mo><mi>n</mi></mrow></munderover><msub><mi>x</mi><mi>i</mi></msub></mrow><mrow><mi>n</mi><mo>+</mo><mn>1</mn></mrow></mfrac></mrow></math></html>
 +\\
 +<html><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow><msubsup><mi>σ</mi><mi>n</mi><mn>2</mn></msubsup><mo>=</mo><mfrac><mrow><mo stretchy="false">(</mo><msup><msub><mi>μ</mi><mn>0</mn></msub><mn>2</mn></msup><mo>+</mo><msubsup><mi>σ</mi><mn>0</mn><mn>2</mn></msubsup><mo stretchy="false">)</mo><mo>+</mo><munderover><mo movablelimits="false">∑</mo><mrow><mi> i </mi><mo> = </mo><mn> 1 </mn></mrow><mrow><mi>i</mi><mo>=</mo><mi>n</mi></mrow></munderover><msup><msub><mi>x</mi><mi>i</mi></msub><mn>2</mn></msup></mrow><mrow><mi>n</mi><mo>+</mo><mn>1</mn></mrow></mfrac><mo>-</mo><msup><msub><mi>μ</mi><mi>n</mi></msub><mn>2</mn></msup></mrow></math></html>
 +
 +Par ailleurs, l'ajustement de la variance <html><math xmlns="http://www.w3.org/1998/Math/MathML"><msup><mi> σ </mi><mn>2</mn></msup></math></html> oblige le recalcul de la spécificité <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi> α </mi></math></html> de la règle.
 +
 +===== La pertinence des règles =====
 +
 +Les règles susceptibles d'être oubliées doivent justifier de leur pertinence à être présentes dans la base de règles.
 +
 +La pertinence d’une règle reflète son activité et son originalité. L’évolution de la pertinence d’une règle repose sur des renforcements positifs et négatifs successifs. La dynamique de la pertinence discrimine les règles pertinentes de celles qui sont redondantes ou inactives. Toutefois, la dynamique prend en compte le fait qu’une règle ayant été suffisamment pertinente puisse être conservée bien qu’elle soit inappropriée pendant un certain temps.
 +
 +Les récompenses positives proviennent soit de la sélection, soit d'une règle de récompense. Les récompenses négatives proviennent uniquement de la redondance et de l'inactivité. Il n'y a pas de récompense négative. Une bonne règle correspond à une règle dont l’efficacité est garantie par la condition. Une récompense positive permet identifier les règles efficaces bien qu'elles soient peu usitées. Une règle qui ne serait pas toujours efficace est soit éliminée par la création d'une règle plus spécifique, soit inhibée par une nouvelle règle dans le contexte où elle ne serait pas adaptée. Dans le cas où le contexte pertinent de la règle reste général, la règle est maintenue.
 +
 +La pertinence correspond à un réel compris entre 0 et 1, 0 indiquant une règle non pertinente. Une pertinence à 1 signifie que la règle sera toujours pertinente, soit qu’elle restera toujours avec une pertinence maximale. Après chaque cycle d'interprétation, les règles ayant une pertinence en dessous du [[doc:langage_nomo#le_moteur_d_inference|seuil d'oubli]] sont éliminées. 
 +
 +Dans le cas théorique d’une pertinence évaluée en continue <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>p</mi><mo>(</mo><mi>t</mi><mo>)</mo></math></html>, la dynamique se traduit par une équation différentielle basée sur le renforcement positif <html><math xmlns="http://www.w3.org/1998/Math/MathML"><msup><mi>λ</mi><mo>+</mo></msup></math></html> et négatif <html><math xmlns="http://www.w3.org/1998/Math/MathML"><msup><mi>λ</mi><mo>-</mo></msup></math></html> :
 +
 +<html><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" stretchy="false"><mfrac><mrow><mo>d</mo><mi>p</mi><mo>(</mo><mi>t</mi><mo>)</mo></mrow><mrow><mo>d</mo><mi>t</mi></mrow></mfrac><mo>=</mo><mo>(</mo><msup><mi>λ</mi><mo>-</mo></msup><mo> &InvisibleTimes; </mo><mi>p</mi><mo>(</mo><mi>t</mi><mo>)</mo><mo>+</mo><msup><mi>λ</mi><mo>+</mo></msup><mo>)</mo><mo> &InvisibleTimes; </mo><mo>(</mo><mn>1</mn><mo>-</mo><mi>p</mi><mo>(</mo><mi>t</mi><mo>)<mo>)</mo></math></html>
 +
 +Renforcer la pertinence positivement ou négativement en fonction de la pertinence permet de rendre les règles de faible pertinence sensibles aux renforcements positifs et les règles de forte pertinence moins sensibles aux renforcements négatifs.
 +
 +Quatre sortes de renforcement existent : la taxe, l’enchère, le remboursement et, la récompense. La taxe et l’enchère produisent des renforcements négatifs, le remboursement et la récompense produisent des renforcements positifs. Les équations qui suivent traduisent le cas discret de la dynamique de la pertinence à chaque cycle d'interprétation <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>P</mi><mo>(</mo><mi>n</mi><mo>)</mo></math></html>. Les taux présentés ci-dessous correspondent à des constantes appartenant aux paramètres du [[doc:langage_nomo#le_moteur_d_inference|système décisionnel]].
 +
 +==== La taxe ====
 +
 +A chaque n interprétation, toutes les règles subissent une taxe qui vient éroder leur pertinence selon un taux négatif <html><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>t</mi><mi>t</mi></msub></math></html>. Cette taxe permet de diminuer jusqu’au seuil d’oubli les règles qui ne reçoivent aucun renforcement positif. La <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>Taxe</mi></math></html> au cycle d'interprétation <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mo>+</mo><mn>1</mn></math></html> se calcule en fonction de la pertinence précédente  <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>P</mi><mo>(</mo><mi>n</mi><mo>)</mo></math></html> :
 +
 +<html><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow><mi>Taxe</mi><mo>(</mo><mi>n</mi><mo>+</mo><mn>1</mn><mo>)</mo><mo>=</mo><msub><mi>t</mi><mi>t</mi></msub><mo>×</mo><mi>P</mi><mo>(</mo><mi>n</mi><mo>)</mo><mo>×</mo><mo>(</mo><mn>1</mn><mo>-</mo><mi>P</mi><mo>(</mo><mi>n</mi><mo>)</mo><mo>)</mo></mrow></math></html>
 +
 +==== L’enchère ====
 +
 +Le rôle de l’enchère consiste à diminuer la pertinence de toutes les règles redondantes selon un taux négatif <html><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>t</mi><mi>m</mi></msub></math></html>. A chaque interprétation, les règles paient une enchère proportionnelle à leur espérance <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>ξ</mi></math></html>. La <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>Mise</mi></math></html> de l’enchère au cycle d'interprétation <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mo>+</mo><mn>1</mn></math></html> est calculée en fonction de la pertinence <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>P</mi></math></html> : 
 +
 +<html><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow><mi>Mise</mi><mo>(</mo><mi>n</mi><mo>+</mo><mn>1</mn><mo>)</mo><mo>=<msub><mi>t</mi><mi>m</mi></msub></mo><mo>×</mo><mi>ξ</mi><mo>(</mo><mi>n</mi><mo>)</mo><mo>×</mo><mi>P</mi><mo>(</mo><mi>n</mi><mo>)</mo><mo>×</mo><mo>(</mo><mn>1</mn><mo>-</mo><mi>P</mi><mo>(</mo><mi>n</mi><mo>)</mo><mo>)</mo></mrow></math></html>
 +
 +==== Le remboursement ====
 +
 +L’enchère pénalisant davantage les règles possédant les espérances les plus élevées, il est nécessaire de rembourser la mise de règle sélectionnée. Ce remboursement s’effectue selon un taux positif <html><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>t</mi><mi>r</mi></msub></math></html> proportionnellement à l’espérance de la règle sélectionnée <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>ξ</mi></math></html>. Le <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>Remboursement</mi></math></html> au cycle d'interprétation <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mo>+</mo><mn>1</mn></math></html> se calcule en fonction de la pertinence <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>P</mi></math></html> précédente :
 +
 +<html><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow><mi>Remboursement</mi><mo>(</mo><mi>n</mi><mo>+</mo><mn>1</mn><mo>)</mo><mo>=</mo><msub><mi>t</mi><mi>r</mi></msub><mo>×</mo><mi>ξ</mi><mo>(</mo><mi>n</mi><mo>)</mo><mo>×</mo><mo>(</mo><mn>1</mn><mo>-</mo><mi>P</mi><mo>(</mo><mi>n</mi><mo>)</mo><mo>)</mo></mrow></math></html>
 +
 +==== La récompense ====
 +
 +La récompense déclenchée par l’arrivée d’un événement de récompense augmente la pertinence des règles ciblées en fonction de leur pertinence. Le mécanisme ciblant indirectement les règles à récompenser est présenté avec la [[doc:base_de_connaissances#Les règles de récompense|base de règles]]. La récompense est proportionnelle à la crédibilité <html><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>C</mi><mi>e</mi></msub></math></html> portée par l'évènement de récompense et avec un taux positif <html><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>t</mi><mi>g</mi></msub></math></html>. Le <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>Gain</mi></math></html> produit par la récompense au cycle d'interprétation <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mo>+</mo><mn>1</mn></math></html> se calcule en fonction de la pertinence <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>P</mi></math></html> précédente :
 +
 +<html><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow><mi>Gain</mi><mo>(</mo><mi>n</mi><mo>+</mo><mn>1</mn><mo>)</mo><mo>=</mo><msub><mi>t</mi><mi>g</mi></msub><mo>×</mo><msub><mi>C</mi><mi>e</mi></msub><mo>×</mo><mo>(</mo><mn>1</mn><mo>-</mo><mi>P</mi><mo>(</mo><mi>n</mi><mo>)</mo><mo>)</mo></mrow></math></html>
 +
 +==== Les quatre situations possibles ====
 +
 +A partir de ces quatre sources, quatre situations de calcul de la pertinence se profilent au cycle d'interprétation <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi><mo>+</mo><mn>1</mn></math></html> :
 +La première situation correspond aux règles qui n’ont été ni sélectionnées ni récompensées, la réévaluation de leur pertinence revient à :
 +<html><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow><mi>P</mi><mo>(</mo><mi>n</mi><mo>+</mo><mn>1</mn><mo>)</mo><mo>=</mo><mi>P</mi><mo>(</mo><mi>n</mi><mo>)</mo><mo>+</mo><mi>Taxe</mi><mo>(</mo><mi>n</mi><mo>+</mo><mn>1</mn><mo>)</mo><mo>+</mo><mi>Mise</mi><mo>(</mo><mi>n</mi><mo>+</mo><mn>1</mn><mo>)</mo></mrow></math></html>
 +La deuxième situation concerne le cas où la règle est sélectionnée :
 +<html><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow><mi>P</mi><mo>(</mo><mi>n</mi><mo>+</mo><mn>1</mn><mo>)</mo><mo>=</mo><mi>P</mi><mo>(</mo><mi>n</mi><mo>)</mo><mo>+</mo><mi>Taxe</mi><mo>(</mo><mi>n</mi><mo>+</mo><mn>1</mn><mo>)</mo><mo>+</mo><mi>Mise</mi><mo>(</mo><mi>n</mi><mo>+</mo><mn>1</mn><mo>)</mo><mo>+</mo><mi>Remboursement</mi><mo>(</mo><mi>n</mi><mo>+</mo><mn>1</mn><mo>)</mo></mrow></math></html>
 +La troisième situation survient lorsque la règle non sélectionnée reçoit une récompense :
 +<html><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow><mi>P</mi><mo>(</mo><mi>n</mi><mo>+</mo><mn>1</mn><mo>)</mo><mo>=</mo><mi>P</mi><mo>(</mo><mi>n</mi><mo>)</mo><mo>+</mo><mi>Taxe</mi><mo>(</mo><mi>n</mi><mo>+</mo><mn>1</mn><mo>)</mo><mo>+</mo><mi>Mise</mi><mo>(</mo><mi>n</mi><mo>+</mo><mn>1</mn><mo>)</mo><mo>+</mo><mi>Gain</mi><mo>(</mo><mi>n</mi><mo>+</mo><mn>1</mn><mo>)</mo></mrow></math></html>
 +La dernière situation arrive quand la règle sélectionnée est en même temps récompensée :
 +<html><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow><mi>P</mi><mo>(</mo><mi>n</mi><mo>+</mo><mn>1</mn><mo>)</mo><mo>=</mo><mi>P</mi><mo>(</mo><mi>n</mi><mo>)</mo><mo>+</mo><mi>Taxe</mi><mo>(</mo><mi>n</mi><mo>+</mo><mn>1</mn><mo>)</mo><mo>+</mo><mi>Mise</mi><mo>(</mo><mi>n</mi><mo>+</mo><mn>1</mn><mo>)</mo><mo>+</mo><mi>Remboursement</mi><mo>(</mo><mi>n</mi><mo>+</mo><mn>1</mn><mo>)</mo><mo>+</mo><mi>Gain</mi><mo>(</mo><mi>n</mi><mo>+</mo><mn>1</mn><mo>)</mo></mrow></math></html>
 +===== Les cas particuliers =====
 +
 +==== Les règles de récompense ====
 +
 +Les règles de récompense ne peuvent être la cible de récompense. En revanche, une règle de récompense s'auto-rétribue à chaque sélection de la même manière que les autres règles ciblées par la récompense. 
 +
 +Autrement dit, le calcul de la pertinence repose uniquement sur les équations décrites dans le cadre de la première et de la dernière situation présentées ci-dessus. 
 +
 +L'idée est qu'une règle un peu activée mais ne récompensant que peu les règles visées possède une faible utilité à terme, et à l'inverse, une règle peu usitée mais récompensant fortement les règles ciblées doit être maintenue. 
 +
 +==== Les règles de contrôle ====
 +
 +Compte tenu que les règles de contrôle évaluent la base de faits dans la durée, le traitement des règles de contrôle diffère des autres catégories de règles. Le rôle des règles de contrôle est présenté dans la partie abordant la [[doc:base_de_connaissances#Les règles de contrôle|base de connaissances]]. 
 + 
 +En effet, la première sélection d'une règle de contrôle repose uniquement sur l'adéquation des prémisses de prédiction et de marquage. Ensuite, tant que la prémisse de prédiction est satisfaite, à chaque cycle d'interprétation, les autres règles de contrôle du même type sont inhibées et le calcul de la crédibilité de la règle s'effectue de la même manière que les autres catégories de règles. 
 +
 +Au final la crédibilité <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>C</mi></math></html> de la règle de contrôle sur <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>N</mi></math></html> cycle d'interprétation correspond à la crédibilité maximale :
 +
 +<html><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow><mi>C</mi><mo>=</mo><msub><mrow><mo>max</mo><mo>(</mo><mrow><msub><mi>C</mi><mi>j</mi></msub></mrow><mo>)</mo></mrow><mrow><mi>j</mi><mo>∈</mo><mi>N</mi></mrow></msub></mrow></math></html>
 +
 +L'ajustement de la règle s'effectue uniquement sur l'indice temporel de la prémisse de marquage et avec l'évènement maximisant la crédibilité de la règle de contrôle. Par ailleurs, l'ajustement est alors reporté à la conclusion de la règle de prédiction.
 +
 +Le calcul de l'ajustement est quasiment le même que pour les règles d'autres catégories sauf lorsque l'indice temporel de l’évènement devient trop petit par rapport à la couverture de l'évaluation de la prédiction.
 +
 +En effet, l'évaluation de la prédiction est asymétrique puisqu'elle s'effectue avec la [[doc:base_de_connaissances#Les règles de contrôle|couverture]] <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>c</mi></math></html> sur l'intervalle <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mo>[</mo><mn>0</mn><mo>;</mo><mi>μ</mi><mo>+</mo><mi>c</mi><mo>×</mo><mi>σ</mi><mo>[</mo></math></html>. Afin de minimiser le risque de dérive, les valeurs inférieures à <html><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>μ</mi><mo>+</mo><mi>c</mi><mo>×</mo><mi>σ</mi></math></html> ne participent pas à l’estimation de la moyenne mais contribuent à deux fois à celle de la variance pour tenir compte la valeur symétrique :
 +
 +<html><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><msub><mi>μ</mi><mi>n</mi></msub><mo>=</mo><msub><mi>μ</mi><mrow><mi>n</mi><mo>-</mo><mn>1</mn></mrow></msub></math></html>
 +
 +<html><math xmlns="http://www.w3.org/1998/Math/MathML" display="block" stretchy="false"><msubsup><mi>σ</mi><mi>n</mi><mn>2</mn></msubsup><mo>=</mo><mfrac><mrow><munderover><mo movablelimits="false">∑</mo><mrow><mi> i </mi><mo> = </mo><mn> 1 </mn></mrow><mrow><mi>i</mi><mo>=</mo><mi>n</mi><mo>-</mo><mn> 1 </mn></mrow></munderover><msup><msub><mi>x</mi><mi>i</mi></msub><mn>2</mn></msup><mo>+</mo><mn>2</mn><mo>×</mo><mo>(</mo><msup><msub><mi>μ</mi><mi>n</mi></msub><mn>2</mn></msup><mo>+</mo><msup><mrow><mo>(</mo><msub><mi>x</mi><mi>n</mi></msub><mo>-</mo><msub><mi>μ</mi><mi>n</mi></msub><mo>)</mo></mrow><mn>2</mn></msup><mo>)</mo><mo>×</mo><mfrac><mrow><mi>n</mi><mo>-</mo><munderover><mo movablelimits="false">∑</mo><mrow><mi> i </mi><mo> = </mo><mn> 1 </mn></mrow><mrow><mi>i</mi><mo>=</mo><mi>n</mi><mo>-</mo><mn> 1 </mn></mrow></munderover><msup><msub><mi>x</mi><mi>i</mi></msub><mn>2</mn></msup></mrow><mrow><mi>n</mi><mo>+</mo><mn>1</mn></mrow></mfrac></mrow><mi>n</mi></mfrac><mo>-</mo><msup><msub><mi>μ</mi><mi>n</mi></msub><mn>2</mn></msup></math></html> 
 +
 +Concernant la dynamique de la pertinence des règles de contrôle, la taxe est prélevée à chaque cycle d'interprétation, l'enchère et le remboursement sont appliqués lors de la première sélection avec une espérance à 1 ; lorsqu'elle n'est pas sélectionnée l'espérance est à 0. Dans le cas où la règle de prédiction et celle de marquage associée à la règle de contrôle possèdent également des conditions exclusives avec les autres règles, elles ont une pertinence identique à un cycle d'interprétation près.