mlpack
3.1.1
src
mlpack
methods
nystroem_method
nystroem_method.hpp
Go to the documentation of this file.
1
15
#ifndef MLPACK_METHODS_NYSTROEM_METHOD_NYSTROEM_METHOD_HPP
16
#define MLPACK_METHODS_NYSTROEM_METHOD_NYSTROEM_METHOD_HPP
17
18
#include <
mlpack/prereqs.hpp
>
19
#include "
kmeans_selection.hpp
"
20
21
namespace
mlpack
{
22
namespace
kernel {
23
24
template
<
25
typename
KernelType,
26
typename
PointSelectionPolicy = KMeansSelection<>
27
>
28
class
NystroemMethod
29
{
30
public
:
39
NystroemMethod
(
const
arma::mat& data, KernelType& kernel,
const
size_t
rank);
40
47
void
Apply
(arma::mat& output);
48
56
void
GetKernelMatrix
(
const
arma::mat* data,
57
arma::mat& miniKernel,
58
arma::mat& semiKernel);
59
67
void
GetKernelMatrix
(
const
arma::Col<size_t>& selectedPoints,
68
arma::mat& miniKernel,
69
arma::mat& semiKernel);
70
71
private
:
73
const
arma::mat& data;
75
KernelType& kernel;
77
const
size_t
rank;
78
};
79
80
}
// namespace kernel
81
}
// namespace mlpack
82
83
// Include implementation.
84
#include "nystroem_method_impl.hpp"
85
86
#endif
mlpack::kernel::NystroemMethod::GetKernelMatrix
void GetKernelMatrix(const arma::mat *data, arma::mat &miniKernel, arma::mat &semiKernel)
Construct the kernel matrix with matrix that contains the selected points.
prereqs.hpp
mlpack
@serialization.hpp
Definition:
add_to_po.hpp:21
mlpack::kernel::NystroemMethod
Definition:
nystroem_method.hpp:28
kmeans_selection.hpp
mlpack::kernel::NystroemMethod::Apply
void Apply(arma::mat &output)
Apply the low-rank factorization to obtain an output matrix G such that K' = G * G^T.
mlpack::kernel::NystroemMethod::NystroemMethod
NystroemMethod(const arma::mat &data, KernelType &kernel, const size_t rank)
Create the NystroemMethod object.
Generated by
1.8.17