Vous êtes sur la page 1sur 1

Dduction moteurs dinfrence bass sur des rgles et applications dans des systmes experts.

Abduction algorithmes de recherche, satisfaction de contraintes et applications en diagnostic et planication. Induction algorithmes dapprentissage partir dexemples et applications pour la classication. Clauses de Horn max. 1 proposition positive Preuve par l'absurde {P} {q} Chanage avant Appliquer le modus ponens pour produire q et ainsi avoir la contradiction. Chanage arrire Rsolution de q avec rgle ou fait, ensuite application rc. sur les conditions de la rgle. forward-chaining(F|acts, R|ules) : Q {F} while not Q.empty? do (q :: Q) Q; next if q BD BD BD :: q; if q is a goal node then print q for r {R} do if q conditions(r) and conditions(r) BD Q Q :: conclusion(r) UNIFY(E1,E2): if E1 or E2 is a symbol then swap if necessary so that E1 is an atom if E1 = E2 then return {} if E1 is a variable then if E1 appears in E2 then return FAIL return {E1 : E2} if E2 is a variable then return {E2 : E1} return FAIL (F1 :: T1) E1 // resp. F2 Z1 UNIFY(F1,F2) if Z1 = FAIL then return FAIL G1 apply substitutions Z1 to T1 // resp. G2 Z2 UNIFY(G1,G2) if Z2 = FAIL then return FAIL return { Z1 Z2 } reverse-chaining(R|ules, F|acts, G|oals): envs { initial-goals } = {G} while not envs.empty? do (e :: envs) envs if all goals from e are solved then return (goals(e), unifiers(e)) for unresolved goal g e do for p F do U UNIFY(p, g) if U FAIL then envs envs ::: ((e \ g) U) foreach rule r R do U UNIFY(rhs(r), g) if U FAIL then nb instantiate(lhs(r), U) envs envs ::: ((e \ g) nb)

Branch-and-bound cost(succ(n)) cost(n), break Heuristic search f(n) = g(n) + h(n) g(n) cost to n h(n) cost from n to the objective f(n) cost of the path to the objective going through n A-star (root) : Q (Noeud initial); C {} while not Q.empty? Do (n :: Q) rest(Q) if n C, or n n C but g(n) < g(n) then if n is a goal node, return n C n :: C S sort(succ(n), f) Q merge(S, Q, f) return FAIL (A* optimal as long as h(n) never overestimates) Beam Search only explore the best n nodes Iter. Deepening A DFS until a threshold of h(n) Memory-bounded A forget and regenerate nodes CSP Variables X = {x1, x2, ..., xn}, Domains Constraints C = {c1(xk , xl, ...), c2, ..., cm}

MS CAND OBS or (MS CAND) OBS / / abduction explicite monde clos, on considre toutes les hypothse, terminer quand explication satisfaisante. (Can use A*, but really hard to find out good heuristic) transformation en dduction simuler les tous dfauts, construire rgles de dduction pour le diagno. Problmes pas toujours clauses de Horn, monde clos = gros cot de changement de circuit (reprogrammation) raisonnement incertain abduction en utilisant des CF Limites comment choisir les CF ? Aucune garantie de succs, ncessite exprimentation. Principe : rgles de comportement prdisent mesures, diffrence avec la ralit = symptme, abduction pour en trouver la cause. Candidats minimaux = {{a}, {b}, ..} for CAND, c conflit, C' = CAND {c}; filter non-min Choose next measure: take highest entropy: E(vari) = k p(vari = valik) log(p(vari = valik)) Planification automatique tat initial + oprateurs + conditions finales, trouver squence. STRIPS preconditions P, postconditions A, deletions D Can use A* to solve planification problems PERCEPTRON(P, N): H {1,0,0,...,0} for Xi P N do if C(H,Xi) class(Xi) then if class(Xi) = + then H H + Xi else H H - Xi return H = coecient dapprentissage (par exemple =1) Support Vector Machines (SVM) maximiser la sparation des exemples. Transformation non-linaire.

DFS (x|array of n vars, d|omain, k|x is filled up to k): if k n then return x for v d[k+1] do consistent true for i 1 to k do if consistent(v,x[i],C(i,k+1)) then consistent false if consistent then x[k+1] v rest DFS(x, d, k+1) if rest FAIL then return rest return FAIL if assigning xk+1 fails, you need to change a variable: backjumping go back to the last variable that had a constraint with xk+1

Concepts disjonctifs hypothses sont violes par tous les exemples positifs Listes de dcisions hypothses satisfaites par certains conflict-directed backjumping go back to the last var exemples ngatifs that had a conflict with xk+1 (ie. conflicting constraints) DISJONCT(P,N) : PSET P ; TERMS {} forward-checking maintain a label l[i] for each variable. At first, l[i] = domain. For each instantiation, remove from the label every inconsistent value. lookahead iterative process: check between every non-instantiated variable pair. dynamic variable ordering (DVO) smallest label first while not PSET.empty? do D description covering X PSET but no n N PSET PSET - X TERMS TERMS D return TERMS TERMS = {D1, D2, ...} D = D1 D2 ...

ID3(E): if E = {} then return NIL else min-width ordering take the variable with constraints if e E class(e)=c then that have the smallest number of variables still open. return c max-degree ordering most connected variable first else P attribute A minimizing entropy of class(e) Consistance des arcs itr. rduire search space en L {e|e E et P(e) = success} limitant les contraintes aux valeurs permises par les R {e|e E et P(e) = failure} contraintes voisines. (Waltz algorithm) N empty node, N.P P REVISE(i,j) : dirty false Srie CF(X) = CF(rule) * max(min(CF(A),CF(B),...)),0) N.left ID3(L), N.right ID3(R) for x li do Para CFcombine (x, y) = x + y xy if x 0, y 0 return N if no y lj such that C(x, y) then x + y + xy if x < 0, y < 0 li li \ x H(X) = i=1, k p(X = vi) log2 p(X = vi) (x+y) / (1min(|x|,|y|)) else dirty true H(X|Y = yj) = i=1, k p(X = vi|Y = yj) log2 p(X=vi|Y=yj) p(B) = p(B|A) p(A) + p(B|A)(1 p(A)) Entropy selects attrs with many vals: compensate by Efficient with trees, but ~useless if there are cycles. p(B|A) = p(A,B)/p(A) Local search start with initial assignment, iterate until dividing H by the # of branches generated. Indpendance de A et C : p(C|A) = p(C|A) = p(C) all constraints are satisfied. Problem = local extremas C4.5 = ID3 + tree cutting / transformation into rules Indpendance cond. de A et C tant donn B (#) Around leafs, decisions are based on few examples: Deterministic (min-conflicts/GSAT) p(C|A,B) = p(C|A,B) = p(C|B) evaluate error rate, cut sub-branches with most errors. Probabilistic (simulated annealing = recuit simul) Chain: p(C|A) = p(C|A,B) p(B|A) + p(C|A,B) p(B|A) Rule creation = each branch makes a rule, simplifies. min-conicts (X,V,C) : w/#, p(C|A) = p(C|B) p(B|A) + p(C|B) (1 p(B|A)) Boosting linearly combine weak (err < 50%) methods for i 1 to max-tries do Bayes p(A|B) = p(A,B) / p(B) = p(B|A) p(A) / p(B) Hierarchic clustering build a dendogram from the V random assignment p(A|Y1, ..,Yk ) = p(A) (i = 1 to k) p(Yi|A) ground up: leafs are data points, regroup closest ones. for j 1 to max-steps do Single-link (dist=min) worsethan Complete-link (dist=max) nconf check(V,C) DFS (root-node) : Q {root} if nconf = 0 then return while not Q.empty? do K-means clustering make K clusters, randomly assign else (n:: Q) Q data points to them, recompute kernels, reassign data find k such that changing v[k] gives min-conflicts points to nearest kernel. if n is a goal node return n change v[k] S succ(n) Clustering based on graph theory construct minimal return partial solution V Q S ::: Q spanning tree (MST), remove tallest edges, and voil ! return FAIL simulated-annealing(X,V,C) : V random assignment Fuzzy clustering creater clusters, data points have (BFS: replace with Q Q ::: S) T[max-steps] "temperature reduction" plan probabilities to belong to a cluster. for j 1 to max-steps do DLS: DFS but with a guard condition: Inspirational Quotes nconf check(V,C) for nn S do Ah, but a man's reach should exceed his grasp, or if nconf = 0 then return V depth-limit(nn) depth-limit(n) - 1 what's a heaven for? Robert Browning V V with a randomly changed v[k] if depth-limit(nn) 0 then Q nn :: Q if check(V,C) < check(V,C) then The significance of a man is not in what he attains but iterative-deepening (root): V V in what he longs to attain. Kahlil Gibran l2 else Every ceiling, when reached, becomes a floor, upon while solution = {} do if random(0..1) < T[j] then V V which one walks as a matter of course and prescriptive solution DLS(root, l) return partial solution V right. Aldous Huxley ll+1 (T = decreasing list of probabilities) To reach a port, we must sailSail, not tie at anchor DFS w/cycle detection guard set C, condition not C Sail, not drift. Franklin Roosevelt Optimisation by DFS find solution w/smallest cost c Diagnostic MS OBS , two ways to solve:

Vous aimerez peut-être aussi