Skip to contents

This performs pca on a sparse Matrix specified by the formula and the tibble.

Usage

pca_sum(fo, tib, k)

Arguments

fo

a formula, like outcome ~ (row_ids & context) * measurement_type.

tib

a tibble that contains the variables in the formula. The only exception is that the left-hand-side can be 1 and this does not need to be in tib.

k

number of dimensions for the pca

Value

the output is a list of: (1) row_features for whichever term is first on the right hand side of the formula, (2) column_features for whichever term is second on the right hand side of the formula, (3) middle_B which is a tibble corresponding to a diagonal matrix in sparse triplet form, (4) settings which is a list of details.