@pagal_guy wrote:
Hello,
I am trying to use lsa for document classification.I want to be able to extract the appropriate number of dimensions from the matrix after LSA as we do in PCA.
Here is what I am doing:
library(lsa) lsa.model <- lsa(dtm) summary(lsa.model) summary.textmatrix(as.textmatrix(lsa.model)) dk_matrix <- data.frame(data.matrix(lsa.model$dk)) # specific share of 0.9 dimcalc_share(share=0.8)(lsa.model$sk) #This tells us to take 77 eigen vectors from dk matrix: dk_matrix = dk_matrix[1:77]
Can someone pleas help me on whether this is right way or not??
Posts: 1
Participants: 1