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