@@ -36,10 +36,10 @@ class calls the ``fit`` method of each sub-estimator on random samples
36
36
# SPDX-License-Identifier: BSD-3-Clause
37
37
38
38
39
- from time import time
40
39
import threading
41
40
from abc import ABCMeta , abstractmethod
42
41
from numbers import Integral , Real
42
+ from time import time
43
43
from warnings import catch_warnings , simplefilter , warn
44
44
45
45
import numpy as np
@@ -54,22 +54,20 @@ class calls the ``fit`` method of each sub-estimator on random samples
54
54
_fit_context ,
55
55
is_classifier ,
56
56
)
57
+ from sklearn .ensemble ._base import BaseEnsemble , _partition_estimators
58
+ from sklearn .ensemble ._hist_gradient_boosting .binning import _BinMapper
57
59
from sklearn .exceptions import DataConversionWarning
58
60
from sklearn .metrics import accuracy_score , r2_score
59
61
from sklearn .preprocessing import OneHotEncoder
60
- from ..tree import (
61
- BaseDecisionTree ,
62
- DecisionTreeClassifier ,
63
- DecisionTreeRegressor ,
64
- ExtraTreeClassifier ,
65
- ExtraTreeRegressor ,
66
- )
67
- from ..tree ._tree import DOUBLE , DTYPE
68
62
from sklearn .utils import check_random_state , compute_sample_weight
69
63
from sklearn .utils ._openmp_helpers import _openmp_effective_n_threads
70
64
from sklearn .utils ._param_validation import Interval , RealNotInt , StrOptions
71
65
from sklearn .utils ._tags import get_tags
72
- from sklearn .utils .multiclass import check_classification_targets , type_of_target
66
+ from sklearn .utils .multiclass import (
67
+ _check_partial_fit_first_call ,
68
+ check_classification_targets ,
69
+ type_of_target ,
70
+ )
73
71
from sklearn .utils .parallel import Parallel , delayed
74
72
from sklearn .utils .validation import (
75
73
_check_feature_names_in ,
@@ -78,9 +76,15 @@ class calls the ``fit`` method of each sub-estimator on random samples
78
76
check_is_fitted ,
79
77
validate_data ,
80
78
)
81
- from sklearn .ensemble ._hist_gradient_boosting .binning import _BinMapper
82
- from ._base import BaseEnsemble , _partition_estimators
83
79
80
+ from ..tree import (
81
+ BaseDecisionTree ,
82
+ DecisionTreeClassifier ,
83
+ DecisionTreeRegressor ,
84
+ ExtraTreeClassifier ,
85
+ ExtraTreeRegressor ,
86
+ )
87
+ from ..tree ._tree import DOUBLE , DTYPE
84
88
85
89
__all__ = [
86
90
"RandomForestClassifier" ,
0 commit comments