computing frequency*rank
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Charmaine Tan
am 26 Nov. 2018
Beantwortet: Christopher Creutzig
am 26 Nov. 2018
I have managed to plot a histogram of the frequency of top-100 words (I managed to get the top 100 words using topkwords in Text Analytics Toolbox). How can I
1) compute the frequency*rank for every word and,
2) plot (frequency, 1/rank).
0 Kommentare
Akzeptierte Antwort
Christopher Creutzig
am 26 Nov. 2018
Assuming we have
t = topkwords(bag,100);
You can get frequency*rank as:
t.FreqTimesRank = (1:size(t,1)).*t.Count;
And you can plot frequency against 1/rank by calliong:
plot(t.Count,1./(1:size(t,1)))
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Histograms finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!