impute_TRMF | R Documentation |
Impute missing values in matrix from a pre-trained TRMF object.
impute_TRMF(obj)
obj |
a trained TRMF object |
Essentially an accessor function. Replaces the missing values in data matrix with values from the fitted TRMF object.
data matrix with missing values imputed
Chad Hammerquist
Yu, Hsiang-Fu, Nikhil Rao, and Inderjit S. Dhillon. "High-dimensional time series prediction with missing values." arXiv preprint arXiv:1509.08333 (2015).
train.TRMF
, create_TRMF
, TRMF_trend
# create test data
xm = poly(x = (-10:10)/10,degree=4)
fm = matrix(rnorm(40),4,10)
Am = xm%*%fm+rnorm(210,0,.2)
Am[sample.int(210,20)] = NA
# create model
obj = create_TRMF(Am)
obj = TRMF_trend(obj,numTS=4,order=2)
out = train(obj)
impute_TRMF(out)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.