The PR has also discovered the hard way that the contents of the leaf should be a Vector for both kinds of trees. The core of that is summarized as follows:
"""
Type which holds the values inside a leaf.
For classification, this is a vector of probabilities of each class.
For regression, this is a vector of one element.
!!! note
Vectors of one element are not as performant as scalars, but the
alternative here is to have two different types of leafs, which
results in different types of trees also, which basically
requires most functions then to become parametric.
"""
const LeafContent = Vector{Float64}
So, don't define two types for the contents.
Furthermore, defines StableRulesRegressor, which goes towards fixing #13.
The PR has also discovered the hard way that the contents of the leaf should be a
Vector
for both kinds of trees. The core of that is summarized as follows:So, don't define two types for the contents.
Furthermore, defines
StableRulesRegressor
, which goes towards fixing #13.Predictive performance is poor though: