sonnetsCounts.mat file
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Peter Mayhew
le 23 Déc 2018
Commenté : Walter Roberson
le 26 Déc 2018
Does anyone know how the sonnetsCounts.mat file was created on the following MATLAB page: https://uk.mathworks.com/help/textanalytics/ref/ldamodel.predict.html
Predict Top LDA Topics of Word Count Matrix
Load the example data. sonnetsCounts.mat contains a matrix of word counts and a corresponding vocabulary of preprocessed versions of Shakespeare's sonnets.
load sonnetsCounts.mat
size(counts)
ans = 1×2
154 3092
When I open the sonnetsCounts.mat file, it has the following data
val =
(1,1) 1
(106,1) 1
(131,1) 2
(154,1) 1
(1,2) 1
(143,2) 1
I presume the second column in the frequency of words. But I'm not sure if the vector in the first column represents two words?
Peter
0 commentaires
Réponse acceptée
Walter Roberson
le 24 Déc 2018
Modifié(e) : Walter Roberson
le 24 Déc 2018
The counts is a sparse matrix.
(143,2) 1
means that sonnet #143, unique word #2, had a count of 1.
4 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Statistics and Machine Learning Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!