neurodata / honest-forests

Honest decision forests and trees implemented efficiently and scikit-learn compliant.
Other
6 stars 2 forks source link

BUG Fix parameter name in forest initialization #7

Closed PSSF23 closed 1 year ago

PSSF23 commented 1 year ago

@rflperry Observed in #6

TypeError: ForestClassifier.__init__() missing 1 required positional argument: 'estimator'
sampan501 commented 1 year ago

I think the solution to this may be that the code initializes with base_estimator instead of estimator. May be a recent scikit-learn change

PSSF23 commented 1 year ago

Ye according to their current documentation:

estimator_ : :class:`~sklearn.tree.DecisionTreeClassifier`
    The child estimator template used to create the collection of fitted
    sub-estimators.
    .. versionadded:: 1.2
       `base_estimator_` was renamed to `estimator_`.
base_estimator_ : DecisionTreeClassifier
    The child estimator template used to create the collection of fitted
    sub-estimators.
    .. deprecated:: 1.2
        `base_estimator_` is deprecated and will be removed in 1.4.
        Use `estimator_` instead.

I'll fix this as well in #6