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