MLPACK
1.0.4
|
Public Member Functions | |
KernelPCA (const KernelType kernel=KernelType(), const bool scaleData=false) | |
void | Apply (const arma::mat &data, arma::mat &transformedData, arma::vec &eigVal, arma::mat &coeff) |
Apply Kernel Principal Component Analysis to the provided data set. | |
void | Apply (const arma::mat &data, arma::mat &transformedData, arma::vec &eigVal) |
Apply Kernel Principal Component Analysis to the provided data set. | |
void | Apply (arma::mat &data, const size_t newDimension) |
Apply Dimensionality Reduction using Kernel Principal Component Analysis to the provided data set. | |
const KernelType & | Kernel () const |
Get the kernel. | |
KernelType & | Kernel () |
Modify the kernel. | |
bool | ScaleData () const |
Return whether or not this KernelPCA object will scale (by standard deviation) the data when kernel PCA is performed. | |
bool & | ScaleData () |
Modify whether or not this KernelPCA object will scale (by standard deviation) the data when kernel PCA is performed. | |
Private Attributes | |
KernelType | kernel |
The instantiated kernel. | |
bool | scaleData |
If true, the data will be scaled (by standard deviation) when Apply() is run. |
Definition at line 33 of file kernel_pca.hpp.
mlpack::kpca::KernelPCA< KernelType >::KernelPCA | ( | const KernelType | kernel = KernelType() , |
const bool | scaleData = false |
||
) |
void mlpack::kpca::KernelPCA< KernelType >::Apply | ( | const arma::mat & | data, |
arma::mat & | transformedData, | ||
arma::vec & | eigVal, | ||
arma::mat & | coeff | ||
) |
Apply Kernel Principal Component Analysis to the provided data set.
data | - Data matrix |
transformedData | - Data with PCA applied |
eigVal | - contains eigen values in a column vector |
coeff | - PCA Loadings/Coeffs/EigenVectors |
void mlpack::kpca::KernelPCA< KernelType >::Apply | ( | const arma::mat & | data, |
arma::mat & | transformedData, | ||
arma::vec & | eigVal | ||
) |
Apply Kernel Principal Component Analysis to the provided data set.
data | - Data matrix |
transformedData | - Data with PCA applied |
eigVal | - contains eigen values in a column vector |
void mlpack::kpca::KernelPCA< KernelType >::Apply | ( | arma::mat & | data, |
const size_t | newDimension | ||
) |
Apply Dimensionality Reduction using Kernel Principal Component Analysis to the provided data set.
data | - M x N Data matrix |
newDimension | - matrix consisting of N column vectors, where each vector is the projection of the corresponding data vector from data matrix onto the basis vectors contained in the columns of coeff/eigen vector matrix with only newDimension number of columns chosen. |
const KernelType& mlpack::kpca::KernelPCA< KernelType >::Kernel | ( | ) | const [inline] |
Get the kernel.
Definition at line 76 of file kernel_pca.hpp.
References mlpack::kpca::KernelPCA< KernelType >::kernel.
KernelType& mlpack::kpca::KernelPCA< KernelType >::Kernel | ( | ) | [inline] |
Modify the kernel.
Definition at line 78 of file kernel_pca.hpp.
References mlpack::kpca::KernelPCA< KernelType >::kernel.
bool mlpack::kpca::KernelPCA< KernelType >::ScaleData | ( | ) | const [inline] |
Return whether or not this KernelPCA object will scale (by standard deviation) the data when kernel PCA is performed.
Definition at line 82 of file kernel_pca.hpp.
References mlpack::kpca::KernelPCA< KernelType >::scaleData.
bool& mlpack::kpca::KernelPCA< KernelType >::ScaleData | ( | ) | [inline] |
Modify whether or not this KernelPCA object will scale (by standard deviation) the data when kernel PCA is performed.
Definition at line 85 of file kernel_pca.hpp.
References mlpack::kpca::KernelPCA< KernelType >::scaleData.
KernelType mlpack::kpca::KernelPCA< KernelType >::kernel [private] |
The instantiated kernel.
Definition at line 89 of file kernel_pca.hpp.
Referenced by mlpack::kpca::KernelPCA< KernelType >::Kernel().
bool mlpack::kpca::KernelPCA< KernelType >::scaleData [private] |
If true, the data will be scaled (by standard deviation) when Apply() is run.
Definition at line 92 of file kernel_pca.hpp.
Referenced by mlpack::kpca::KernelPCA< KernelType >::ScaleData().