TRMF_ar: Add an Auto-Regressive Regularization Model to a TRMF Object.

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

View source: R/TRMF.R

Description

Creates a regularization scheme that constrains latent time-series based on auto-regressive parameters and adds it to a TRMF object. In matrix optimization form, it adds the following term to the TRMF cost function: R(x) = lambdaD^2||w(DX_s)||^2 + lambdaA^2||X_s||^2 where X_s is sub-set of the Xm matrix controlled by this model and D is a matrix that corresponds to an auto-regressive model.

Usage

1
TRMF_ar(obj,numTS = 1,AR,lambdaD=1,lambdaA=0.0001,weight=1)

Arguments

obj

A TRMF object

numTS

number of latent time series in this model

lambdaD

regularization parameter for temporal constraint matrix

lambdaA

regularization parameter to apply simple L2 regularization to this time series model

weight

optional vector of weights to weight constraints, i.e. R(x) = lambdaD^2*||w*(D%*%X)||^2

AR

vector of autoregressive parameters. No checks are performed

Details

Setting AR = c(1) gives a random walk model, same as TRMF_trend(..., order=1)

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

create_TRMF, TRMF_columns, TRMF_trend

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# create test data
xm = matrix(rnorm(80),20,4)
fm = matrix(rnorm(40),4,10)+1
Am = xm%*%fm+rnorm(200,0,.1)

# create model
obj = create_TRMF(Am)
obj = TRMF_columns(obj,reg_type ="interval")
obj = TRMF_ar(obj,numTS=2,AR=c(0.5),lambdaD=4)
out = train(obj)
plot(out)

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