File tree 1 file changed +24
-0
lines changed
Filter options
1 file changed +24
-0
lines changed
Original file line number Diff line number Diff line change @@ -973,6 +973,30 @@ def transform(self, X):
973
973
"""
974
974
return self ._transform (X )
975
975
976
+ def fit_transform (self , X , y , sample_weight = None ):
977
+ """Fit the estimators and return the predictions for X for each estimator.
978
+
979
+ Parameters
980
+ ----------
981
+ X : {array-like, sparse matrix} of shape (n_samples, n_features)
982
+ Training vectors, where `n_samples` is the number of samples and
983
+ `n_features` is the number of features.
984
+
985
+ y : array-like of shape (n_samples,)
986
+ Target values.
987
+
988
+ sample_weight : array-like of shape (n_samples,), default=None
989
+ Sample weights. If None, then samples are equally weighted.
990
+ Note that this is supported only if all underlying estimators
991
+ support sample weights.
992
+
993
+ Returns
994
+ -------
995
+ y_preds : ndarray of shape (n_samples, n_estimators)
996
+ Prediction outputs for each estimator.
997
+ """
998
+ return super ().fit_transform (X , y , sample_weight = sample_weight )
999
+
976
1000
def _sk_visual_block_ (self ):
977
1001
# If final_estimator's default changes then this should be
978
1002
# updated.
You can’t perform that action at this time.
0 commit comments