TRMF_coefficients: Add a column regularization model to TRMF object

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/TRMF.R

Description

Adds a regularization model to TRMF object created by create_TRMF() to constrain the fitting process of the coefficient matrix.

TRMF_coefficient is a (soon to be deprecated) alias for TRMF_columns.

Usage

1
2
3
4
TRMF_columns(obj,
    reg_type = c("l2", "nnls", "constrain", "interval", "none"), lambda = 0.0001)
TRMF_coefficients(obj,
    reg_type = c("l2", "nnls", "constrain", "interval", "none"), lambda = 0.0001)

Arguments

obj

TRMF object created by create_TRMF()

reg_type

regularization type to apply when fitting TRMF model. l2 regularizes by simple sum of squares, nnls forces coefficients to be non-negative. constrain constrains coefficients to be non-negative and to sum to 1. interval constrains coefficients to the interval [0-1]

lambda

L2 regularization parameter used for all regularization types. If NULL, uses lambda set in create_TRMF().

Details

This function doesn't do any computations, it just sets up regularization parameters for the coefficient matrix. This function should only be called once on a TRMF object. If called twice, it will overwrite previous model with a warning.

Value

Returns an updated object of class TRMF.

Author(s)

Chad Hammerquist

References

Yu, Hsiang-Fu, Nikhil Rao, and Inderjit S. Dhillon. "High-dimensional time series prediction with missing values." arXiv preprint arXiv:1509.08333 (2015).

See Also

train.TRMF, create_TRMF, TRMF_trend

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# create test data
xm = poly(x = (-10:10)/10,degree=4)
fm = matrix(abs(rnorm(40)),4,10)
Am = xm%*%fm+rnorm(210,0,.2)

# create model
obj = create_TRMF(Am)
obj = TRMF_columns(obj,reg_type ="nnls")
out = train(obj)
plot(out)

TRMF documentation built on Aug. 16, 2021, 5:06 p.m.