neural_trees.HardRegressionTree#
- class neural_trees.HardRegressionTree(weights, biases, node_values, n_features_in, is_split=None, log_beta=None, single_output=True)[source]#
Bases:
HardDecisionTreeA trained
SoftDecisionTreeRegressorwith its gates read as hard decisions and one value per leaf, in target units.Built by
SoftDecisionTreeRegressor.to_hard_tree(). The walk is the parent class’s; only the leaves differ:node_values_of shape(n_nodes, n_outputs)replaces the class distributions,predictreturns values andscoreis R^2. Like the classifier’s export it is a different model from the soft tree, not a re-encoding: it reports its agreement rather than assuming it.