pub struct LDA { /* private fields */ }
Expand description
Linear Discriminant Analysis @todo document this class
Implementations§
source§impl LDA
impl LDA
sourcepub fn new(num_components: i32) -> Result<LDA>
pub fn new(num_components: i32) -> Result<LDA>
constructor Initializes a LDA with num_components (default 0).
§C++ default parameters
- num_components: 0
sourcepub fn new_def() -> Result<LDA>
pub fn new_def() -> Result<LDA>
constructor Initializes a LDA with num_components (default 0).
§Note
This alternative version of [new] function uses the following default values for its arguments:
- num_components: 0
sourcepub fn new_with_data(
src: &impl ToInputArray,
labels: &impl ToInputArray,
num_components: i32
) -> Result<LDA>
pub fn new_with_data( src: &impl ToInputArray, labels: &impl ToInputArray, num_components: i32 ) -> Result<LDA>
Initializes and performs a Discriminant Analysis with Fisher’s Optimization Criterion on given data in src and corresponding labels in labels. If 0 (or less) number of components are given, they are automatically determined for given data in computation.
§C++ default parameters
- num_components: 0
sourcepub fn new_with_data_def(
src: &impl ToInputArray,
labels: &impl ToInputArray
) -> Result<LDA>
pub fn new_with_data_def( src: &impl ToInputArray, labels: &impl ToInputArray ) -> Result<LDA>
Initializes and performs a Discriminant Analysis with Fisher’s Optimization Criterion on given data in src and corresponding labels in labels. If 0 (or less) number of components are given, they are automatically determined for given data in computation.
§Note
This alternative version of [new_with_data] function uses the following default values for its arguments:
- num_components: 0