module mlmodel._piecewise_tree_regression_common

Short summary

module mlinsights.mlmodel._piecewise_tree_regression_common

Implements a custom criterion to train a decision tree.

source on GitHub

Classes

class

truncated documentation

CommonRegressorCriterion

Common class to implement various version of mean square error. …

Functions

function

truncated documentation

_test_criterion_impurity_improvement

_test_criterion_impurity_improvement(Criterion criterion, double impurity) Test purposes. Methods cannot be directly called …

_test_criterion_init

_test_criterion_init(Criterion criterion, const DOUBLE_t[:,

_test_criterion_node_impurity

_test_criterion_node_impurity(Criterion criterion) Test purposes. Methods cannot be directly called from python.

_test_criterion_node_impurity_children

_test_criterion_node_impurity_children(Criterion criterion) Test purposes. Methods cannot be directly called from python. …

_test_criterion_node_value

_test_criterion_node_value(Criterion criterion) Test purposes. Methods cannot be directly called from python.

_test_criterion_printf

_test_criterion_printf(Criterion crit) Test purposes. Methods cannot be directly called from python.

_test_criterion_proxy_impurity_improvement

_test_criterion_proxy_impurity_improvement(Criterion criterion) Test purposes. Methods cannot be directly called from python. …

_test_criterion_update

_test_criterion_update(Criterion criterion, SIZE_t new_pos) Test purposes. Methods cannot be directly called from python. …

Documentation

@file @brief Implements a custom criterion to train a decision tree.

class mlinsights.mlmodel._piecewise_tree_regression_common.CommonRegressorCriterion

Bases: sklearn.tree._criterion.Criterion

Common class to implement various version of mean square error. The code was inspired from hellinger_distance_criterion.pyx, Cython example of exposing C-computed arrays in Python without data copies, _criterion.pyx. This implementation is not efficient but was made that way on purpose. It adds the features to the class.

__getstate__(self)
__new__(**kwargs)

Create and return a new object. See help(type) for accurate signature.

__pyx_vtable__ = <capsule object NULL>
__reduce_cython__(self)
__setstate__(self, d)
__setstate_cython__(self, __pyx_state)
mlinsights.mlmodel._piecewise_tree_regression_common._test_criterion_impurity_improvement(Criterion criterion, double impurity)

Test purposes. Methods cannot be directly called from python.

mlinsights.mlmodel._piecewise_tree_regression_common._test_criterion_init(Criterion criterion, const DOUBLE_t[:, ::1] y, DOUBLE_t[:] sample_weight, double weighted_n_samples, SIZE_t[:] samples, SIZE_t start, SIZE_t end)

Test purposes. Methods cannot be directly called from python.

mlinsights.mlmodel._piecewise_tree_regression_common._test_criterion_node_impurity(Criterion criterion)

Test purposes. Methods cannot be directly called from python.

mlinsights.mlmodel._piecewise_tree_regression_common._test_criterion_node_impurity_children(Criterion criterion)

Test purposes. Methods cannot be directly called from python.

mlinsights.mlmodel._piecewise_tree_regression_common._test_criterion_node_value(Criterion criterion)

Test purposes. Methods cannot be directly called from python.

mlinsights.mlmodel._piecewise_tree_regression_common._test_criterion_printf(Criterion crit)

Test purposes. Methods cannot be directly called from python.

mlinsights.mlmodel._piecewise_tree_regression_common._test_criterion_proxy_impurity_improvement(Criterion criterion)

Test purposes. Methods cannot be directly called from python.

mlinsights.mlmodel._piecewise_tree_regression_common._test_criterion_update(Criterion criterion, SIZE_t new_pos)

Test purposes. Methods cannot be directly called from python.