File tree 3 files changed +13
-4
lines changed 3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 6
6
import copy
7
7
import warnings
8
8
from collections import defaultdict
9
+ import platform
9
10
10
11
import numpy as np
11
12
from scipy import sparse
12
13
from .externals import six
13
14
from .utils .fixes import signature
15
+ from .utils import _IS_32BIT
14
16
from . import __version__
15
17
16
18
@@ -515,7 +517,12 @@ class MetaEstimatorMixin(object):
515
517
# this is just a tag for the moment
516
518
517
519
518
- ###############################################################################
520
+ class _UnstableArchMixin (object ):
521
+ """Mark estimators that are non-determinstic on 32bit or PowerPC"""
522
+ def _more_tags (self ):
523
+ return {'non_deterministic' : (
524
+ _IS_32BIT or platform .machine ().startswith (('ppc' , 'powerpc' )))}
525
+
519
526
520
527
def is_classifier (estimator ):
521
528
"""Returns True if the given estimator is (probably) a classifier.
Original file line number Diff line number Diff line change 1
1
from .pls_ import _PLS
2
+ from ..base import _UnstableArchMixin
2
3
3
4
__all__ = ['CCA' ]
4
5
5
6
6
- class CCA (_PLS ):
7
+ class CCA (_PLS , _UnstableArchMixin ):
7
8
"""CCA Canonical Correlation Analysis.
8
9
9
10
CCA inherits from PLS with mode="B" and deflation_mode="canonical".
Original file line number Diff line number Diff line change 9
9
from scipy .sparse import eye , csr_matrix
10
10
from scipy .sparse .linalg import eigsh
11
11
12
- from ..base import BaseEstimator , TransformerMixin
12
+ from ..base import BaseEstimator , TransformerMixin , _UnstableArchMixin
13
13
from ..utils import check_random_state , check_array
14
14
from ..utils .extmath import stable_cumsum
15
15
from ..utils .validation import check_is_fitted
@@ -518,7 +518,8 @@ def locally_linear_embedding(
518
518
tol = tol , max_iter = max_iter , random_state = random_state )
519
519
520
520
521
- class LocallyLinearEmbedding (BaseEstimator , TransformerMixin ):
521
+ class LocallyLinearEmbedding (BaseEstimator , TransformerMixin ,
522
+ _UnstableArchMixin ):
522
523
"""Locally Linear Embedding
523
524
524
525
Read more in the :ref:`User Guide <locally_linear_embedding>`.
You can’t perform that action at this time.
0 commit comments