computing frequency*rank

조회 수: 4 (최근 30일)
Charmaine Tan
Charmaine Tan 2018년 11월 26일
답변: Christopher Creutzig 2018년 11월 26일
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).

채택된 답변

Christopher Creutzig
Christopher Creutzig 2018년 11월 26일
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개)

카테고리

Help CenterFile Exchange에서 Histograms에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by