23 #ifndef __MLPACK_METHODS_KERNEL_PCA_KERNEL_PCA_HPP
24 #define __MLPACK_METHODS_KERNEL_PCA_KERNEL_PCA_HPP
45 template <
typename KernelType>
68 void Apply(
const arma::mat& data,
69 arma::mat& transformedData,
80 void Apply(
const arma::mat& data,
81 arma::mat& transformedData,
97 void Apply(arma::mat& data,
const size_t newDimension);
130 #include "kernel_pca_impl.hpp"
132 #endif // __MLPACK_METHODS_KERNEL_PCA_KERNEL_PCA_HPP
void Apply(const arma::mat &data, arma::mat &transformedData, arma::vec &eigval, arma::mat &eigvec)
Apply Kernel Principal Components Analysis to the provided data set.
void GetKernelMatrix(const arma::mat &data, arma::mat &kernelMatrix)
Construct the kernel matrix.
const KernelType & Kernel() const
Get the kernel.
KernelPCA(const KernelType kernel=KernelType(), const bool centerTransformedData=false)
Construct the KernelPCA object, optionally passing a kernel.
bool & CenterTransformedData()
Return whether or not the transformed data is centered.
KernelType & Kernel()
Modify the kernel.
bool centerTransformedData
If true, the data will be scaled (by standard deviation) when Apply() is run.
KernelType kernel
The instantiated kernel.
This class performs kernel principal components analysis (Kernel PCA), for a given kernel...
bool CenterTransformedData() const
Return whether or not the transformed data is centered.