Learn R Programming

rtemis (version 1.4.3)

get_loadings: Get Decomposition Loadings

Description

The loadings of a linear decomposition: the weight of each feature on each component.

Usage

get_loadings(decom)

Value

Numeric matrix, features by components, or NULL when the algorithm has no loadings.

Arguments

decom

Decomposition object.

Author

EDG

Details

Loadings are defined for algorithms whose linear trait is TRUE; see decomposition_traits. The loadings matrix L is the one through which the components map back to the data, transformed %*% t(L), in the space the backend fits in:

PCA

The rotation, whose columns are the principal axes.

ICA

The transposed mixing matrix.

NMF

The basis matrix, non-negative.

Rows are named by the features the decomposition was fitted on and columns by its components, as in decom@transformed.

Examples

Run this code
iris_pca <- decomp(exc(iris, "Species"), algorithm = "PCA", verbosity = 0L)
get_loadings(iris_pca)

Run the code above in your browser using DataLab