Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
LDA Class Reference
[Operations on arrays]
Linear Discriminant Analysis. More...
#include <core.hpp>
Public Member Functions | |
| LDA (int num_components=0) | |
| constructor Initializes a LDA with num_components (default 0). | |
| LDA (InputArrayOfArrays src, InputArray labels, int num_components=0) | |
| Initializes and performs a Discriminant Analysis with Fisher's Optimization Criterion on given data in src and corresponding labels in labels. | |
| void | save (const String &filename) const |
| Serializes this object to a given filename. | |
| void | load (const String &filename) |
| Deserializes this object from a given filename. | |
| void | save (FileStorage &fs) const |
| Serializes this object to a given cv::FileStorage. | |
| void | load (const FileStorage &node) |
| Deserializes this object from a given cv::FileStorage. | |
| ~LDA () | |
| destructor | |
| void | compute (InputArrayOfArrays src, InputArray labels) |
| Compute the discriminants for data in src (row aligned) and labels. | |
| Mat | project (InputArray src) |
| Projects samples into the LDA subspace. | |
| Mat | reconstruct (InputArray src) |
| Reconstructs projections from the LDA subspace. | |
| Mat | eigenvectors () const |
| Returns the eigenvectors of this LDA. | |
| Mat | eigenvalues () const |
| Returns the eigenvalues of this LDA. | |
Detailed Description
Linear Discriminant Analysis.
Definition at line 2422 of file core.hpp.
Constructor & Destructor Documentation
| LDA | ( | int | num_components = 0 ) |
[explicit] |
constructor Initializes a LDA with num_components (default 0).
| LDA | ( | InputArrayOfArrays | src, |
| InputArray | labels, | ||
| int | num_components = 0 |
||
| ) |
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.
| ~LDA | ( | ) |
destructor
Member Function Documentation
| void compute | ( | InputArrayOfArrays | src, |
| InputArray | labels | ||
| ) |
Compute the discriminants for data in src (row aligned) and labels.
| Mat eigenvalues | ( | ) | const |
| Mat eigenvectors | ( | ) | const |
| void load | ( | const String & | filename ) |
Deserializes this object from a given filename.
| void load | ( | const FileStorage & | node ) |
Deserializes this object from a given cv::FileStorage.
| Mat project | ( | InputArray | src ) |
Projects samples into the LDA subspace.
src may be one or more row aligned samples.
| Mat reconstruct | ( | InputArray | src ) |
Reconstructs projections from the LDA subspace.
src may be one or more row aligned projections.
| void save | ( | FileStorage & | fs ) | const |
Serializes this object to a given cv::FileStorage.
| void save | ( | const String & | filename ) | const |
Serializes this object to a given filename.
Generated on Tue Jul 12 2022 16:42:43 by
1.7.2