project: Project a model onto new data

View source: R/predict_nmf.r

projectR Documentation

Project a model onto new data

Description

Equivalent to predict method for NMF, but requires only the w matrix to be supplied and not the entire NMF model. Use NNLS to project a basis factor model onto new samples.

Usage

project(w, data, L1 = 0, L2 = 0, mask = NULL, upper_bound = 0, ...)

Arguments

w

matrix of features (rows) by factors (columns), corresponding to rows in data

data

a dense or sparse matrix

L1

L1/LASSO penalty

L2

L2/Ridge penalty

mask

masking on data values

upper_bound

maximum value permitted in least squares solutions, essentially a bounded-variable least squares problem between 0 and upper_bound

...

arguments passed to predict.nmf

Details

See nmf for more info, as well as the predict method for NMF.


zdebruine/RcppML documentation built on Sept. 13, 2023, 11:44 p.m.