|
7 | 7 | [](http://pkg.julialang.org/?pkg=DecisionTree&ver=0.6)
|
8 | 8 | [](http://pkg.julialang.org/?pkg=DecisionTree&ver=0.7)
|
9 | 9 |
|
10 |
| -Julia implementation of Decision Trees & Random Forests |
| 10 | +Julia implementation of Decision Tree and Random Forest algorithms |
11 | 11 |
|
12 | 12 | ## Classification
|
13 | 13 | * pre-pruning (max depth, min leaf size)
|
@@ -72,7 +72,7 @@ Also have a look at these [classification](https://github.com/cstjean/ScikitLear
|
72 | 72 |
|
73 | 73 | ## Native API
|
74 | 74 | ### Classification Example
|
75 |
| -Pruned Tree Classifier |
| 75 | +Decision Tree Classifier |
76 | 76 | ```julia
|
77 | 77 | # train full-tree classifier
|
78 | 78 | model = build_tree(labels, features)
|
@@ -101,7 +101,7 @@ model = build_tree(labels, features, nsubfeatures, maxdepth, min_samples_leaf, m
|
101 | 101 | Random Forest Classifier
|
102 | 102 | ```julia
|
103 | 103 | # train random forest classifier
|
104 |
| -# using 2 random features, 10 trees, 0.5 portion of samples per tree (optional), and a maximum tree depth of 6 (optional) |
| 104 | +# using 2 random features, 10 trees, 0.5 portion of samples per tree, and a maximum tree depth of 6 |
105 | 105 | model = build_forest(labels, features, 2, 10, 0.5, 6)
|
106 | 106 | # apply learned model
|
107 | 107 | apply_forest(model, [5.9,3.0,5.1,1.9])
|
@@ -161,7 +161,7 @@ model = build_tree(labels, features, min_samples_leaf, nsubfeatures, max_depth,
|
161 | 161 | Regression Random Forest
|
162 | 162 | ```julia
|
163 | 163 | # train regression forest, using 2 random features, 10 trees,
|
164 |
| -# averaging of 5 samples per leaf (optional), and 0.7 portion of samples per tree (optional) |
| 164 | +# averaging of 5 samples per leaf, and 0.7 portion of samples per tree |
165 | 165 | model = build_forest(labels, features, 2, 10, 5, 0.7)
|
166 | 166 | # apply learned model
|
167 | 167 | apply_forest(model, [-0.9,3.0,5.1,1.9,0.0])
|
|
0 commit comments