get_pc_space {oddstream}R Documentation

Define a feature space using the PCA components of the feature matrix

Description

Define a two dimensional feature space using the first two principal components generated from the fetures matrix returned by extract_tsfeatures

Usage

get_pc_space(features, robust = TRUE, kpc = 2)

Arguments

features

Feature matrix returned by extract_tsfeatures

robust

If TRUE, a robust PCA will be used on the feature matrix.

kpc

Desired number of components to return.

Value

It returns a list with class 'pcattributes' containing the following components:

pcnorm

The scores of the firt kpc pricipal components

center, scale

The centering and scaling used

rotation

the matrix of variable loadings (i.e., a matrix whose columns contain the eigenvectors). The function princomp returns this in the element loadings.

See Also

PCAproj, prcomp, find_odd_streams, extract_tsfeatures, set_outlier_threshold, gg_featurespace

Examples

features <- extract_tsfeatures(anomalous_stream[1:100, 1:100])
pc <- get_pc_space(features)


[Package oddstream version 0.5.0 Index]