module mltree._tree_digitize#

Short summary#

module mlinsights.mltree._tree_digitize

Access to the C API of scikit-learn (decision tree)

source on GitHub

Functions#

function

truncated documentation

tree_add_node

tree_add_node(tree, parent, is_left, is_leaf, feature, threshold, impurity, n_node_samples, weighted_n_node_samples) …

Documentation#

@file @brief Access to the C API of scikit-learn (decision tree)

mlinsights.mltree._tree_digitize.tree_add_node(tree, parent, is_left, is_leaf, feature, threshold, impurity, n_node_samples, weighted_n_node_samples)#

Adds a node to tree.

Parameters:
  • parent – parent index (-1 for the root)

  • is_left – is left node?

  • is_leaf – is leave?

  • feature – feature index

  • threshold – threshold (or value)

  • impurity – impurity

  • n_node_samples – number of samples this node represents

  • weighted_n_node_samples – node weight