14#ifndef MLPACK_METHODS_KERNEL_PCA_KERNEL_PCA_HPP
15#define MLPACK_METHODS_KERNEL_PCA_KERNEL_PCA_HPP
53 const bool centerTransformedData =
false);
64 void Apply(
const arma::mat& data,
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;
131#include "kernel_pca_impl.hpp"
This class performs kernel principal components analysis (Kernel PCA), for a given kernel.
KernelType & Kernel()
Modify the kernel.
bool & CenterTransformedData()
Return whether or not the transformed data is centered.
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.
const KernelType & Kernel() const
Get the kernel.
bool CenterTransformedData() const
Return whether or not the transformed data is centered.
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.
KernelPCA(const KernelType kernel=KernelType(), const bool centerTransformedData=false)
Construct the KernelPCA object, optionally passing a kernel.
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.
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.