Skip to content

Commit b045bb9

Browse files
authored
Merge pull request #196 from JuliaAI/dev
For a 0.11.3 release
2 parents 38dbbb8 + c199322 commit b045bb9

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ styleguide.txt
33
makefile
44
.DS_Store
55
Manifest.toml
6+
.vscode

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name = "DecisionTree"
22
uuid = "7806a523-6efd-50cb-b5f6-3fa6f1930dbb"
33
license = "MIT"
44
desc = "Julia implementation of Decision Tree (CART) and Random Forest algorithms"
5-
version = "0.11.2"
5+
version = "0.11.3"
66

77
[deps]
88
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"

src/abstract_trees.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ in "Towards Data Science":
1515
["If things are not ready to use"](https://towardsdatascience.com/part-iii-if-things-are-not-ready-to-use-59d2db378bec)
1616
"""
1717

18-
1918
"""
2019
InfoNode{S, T}
2120
InfoLeaf{T}
@@ -30,15 +29,17 @@ In analogy to the type definitions of `DecisionTree`, the generic type `S` is
3029
the type of the feature values used within a node as a threshold for the splits
3130
between its children and `T` is the type of the classes given (these might be ids or labels).
3231
"""
33-
struct InfoNode{S, T}
32+
struct InfoNode{S, T} <: AbstractTrees.AbstractNode{DecisionTree.Node{S,T}}
3433
node :: DecisionTree.Node{S, T}
3534
info :: NamedTuple
3635
end
36+
AbstractTrees.nodevalue(n::InfoNode) = n.node
3737

38-
struct InfoLeaf{T}
38+
struct InfoLeaf{T} <: AbstractTrees.AbstractNode{DecisionTree.Leaf{T}}
3939
leaf :: DecisionTree.Leaf{T}
4040
info :: NamedTuple
4141
end
42+
AbstractTrees.nodevalue(l::InfoLeaf) = l.leaf
4243

4344
"""
4445
wrap(node::DecisionTree.Node, info = NamedTuple())

0 commit comments

Comments
 (0)