Skip to content

Commit

Permalink
Merge 297fbe6 into 98fe01f
Browse files Browse the repository at this point in the history
  • Loading branch information
rasbt committed Oct 11, 2019
2 parents 98fe01f + 297fbe6 commit 1c3c024
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/sources/CHANGELOG.md
Expand Up @@ -29,7 +29,7 @@ The CHANGELOG for the current development version is available at
- `fpmax` returns an empty data frame now instead of raising an error if the frequent itemset set is empty. ([#573](https://github.com/rasbt/mlxtend/pull/573) via [Steve Harenberg](https://github.com/harenbergsd))
- Fixes and issue in `mlxtend.plotting.plot_confusion_matrix`, where the font-color choice for medium-dark cells was not ideal and hard to read. [#588](https://github.com/rasbt/mlxtend/pull/588) via [sohrabtowfighi](https://github.com/sohrabtowfighi))
- The `svd` mode of `mlxtend.feature_extraction.PrincipalComponentAnalysis` now also *n-1* degrees of freedom instead of *n* d.o.f. when computing the eigenvalues to match the behavior of `eigen`. [#595](https://github.com/rasbt/mlxtend/pull/595)

- Disable input validation for `StackingCVClassifier` because it causes issues if pipelines are used as input. [#606](https://github.com/rasbt/mlxtend/pull/606)



Expand Down
9 changes: 6 additions & 3 deletions mlxtend/classifier/stacking_cv_classification.py
Expand Up @@ -19,7 +19,7 @@
from sklearn.base import clone
from sklearn.model_selection import cross_val_predict
from sklearn.model_selection._split import check_cv
from sklearn.utils import check_X_y
# from sklearn.utils import check_X_y


class StackingCVClassifier(_BaseXComposition, ClassifierMixin,
Expand Down Expand Up @@ -207,8 +207,11 @@ def fit(self, X, y, groups=None, sample_weight=None):
final_cv.shuffle = self.shuffle
final_cv.random_state = self.random_state

# Input validation.
X, y = check_X_y(X, y, accept_sparse=['csc', 'csr'], dtype=None)
# Disable global input validation, because it causes issue when
# pipelines are used that perform preprocessing on X. I.e., X may
# not be directly passed to the classifiers, which is why this code
# would raise unecessary errors at this point.
# X, y = check_X_y(X, y, accept_sparse=['csc', 'csr'], dtype=None)

if sample_weight is None:
fit_params = None
Expand Down

0 comments on commit 1c3c024

Please sign in to comment.