Struct tangram_features::normalized::NormalizedFeatureGroup[][src]

pub struct NormalizedFeatureGroup {
    pub source_column_name: String,
    pub mean: f32,
    pub variance: f32,
}
Expand description

A NormalizedFeatureGroup transforms a number column to zero mean and unit variance. [Learn more](https://en.wikipedia.org/wiki/Feature_scaling#Standardization_(Z-score_Normalization).

Example

use tangram_table::prelude::*;

NumberTableColumn::new(
  Some("values".to_owned()),
  vec![0.0, 5.2, 1.3, 10.0],
);

Mean: 2.16667

Standard Deviation: 2.70617

feature_value = (value - mean) / std

input valuefeature value
0.0(0.0 - 2.16667) / 2.70617 = -0.80064
5.2(5.2 - 2.16667) / 2.70617 = 1.12089
1.3(1.3 - 2.16667) / 2.70617 = -0.32026

Fields

source_column_name: Stringmean: f32variance: f32

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.