TRMF_simple | R Documentation |

Creates an L2 regularization and adds it to a TRMF object. In matrix optimization form, it adds the following term to the TRMF cost function: `R(x) = lambdaA^2||w(X_s)||^2`

where `X_s`

is sub-set of the Xm matrix controlled by this model.

```
TRMF_simple(obj,numTS = 1,lambdaA=0.0001,weight=1)
```

`obj` |
A TRMF object |

`numTS` |
number of latent time series in this model |

`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) = lambdaA^2*||w*X||^2 |

This is called by `train_TRMF`

if the TRMF object doesn't have any time series models.

Returns an updated object of class TRMF.

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).

`create_TRMF`

, `TRMF_columns`

,`TRMF_seasonal`

, `TRMF_trend`

```
# create test data
xm = matrix(rnorm(160),40,4)
fm = matrix(runif(40),4,10)
Am = xm%*%fm+rnorm(400,0,.1)
# create model
obj = create_TRMF(Am)
obj = TRMF_simple(obj,numTS=4,lambdaA=0.1)
out = train(obj)
plot(out)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.