https://github.com/johnstonskj/rml-decisiontrees
Racket Machine Learning - Decision Trees
https://github.com/johnstonskj/rml-decisiontrees
Last synced: 14 days ago
JSON representation
Racket Machine Learning - Decision Trees
- Host: GitHub
- URL: https://github.com/johnstonskj/rml-decisiontrees
- Owner: johnstonskj
- License: mit
- Created: 2018-08-08T16:06:33.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-06-18T15:25:51.000Z (10 months ago)
- Last Synced: 2025-02-12T23:33:55.354Z (2 months ago)
- Language: Racket
- Size: 16.6 KB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-racket - rml-decisiontrees - 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. (Machine Learning)
README
# Racket Machine Learning - Decision Trees
[](https://github.com/johnstonskj/rml-decisiontrees/releases)
[](https://www.travis-ci.org/johnstonskj/rml-decisiontrees)
[](https://coveralls.io/github/johnstonskj/rml-decisiontrees?branch=master)
[](http://pkgs.racket-lang.org/package/rml-decisiontrees)
[](http://docs.racket-lang.org/rml-decisiontrees/index.html)
[](https://github.com/johnstonskj/rml-core/stargazers)
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
* Support for classifying an individual against a known tree.
# Examples
```scheme
(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)
```[](https://racket-lang.org/)