R/topic-analysis.R
select_top_topics.Rdselect_top_topics allows to select a specified number of top topics
based on miscellaneous properties of the topic frequencies. This method is
typically used to select a topic frequency time series for plotting and
exploratory analysis. See the details of the function arguments for selection
options.
select_top_topics(topicFrequencies, topN = 25, selectBy = "most_frequent", selectTopics = NULL)
| topicFrequencies | a dataframe of topic frequencies as returned
by |
|---|---|
| topN | the number of returned top topics meeting the selection criteria
in |
| selectBy | the selection approach which determines the metric by which
|
| selectTopics | a vector of topic IDs by which the returned results
should be filtered; this option is only considered when the option
"topic_id" is chosen for |
a dataframe specifying topic metrics employed for selecting top
topics, where:
a unique topic identifier
the total number of documents in a dataset in which a
topic with topic_id occurs
the slope coefficient of a
linear model fit to this topic_id's time frequency series
the residual standard deviation of a linear model fit to
this topic_id's time frequency series
a categorisation of the topic frequency trend