SecreC 2 language  2.8.0 (2023.09)
Language and standard library reference
Functions

Functions

template<domain D :shared3p >
PCAResult< D, float32 > gspca (D float32[[2]] X, uint n_components, uint iterations, uint8 returnValues)
 
template<domain D :shared3p >
PCAResult< D, float64 > gspca (D float64[[2]] X, uint n_components, uint iterations, uint8 returnValues)
 

Detailed Description

Principal component analysis. Note that this method is relatively efficient and precise when a low number of components is required. It uses fixed point numbers internally so it may fail on large inputs due to overflow.

Note
D - shared3p protection domain
Supported types - float32 / float64
Parameters
X- data matrix where the columns are variables
n_components- how many components to compute
iterations- how many iterations to run the algorithm
returnValues- indicates which results to return. Use bitwise or if you want multiple results.
Returns
PCAResult structure
Leakage
None

Function Documentation

◆ gspca() [1/2]

PCAResult<D, float32> gspca ( D float32[[2]]  X,
uint  n_components,
uint  iterations,
uint8  returnValues 
)

◆ gspca() [2/2]

PCAResult<D, float64> gspca ( D float64[[2]]  X,
uint  n_components,
uint  iterations,
uint8  returnValues 
)