splearn/feature_extraction/dict_vectorizer.py
def transform(self, Z):
        """Transform ArrayRDD's (or DictRDD's 'X' column's) feature->value dicts
        to array or sparse matrix.
        Named features not encountered during fit or fit_transform will be
        silently ignored.

        Parameters
        ----------
        Z : ArrayRDD or DictRDD with column 'X' containing Mapping or
            iterable over Mappings, length = n_samples
            Dict(s) or Mapping(s) from feature names (arbitrary Python
            objects) to feature values (strings or convertible to dtype).

        Returns
        -------
        Z : transformed, containing {array, sparse matrix}
            Feature vectors; always 2-d.
        """
        mapper = self.broadcast(super(SparkDictVectorizer, self).transform,
                                Z.context)
        dtype = sp.spmatrix if self.sparse else np.ndarray
        return Z.transform(mapper, column='X', dtype=dtype)
def transform(self, Z):
        """Transform ArrayRDD's (or DictRDD's 'X' column's) feature->value dicts
        to array or sparse matrix.
        Named features not encountered during fit or fit_transform will be
        silently ignored.

        Parameters
        ----------
        Z : ArrayRDD or DictRDD with column 'X' containing Mapping or
            iterable over Mappings, length = n_samples
            Dict(s) or Mapping(s) from feature names (arbitrary Python
            objects) to feature values (strings or convertible to dtype).

        Returns
        -------
        Z : transformed, containing {array, sparse matrix}
            Feature vectors; always 2-d.
        """
        mapper = self.broadcast(super(SparkDictVectorizer, self).transform,
                                Z.context)
        dtype = sp.spmatrix if self.sparse else np.ndarray
        return Z.transform(mapper, column='X', dtype=dtype)
def transform ( self , Z ) : mapper = self . broadcast ( super ( SparkDictVectorizer , self ) . transform , Z . context ) dtype = sp . spmatrix if self . sparse else np . ndarray return Z . transform ( mapper , column = 'X' , dtype = dtype )
Transform ArrayRDD's (or DictRDD's 'X' column's) feature->value dicts
        to array or sparse matrix.
        Named features not encountered during fit or fit_transform will be
        silently ignored.

        Parameters
        ----------
        Z : ArrayRDD or DictRDD with column 'X' containing Mapping or
            iterable over Mappings, length = n_samples
            Dict(s) or Mapping(s) from feature names (arbitrary Python
            objects) to feature values (strings or convertible to dtype).

        Returns
        -------
        Z : transformed, containing {array, sparse matrix}
            Feature vectors; always 2-d.
Transform ArrayRDD s ( or DictRDD s X column s ) feature - > value dicts to array or sparse matrix . Named features not encountered during fit or fit_transform will be silently ignored .