Ejemplo n.º 1
0
 def selectOut(self, outIds):
     """Choose a subset of SVD components (and remove all others)."""
     # handle ElementSelector operating on SV (base class has no idea about)
     # XXX think about more generic interface, where some 'measure' is assigned
     # per each projection dimension, like in _sv in case of SVD.
     # May be selector could be parametrized with an instance + attribute as literal
     # so later on it could extract necessary values?
     if isinstance(self._selector, ElementSelector):
         ProjectionMapper.selectOut(self, self._selector(self._sv))
     else:
         ProjectionMapper.selectOut(self, outIds)