'PCA with a NMF basis matrix
Is there any function other than jsPCA to do the dimension reduction on a matrix of basis components of an NMF model? 'Cause it seems that jsPCA only extracts two dimensions but I would like more dimensions (say, 4 dimensions).
The code of using a jsPCA function:
pca <- as.data.frame(jsPCA(t(basis(nmfModel))))
I try to use the princomp function:
test <- as.data.frame(princomp(t(basis(nmfModel))))
but it returns an error message saying:
Error in princomp.default(as.data.frame(t(basis(nmfModel)))) : 'princomp' can only be used with more units than variables
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
