get_pc_space: Define a feature space using the PCA components of the...

Description Usage Arguments Value See Also Examples

View source: R/get_pc_space.R

Description

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

Usage

1
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

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

oddstream documentation built on Jan. 11, 2020, 9:44 a.m.