components.TRMF | R Documentation |
This function returns the factors (Xm, Fm,Z) from a trained TRMF object
## S3 method for class 'TRMF'
components(object, XorF = c("Xm","Fm","Z","Fm_each"), ...)
object |
trained TRMF object |
XorF |
which factor to return |
... |
ignored |
Returns the matrix factors. If matrix normalization was used in create_TRMF
, Xm%*%diag(Z)%*%Fm
could look much different than the input data matrix. If external regressor were included in the model and XorF = "F_each"
then a returns a list with Fm split up by parts.
A matrix or vector, or a possibly a list if XorF = "F_each"
.
Chad Hammerquist
create_TRMF
, TRMF_columns
, 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)
# create model
obj = create_TRMF(Am)
out = train(obj)
plot(out)
components(out,"Xm")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.