Home

Awesome

Racket Machine Learning - Decision Trees

GitHub release Travis Status Coverage Status raco pkg install rml-core Documentation GitHub stars MIT License

This Package is part of a set of packages implementing machine learning capabilities for Racket. This particular package implements support for classification of individuals using decision trees.

Modules

Examples

(require rml/individual
         rml-decision-trees)

(define test-tree
 (make-decision-tree
   (make-decision
    "size"
    (list [cons (curryr < 5) (make-terminal 'small)]
          [cons (curryr > 10) (make-terminal 'large)])
    #:else (make-decision
            "color"
            (list [cons (curry string=? "black") (make-terminal 'cocktail)])
                  #:else (make-terminal 'medium)))))

(define test-individual (make-hash (list (cons "size" 3) (cons "color" "black"))))

(tree-classify test-tree test-individual)

Racket Langaueg