Public Member Functions | |
| DefectPCA (const DefectixOptions::Options &options) | |
| Standard constructor. | |
| void | computePCA (gsl_matrix *m, const int nb_pc) |
| Compute Principal Components Analysis. | |
| void | computePCA (gsl_matrix *m, const int nb_pc, gsl_matrix *evec) |
| Compute Principal Components Analysis. | |
| void | writeRebuilt (const gsl_matrix_view &evecv, gsl_matrix *m, long axis[2]) |
| deprecated and unefficient | |
| const gsl_matrix *const | getEigenVectors () const |
| Get the KL-Base. | |
| const gsl_vector *const | getEigenValues () const |
| Get eigen values. | |
| const gsl_matrix *const | getPrincipalComponents () const |
| Get principal components. | |
Protected Attributes | |
| int | _blocSize |
| Size of the blocks to create. | |
| int | _zoomStep |
| Unused for now. | |
| gsl_matrix * | _pc |
| Principal components. | |
| gsl_matrix * | _evec |
| Eigen vectors of the covariance matrix (KL-Base). | |
| gsl_vector * | _eval |
| Eigen values of the covariance matrix. | |
| bool | _printEvec |
| Ask to save KL-Base. | |
| bool | _printRebuilt |
| Useless. | |
Private Member Functions | |
| void | setEigenVectors (const gsl_matrix *const m) |
| allocate eigen vectors and eigen values | |
| errorCodes | eigenVectors (const gsl_matrix *const const_m) |
| compute eigen vectors and values | |
| void | writeEigenVectors (gsl_matrix *evec) |
| Write the KL-Base into files. | |
| void | printMessage (const char *msg) const |
| Print a message on the standard output. | |
The PCA is computed to reduce create input vectors for neural networks.
|
|
Standard constructor. The constructor initialises private members with 'options' values.
|
|
||||||||||||||||
|
Compute Principal Components Analysis. The function computes a PCA on the given matrix and tranform m with the first components of the precalculated KL-Base
|
|
||||||||||||
|
Compute Principal Components Analysis. The function computes a PCA on the given matrix and tranform m with the first components of the obtained KL-Base
|
|
|
compute eigen vectors and values The function computes the eigen vectors and values of the covariance matrix of the given matrix. Eigen vectors are then sorted by ascending eigen values.
|
|
|
Get eigen values. The function returns a pointer to the current eigen values |
|
|
Get the KL-Base. The function returns a pointer to the current KL-Base |
|
|
Get principal components. The function returns a pointer to the current principal components. The principal components are the result of the projection of the image on the KL-Base. |
|
|
Print a message on the standard output.
|
|
|
allocate eigen vectors and eigen values The function checks eigen vectors and values dimensions. The functions frees and/or allocates them if needed.
|
|
|
Write the KL-Base into files. The function writes the gsl_matrix into a file and also write each principal component into a FITS file
|
|
|
Size of the blocks to create. _blocSize defines the size of the blocks used for PCA, training and computing. Blocks contains _blocSize x _blocSize pixels. |
|
|
Eigen values of the covariance matrix. The eigen values computed by eigenVectors() are stored in this vector |
|
|
Eigen vectors of the covariance matrix (KL-Base). The eigen vectors computed by eigenVectors() are stored in this matrix |
|
|
Principal components. The principal components computed by computePCA() are stored in this matrix. |
|
|
Ask to save KL-Base. If _printEvec is true, the KL-Base is written by function writeEigenVectors() |
1.3.5