Up
Go up to 2 Decision Tree Evaluation

Solution to decision tree evaluation

dteval(Obj,DT,Cl)
is true if object Obj is classified by decision tree DT as having value Cl.
dteval(Ex,V,V) <-
    value(V).
dteval(Ex,if(A=V,T1,T2),C) <-
    prop(Ex,A,V) &
    dteval(Ex,T1,C).
dteval(Ex,if(A=V,T1,T2),C) <-
    prop(Ex,C,W) &
    W \= V &
    dteval(Ex,T2,C).

Computational Intelligence online material, ©David Poole, Alan Mackworth and Randy Goebel, 1998

Up