flash_zero_out_factor: Zero out factor from flash object

View source: R/flash_fit_utils.R

flash_zero_out_factorR Documentation

Zero out factor from flash object

Description

The factor and loadings of the kth factor of f are made to be zero (except for elements of the factor/loading that are designated to be fixed). This effectively reduces the rank by 1, but the zero factor/loading is retained in f so that the number and indexing of factor/loading matrices in f remain the same.

Usage

flash_zero_out_factor(data, f_init, k)

Arguments

data

An n by p matrix or a flash data object created using flash_set_data.

f_init

The flash object or flash fit object to which new factors are to be added. If f_init = NULL, then a new flash object is created.

k

The index of the factor/loading pair to zero out.

Value

The flash object with the kth factor/loading zeroed out.


stephenslab/flashr2 documentation built on Feb. 6, 2024, 5:21 a.m.