Exemple #1
0
    def __init__(self, scaling=True, reflection=True, reduction=True,
                 oblique=False, oblique_rcond=-1, **kwargs):
        """Initialize the ProcrusteanMapper

        :Parameters:
          scaling: bool
            Scale data for the transformation (no longer rigid body
            transformation)
          reflection: bool
            Allow for the data to be reflected (so it might not be a rotation).
            Effective only for non-oblique transformations
          reduction: bool
            If true, it is allowed to map into lower-dimensional
            space. Forward transformation might be suboptimal then and reverse
            transformation might not recover all original variance
          oblique: bool
            Either to allow non-orthogonal transformation -- might heavily overfit
            the data if there is less samples than dimensions. Use `oblique_rcond`.
          oblique_rcond: float
            Cutoff for 'small' singular values to regularize the inverse. See
            :class:`~numpy.linalg.lstsq` for more information.
        """
        ProjectionMapper.__init__(self, **kwargs)

        self._scaling = scaling
        """Either to determine the scaling factor"""

        self._reduction = reduction
        self._reflection = reflection
        self._oblique = oblique
        self._oblique_rcond = oblique_rcond
        self._scale = None
        """Estimated scale"""
Exemple #2
0
    def __init__(self,
                 baselinelabels=None,
                 **kwargs):
        """Initialize ZScoreMapper

        :Parameters:
          baselinelabels : None or list of int or string
            Used to compute mean and variance
            TODO: not in effect now and need to be adherent to all
            `ProjectionMapper`s
        """

        ProjectionMapper.__init__(self, **kwargs)
        if baselinelabels is not None:
            raise NotImplementedError, "Support for baseline labels " \
                  "is not yet implemented in ZScoreMapper"
        self.baselinelabels = baselinelabels
Exemple #3
0
    def __init__(self, **kwargs):
        """Initialize the SVDMapper

        :Parameters:
          **kwargs:
            All keyword arguments are passed to the ProjectionMapper
            constructor.

            Note, that for the 'selector' argument this class also supports
            passing a `ElementSelector` instance, which will be used to
            determine the to be selected features, based on the singular
            values of each component.
        """
        ProjectionMapper.__init__(self, **kwargs)

        self._sv = None
        """Singular values of the training matrix."""
Exemple #4
0
    def __init__(self, transpose=False, **kwargs):
        ProjectionMapper.__init__(self, **kwargs)

        self._var = None
Exemple #5
0
    def __init__(self, algorithm='cubica', transpose=False, **kwargs):
        ProjectionMapper.__init__(self, **kwargs)

        self._algorithm = algorithm
        self._transpose = transpose