nk
1.0.0
C++ Numerical Computing Runtime
Toggle main menu visibility
Loading...
Searching...
No Matches
pca.hpp
Go to the documentation of this file.
1
3
// toolboxes/stats/include/nk/stats/dim/pca.hpp
4
//
5
// Principal Component Analysis.
6
7
#pragma once
8
9
#include <memory_resource>
10
#include <nk/value/value.hpp>
11
12
#include <tuple>
13
14
namespace
nk::stats {
15
18
19
36
std::tuple<Value, Value, Value, Value, Value, Value>
37
pca
(
const
Value
&X, std::pmr::memory_resource *mr =
nullptr
);
38
48
std::tuple<Value, Value, Value>
49
pcacov
(
const
Value
&C, std::pmr::memory_resource *mr =
nullptr
);
50
61
Value
pcares
(
const
Value
&X,
int
ndim,
62
std::pmr::memory_resource *mr =
nullptr
);
63
64
66
}
// namespace nk::stats
nk::Value
Core MATLAB-compatible multidimensional array and scalar value type.
Definition
value.hpp:61
nk::stats::pcacov
std::tuple< Value, Value, Value > pcacov(const Value &C, std::pmr::memory_resource *mr=nullptr)
PCA from a precomputed covariance matrix ([coeff, latent, explained] = pcacov(C)).
nk::stats::pca
std::tuple< Value, Value, Value, Value, Value, Value > pca(const Value &X, std::pmr::memory_resource *mr=nullptr)
Principal Component Analysis ([coeff, score, latent, tsquared, explained, mu] = pca(X)).
nk::stats::pcares
Value pcares(const Value &X, int ndim, std::pmr::memory_resource *mr=nullptr)
PCA residuals (res = pcares(X, ndim)).
src
toolboxes
stats
include
nk
stats
dim
pca.hpp
Generated by
1.17.0