@@ -47,16 +47,16 @@ def fit(self, X, y):
47
47
"""Build a forest of trees from the training set (X, y).
48
48
49
49
Args:
50
- X:
50
+ X (bigframes.dataframe.DataFrame or bigframes.series.Series) :
51
51
Series or DataFrame of shape (n_samples, n_features). Training data.
52
52
53
- y:
53
+ y (bigframes.dataframe.DataFrame or bigframes.series.Series) :
54
54
Series or DataFrame of shape (n_samples,) or (n_samples, n_targets).
55
55
Target values. Will be cast to X's dtype if necessary.
56
56
57
57
58
58
Returns:
59
- Fitted Estimator.
59
+ ForestModel: Fitted Estimator.
60
60
"""
61
61
raise NotImplementedError (constants .ABSTRACT_METHOD_ERROR_MESSAGE )
62
62
@@ -73,12 +73,12 @@ def predict(self, X):
73
73
mean predicted regression targets of the trees in the forest.
74
74
75
75
Args:
76
- X:
76
+ X (bigframes.dataframe.DataFrame or bigframes.series.Series) :
77
77
Series or DataFrame of shape (n_samples, n_features). The data matrix for
78
78
which we want to get the predictions.
79
79
80
80
Returns:
81
- The predicted values.
81
+ bigframes.dataframe.DataFrame: The predicted values.
82
82
"""
83
83
raise NotImplementedError (constants .ABSTRACT_METHOD_ERROR_MESSAGE )
84
84
@@ -91,38 +91,38 @@ class RandomForestRegressor(ForestRegressor):
91
91
to improve the predictive accuracy and control over-fitting.
92
92
93
93
Args:
94
- num_parallel_tree: Optional[int]
94
+ num_parallel_tree ( Optional[int]):
95
95
Number of parallel trees constructed during each iteration. Default to 100. Minimum value is 2.
96
- tree_method: Optional[str]
96
+ tree_method ( Optional[str]):
97
97
Specify which tree method to use. Default to "auto". If this parameter is set to
98
98
default, XGBoost will choose the most conservative option available. Possible values: ""exact", "approx",
99
99
"hist".
100
- min_child_weight : Optional[float]
100
+ min_child_weight ( Optional[float]):
101
101
Minimum sum of instance weight(hessian) needed in a child. Default to 1.
102
- colsample_bytree : Optional[float]
102
+ colsample_bytree ( Optional[float]):
103
103
Subsample ratio of columns when constructing each tree. Default to 1.0. The value should be between 0 and 1.
104
- colsample_bylevel : Optional[float]
104
+ colsample_bylevel ( Optional[float]):
105
105
Subsample ratio of columns for each level. Default to 1.0. The value should be between 0 and 1.
106
- colsample_bynode : Optional[float]
106
+ colsample_bynode ( Optional[float]):
107
107
Subsample ratio of columns for each split. Default to 0.8. The value should be between 0 and 1.
108
- gamma : Optional[float]
108
+ gamma ( Optional[float]):
109
109
(min_split_loss) Minimum loss reduction required to make a further partition on a
110
110
leaf node of the tree. Default to 0.0.
111
- max_depth : Optional[int]
111
+ max_depth ( Optional[int]):
112
112
Maximum tree depth for base learners. Default to 15. The value should be greater than 0 and less than 1.
113
- subsample : Optional[float]
113
+ subsample ( Optional[float]:
114
114
Subsample ratio of the training instance. Default to 0.8. The value should be greater than 0 and less than 1.
115
- reg_alpha : Optional[float]
115
+ reg_alpha ( Optional[float]):
116
116
L1 regularization term on weights (xgb's alpha). Default to 0.0.
117
- reg_lambda : Optional[float]
117
+ reg_lambda ( Optional[float]):
118
118
L2 regularization term on weights (xgb's lambda). Default to 1.0.
119
- early_stop: Optional[bool]
119
+ early_stop ( Optional[bool]):
120
120
Whether training should stop after the first iteration. Default to True.
121
- min_rel_progress: Optional[float]
121
+ min_rel_progress ( Optional[float]):
122
122
Minimum relative loss improvement necessary to continue training when early_stop is set to True. Default to 0.01.
123
- enable_global_explain: Optional[bool]
123
+ enable_global_explain ( Optional[bool]):
124
124
Whether to compute global explanations using explainable AI to evaluate global feature importance to the model. Default to False.
125
- xgboost_version: Optional[str]
125
+ xgboost_version ( Optional[str]):
126
126
Specifies the Xgboost version for model training. Default to "0.9". Possible values: "0.9", "1.1".
127
127
"""
128
128
@@ -144,7 +144,7 @@ def predict(self, X):
144
144
which we want to get the predictions.
145
145
146
146
Returns:
147
- The predicted values.
147
+ bigframes.dataframe.DataFrame: The predicted values.
148
148
"""
149
149
raise NotImplementedError (constants .ABSTRACT_METHOD_ERROR_MESSAGE )
150
150
@@ -158,37 +158,37 @@ class RandomForestClassifier(ForestClassifier):
158
158
improve the predictive accuracy and control over-fitting.
159
159
160
160
Args:
161
- num_parallel_tree: Optional[int]
161
+ num_parallel_tree ( Optional[int]):
162
162
Number of parallel trees constructed during each iteration. Default to 100. Minimum value is 2.
163
- tree_method: Optional[str]
163
+ tree_method ( Optional[str]):
164
164
Specify which tree method to use. Default to "auto". If this parameter is set to
165
165
default, XGBoost will choose the most conservative option available. Possible values: ""exact", "approx",
166
166
"hist".
167
- min_child_weight : Optional[float]
167
+ min_child_weight ( Optional[float]):
168
168
Minimum sum of instance weight(hessian) needed in a child. Default to 1.
169
- colsample_bytree : Optional[float]
169
+ colsample_bytree ( Optional[float]):
170
170
Subsample ratio of columns when constructing each tree. Default to 1.0. The value should be between 0 and 1.
171
- colsample_bylevel : Optional[float]
171
+ colsample_bylevel ( Optional[float]):
172
172
Subsample ratio of columns for each level. Default to 1.0. The value should be between 0 and 1.
173
- colsample_bynode : Optional[float]
173
+ colsample_bynode ( Optional[float]):
174
174
Subsample ratio of columns for each split. Default to 0.8. The value should be between 0 and 1.
175
- gamma : Optional[float]
175
+ gamma ( Optional[float]):
176
176
(min_split_loss) Minimum loss reduction required to make a further partition on a
177
177
leaf node of the tree. Default to 0.0.
178
- max_depth : Optional[int]
178
+ max_depth ( Optional[int]):
179
179
Maximum tree depth for base learners. Default to 15. The value should be greater than 0 and less than 1.
180
- subsample : Optional[float]
180
+ subsample ( Optional[float]):
181
181
Subsample ratio of the training instance. Default to 0.8. The value should be greater than 0 and less than 1.
182
- reg_alpha : Optional[float]
182
+ reg_alpha ( Optional[float]):
183
183
L1 regularization term on weights (xgb's alpha). Default to 0.0.
184
- reg_lambda : Optional[float]
184
+ reg_lambda ( Optional[float]):
185
185
L2 regularization term on weights (xgb's lambda). Default to 1.0.
186
- early_stop: Optional[bool]
186
+ early_stop ( Optional[bool]):
187
187
Whether training should stop after the first iteration. Default to True.
188
- min_rel_progress: Optional[float]
188
+ min_rel_progress ( Optional[float]):
189
189
Minimum relative loss improvement necessary to continue training when early_stop is set to True. Default to 0.01.
190
- enable_global_explain: Optional[bool]
190
+ enable_global_explain ( Optional[bool]):
191
191
Whether to compute global explanations using explainable AI to evaluate global feature importance to the model. Default to False.
192
- xgboost_version: Optional[str]
192
+ xgboost_version ( Optional[str]):
193
193
Specifies the Xgboost version for model training. Default to "0.9". Possible values: "0.9", "1.1".ß
194
194
"""
0 commit comments