fitlsa
Fit LSA model
Description
A latent semantic analysis (LSA) model discovers relationships between documents and the words that they contain. An LSA model is a dimensionality reduction tool useful for running low-dimensional statistical models on high-dimensional word counts. If the model was fit using a bag-of-n-grams model, then the software treats the n-grams as individual words.
fits an LSA model with mdl
= fitlsa(bag
,numComponents
)numComponents
components to the
bag-of-words or bag-of-n-grams model bag
.
fits an LSA model to the documents represented by the matrix of word counts
mdl
= fitlsa(counts
,numComponents
)counts
.
specifies additional options using one or more name-value pair arguments.mdl
= fitlsa(___,Name,Value
)
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2017b