def __init__(self, similarities, prototypes=None, **kwargs): """ Parameters ---------- similarities : list A list of similarity functions. prototypes : Dataset or list A dataset or a list of instances (e.g., streamlines)? **kwargs: All keyword arguments are passed to the ProjectionMapper constructor """ ProjectionMapper.__init__(self, **kwargs) self.similarities = similarities self.prototypes = prototypes
def __repr__(self): s = ProjectionMapper.__repr__(self).rstrip(' )') if not s[-1] == '(': s += ', ' s += "scaling=%d, reflection=%d, reduction=%d, " \ "oblique=%s, oblique_rcond=%g)" % \ (self._scaling, self._reflection, self._reduction, self._oblique, self._oblique_rcond) return s
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."""
def __init__(self, **kwargs): """Initialize the SVDMapper Parameters ---------- **kwargs: All keyword arguments are passed to the ProjectionMapper constructor. Notes ----- 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."""
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. **kwargs To be passed to ProjectionMapper """ 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"""