a3a539ed60af074ea3459835c788c2e900f3d8c1,mlxtend/classifier/stacking_cv_classification.py,StackingCVClassifier,predict_meta_features,#StackingCVClassifier#Any#,335
Before Change
for model in self.clfs_:
if not self.use_probas:
single_model_prediction = model.predict(X)
single_model_prediction = single_model_prediction\
.reshape(single_model_prediction.shape[0], 1)
else:
single_model_prediction = model.predict_proba(X)
all_model_predictions = np.hstack((all_model_predictions.
astype(single_model_prediction
.dtype),
single_model_prediction))
return all_model_predictions
def predict(self, X):
Predict target values for X.
After Change
check_is_fitted(self, ["clfs_", "meta_clf_"])
per_model_preds = []
for model in self.clfs_:
if not self.use_probas:
prediction = model.predict(X)[:, np.newaxis]
else:
prediction = model.predict_proba(X)
per_model_preds.append(prediction)
return np.hstack(per_model_preds)
def _stack_first_level_features(self, X, meta_features):
if sparse.issparse(X):
stack_fn = sparse.hstack
In pattern: SUPERPATTERN
Frequency: 6
Non-data size: 7
Instances
Project Name: rasbt/mlxtend
Commit Name: a3a539ed60af074ea3459835c788c2e900f3d8c1
Time: 2019-03-31
Author: ackerleytng@gmail.com
File Name: mlxtend/classifier/stacking_cv_classification.py
Class Name: StackingCVClassifier
Method Name: predict_meta_features
Project Name: scipy/scipy
Commit Name: fa4eced4d1fa090364b654543e0fb1622b703e79
Time: 2016-04-25
Author: nikolay.mayorov@zoho.com
File Name: scipy/integrate/_bvp.py
Class Name:
Method Name: modify_mesh
Project Name: scikit-learn/scikit-learn
Commit Name: 332759f41664989156b7a2994e8c21ebc9e7f798
Time: 2019-10-28
Author: g.lemaitre58@gmail.com
File Name: sklearn/impute/_iterative.py
Class Name: IterativeImputer
Method Name: transform
Project Name: scikit-learn/scikit-learn
Commit Name: 332759f41664989156b7a2994e8c21ebc9e7f798
Time: 2019-10-28
Author: g.lemaitre58@gmail.com
File Name: sklearn/impute/_iterative.py
Class Name: IterativeImputer
Method Name: fit_transform
Project Name: jeongyoonlee/Kaggler
Commit Name: 660d487863cec6e26cdb0184f63a189297577546
Time: 2015-10-11
Author: jeong.@conversionlogic.com
File Name: kaggler/preprocessing/data.py
Class Name: OneHotEncoder
Method Name: fit_transform
Project Name: automl/auto-sklearn
Commit Name: 1ec4287799a1ccfc019f564f3ce0de468de6e313
Time: 2015-04-09
Author: springj@informatik.uni-freiburg.de
File Name: ParamSklearn/implementations/ProjLogit.py
Class Name: ProjLogit
Method Name: predict