4#include <unordered_map>
11#include "../../thirdparty/tree.hh"
25 : parent(0), first_child(0), last_child(0), prev_sibling(0), next_sibling(0)
29 : parent(0), first_child(0), last_child(0), prev_sibling(0), next_sibling(0), data(
val)
33 : parent(0), first_child(0), last_child(0), prev_sibling(0), next_sibling(0), data(
val)
47 template<
typename T,
typename W>
71auto TreeNode::predict(
const Dataset&
d,
const float** weights)
74 return F(
d, (*
this), weights);
77template<
typename T,
typename W>
78auto TreeNode::predict(
const Dataset&
d,
const W** weights)
81 return F(
d, (*
this), weights);
void bind_engine(py::module &m, string name)
holds variable type data.
auto fit(const Dataset &d)
string get_model(bool pretty=false) const
auto predict(const Dataset &d, const float **weights=nullptr)
tree_node_(const Node &val)
string get_tree_model(bool pretty=false, string offset="") const
auto predict(const Dataset &d, const W **weights)
tree_node_< Node > * parent
int get_size(bool include_weight=true) const
int get_complexity() const
tree_node_< Node > * first_child
tree_node_< Node > * next_sibling
class tree_node_< Node > TreeNode
DispatchTable< false > dtable_predict
void from_json(const json &j, Fitness &f)
void to_json(json &j, const Fitness &f)
DispatchTable< true > dtable_fit
class holding the data for a node in a tree.