| coef.nmf | R Documentation |
Returns the coefficients data frame from a fitted NMF model
that has been passed through an inference function
(nmfkc.inference, nmfae.inference,
nmfre.inference).
If inference has not been run, returns the parameter matrix C
(\Theta) directly.
For nmf.sem objects, returns C_2 (exogenous block) as fallback.
## S3 method for class 'nmf'
coef(object, ...)
## S3 method for class 'nmf.sem'
coef(object, ...)
object |
A fitted model object of class |
... |
Not used. |
A data frame of coefficients (if inference was performed),
or the parameter matrix C.
nmfkc.inference, nmfae.inference,
nmfre.inference, nmf.sem.inference
Y <- matrix(cars$dist, nrow = 1)
A <- rbind(1, cars$speed)
result <- nmfkc(Y, A, rank = 1)
coef(result) # returns C matrix
result2 <- nmfkc.inference(result, Y, A)
coef(result2) # returns coefficients data frame
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.