Struct rustlearn::feature_extraction::dict_vectorizer::DictVectorizer [] [src]

pub struct DictVectorizer {
    // some fields omitted
}

Methods

impl DictVectorizer
[src]

fn new() -> DictVectorizer

Create a new DictVectorizer.

fn partial_fit(&mut self, row: usize, name: &str, value: f32)

Set the feature value of a named feature in a given row.

fn transform(&self) -> SparseRowArray

Transform the accumulated data into a sparse array.

fn dictionary(&self) -> &HashMap<String(usize, usize)>

Return a reference to the feature dictionary, mapping feature names to their (column index, occurrence count).

Trait Implementations

impl Default for DictVectorizer
[src]

fn default() -> DictVectorizer

Returns the "default value" for a type. Read more

impl Decodable for DictVectorizer
[src]

fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<DictVectorizer, __D::Error>

impl Encodable for DictVectorizer
[src]

fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>