14 #ifndef MLPACK_METHODS_KERNEL_PCA_KERNEL_PCA_HPP 15 #define MLPACK_METHODS_KERNEL_PCA_KERNEL_PCA_HPP 38 typename KernelRule = NaiveKernelRule<KernelType>
52 KernelPCA(
const KernelType kernel = KernelType(),
53 const bool centerTransformedData =
false);
65 arma::mat& transformedData,
68 const size_t newDimension);
78 void Apply(
const arma::mat& data,
79 arma::mat& transformedData,
90 void Apply(
const arma::mat& data,
91 arma::mat& transformedData,
107 void Apply(arma::mat& data,
const size_t newDimension);
110 const KernelType&
Kernel()
const {
return kernel; }
124 bool centerTransformedData;
133 #endif // MLPACK_METHODS_KERNEL_PCA_KERNEL_PCA_HPP
KernelPCA(const KernelType kernel=KernelType(), const bool centerTransformedData=false)
Construct the KernelPCA object, optionally passing a kernel.
Definition: kernel_pca_impl.hpp:24
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
bool & CenterTransformedData()
Return whether or not the transformed data is centered.
Definition: kernel_pca.hpp:117
The core includes that mlpack expects; standard C++ includes and Armadillo.
void Apply(const arma::mat &data, arma::mat &transformedData, arma::vec &eigval, arma::mat &eigvec, const size_t newDimension)
Apply Kernel Principal Components Analysis to the provided data set.
Definition: kernel_pca_impl.hpp:32
KernelType & Kernel()
Modify the kernel.
Definition: kernel_pca.hpp:112
const KernelType & Kernel() const
Get the kernel.
Definition: kernel_pca.hpp:110
bool CenterTransformedData() const
Return whether or not the transformed data is centered.
Definition: kernel_pca.hpp:115
This class performs kernel principal components analysis (Kernel PCA), for a given kernel...
Definition: kernel_pca.hpp:40