Open jakebasilico opened 2 years ago
Also an error here when checking whether sample_weight is none: https://github.com/sdpython/mlinsights/blob/c23988e57080058686418d9e22401d39865c97ff/mlinsights/mlmodel/piecewise_tree_regression.py#L135
Because sample_weight is an numpy array, it looks like using sample_weight.any() or "if sample_weight is not None" fixes this issue
Loving the package so far!
Sorry for the delay, is it possible to know how you call it? sample_weights should be an array.
I'm trying to build an ensemble learner using PiecewiseTreeRegressors. In doing so, the parameter "sample_weight" is utilized during fitting of the estimator. This throws an error here: https://github.com/sdpython/mlinsights/blob/c23988e57080058686418d9e22401d39865c97ff/mlinsights/mlmodel/piecewise_tree_regression_criterion_linear.pyx#L150
when executing line 136 in piecewise_tree_regression.py: https://github.com/sdpython/mlinsights/blob/c23988e57080058686418d9e22401d39865c97ff/mlinsights/mlmodel/piecewise_tree_regression.py#L136
AttributeError: 'mlinsights.mlmodel.piecewise_tree_regression_crite' object has no attribute 'sum'