Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (define create-tree
- (λ (examples attributes class-attribute)
- ;Prima oara, pe post de root inserez elementul cu IG-ul cel mai mare
- (list (first (max-IG-atribute (gains examples attributes class-attribute) attributes (my-max (associate attributes (gains examples attributes class-attribute))) examples (first class-attribute)))
- (map (lambda (x y) (append (list y) (create-tree
- x
- (rest-attributes attributes (first (max-IG-atribute (gains examples attributes class-attribute) attributes (my-max (associate attributes (gains examples attributes class-attribute))) examples (first class-attribute))))
- class-attribute
- )))
- (Sieves examples
- (first (max-IG-atribute (gains examples attributes class-attribute) attributes (my-max (associate attributes (gains examples attributes class-attribute))) examples (first class-attribute)))
- (rest (max-IG-atribute (gains examples attributes class-attribute) attributes (my-max (associate attributes (gains examples attributes class-attribute))) examples (first class-attribute))))
- (rest (max-IG-atribute (gains examples attributes class-attribute) attributes (my-max (associate attributes (gains examples attributes class-attribute))) examples (first class-attribute)))
- ))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement