MLPACK  1.0.4
Public Member Functions | Private Attributes
mlpack::kpca::KernelPCA< KernelType > Class Template Reference

List of all members.

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.

Detailed Description

template<typename KernelType>
class mlpack::kpca::KernelPCA< KernelType >

Definition at line 33 of file kernel_pca.hpp.


Constructor & Destructor Documentation

template<typename KernelType >
mlpack::kpca::KernelPCA< KernelType >::KernelPCA ( const KernelType  kernel = KernelType(),
const bool  scaleData = false 
)

Member Function Documentation

template<typename KernelType >
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.

Parameters:
data- Data matrix
transformedData- Data with PCA applied
eigVal- contains eigen values in a column vector
coeff- PCA Loadings/Coeffs/EigenVectors
template<typename KernelType >
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.

Parameters:
data- Data matrix
transformedData- Data with PCA applied
eigVal- contains eigen values in a column vector
template<typename KernelType >
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.

Parameters:
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.
template<typename KernelType >
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.

template<typename KernelType >
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.

template<typename KernelType >
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.

template<typename KernelType >
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.


Member Data Documentation

template<typename KernelType >
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().

template<typename KernelType >
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().


The documentation for this class was generated from the following file: