def feature_subset ( self , indices ) : if isinstance ( indices , np . ndarray ) : indices = indices . tolist ( ) if not isinstance ( indices , list ) : raise ValueError ( 'Can only index with lists' ) return [ self . features_ [ i ] for i in indices ]
how to select subset of features from a dataset + python
Returns some subset of the features . Parameters ---------- indices : : obj : list of : obj : int indices of the features in the list
def feature_subset(self, indices):
        """ Returns some subset of the features.
        
        Parameters
        ----------
        indices : :obj:`list` of :obj:`int`
            indices of the features in the list

        Returns
        -------
        :obj:`list` of :obj:`Feature`
        """
        if isinstance(indices, np.ndarray):
            indices = indices.tolist()
        if not isinstance(indices, list):
            raise ValueError('Can only index with lists')
        return [self.features_[i] for i in indices]