Creates a faceted bar plot showing the top terms and their probabilities (beta values) for each topic in a topic model.
Usage
plot_word_probability(
top_topic_terms,
topic_label = NULL,
ncol = 3,
height = 1200,
width = 800,
ylab = "Word probability",
title = NULL,
colors = NULL,
measure_label = "Beta",
base_font_size = 11,
...
)Arguments
- top_topic_terms
A data frame containing topic terms with columns: topic, term, and beta.
- topic_label
Optional topic labels. Can be either a named vector mapping topic numbers to labels, or a character string specifying a column name in top_topic_terms (default: NULL).
- ncol
Number of columns for facet wrap layout (default: 3).
- height
Plot height for responsive spacing adjustments (default: 1200).
- width
Plot width for responsive spacing adjustments (default: 800).
- ylab
Y-axis label (default: "Word probability").
- title
Plot title (default: NULL for auto-generated title).
- colors
Color palette for topics (default: NULL for auto-generated colors).
- measure_label
Label for the probability measure (default: "Beta").
- base_font_size
Base font size in points for the plot theme (default: 11). Axis text and strip text will be base_font_size + 2.
- ...
Additional arguments (currently unused, kept for compatibility).
See also
Other topic-modeling:
analyze_semantic_evolution(),
assess_embedding_stability(),
assess_hybrid_stability(),
auto_tune_embedding_topics(),
calculate_assignment_consistency(),
calculate_keyword_stability(),
calculate_semantic_drift(),
calculate_topic_probability(),
calculate_topic_stability(),
find_optimal_k(),
find_topic_matches(),
fit_embedding_model(),
fit_hybrid_model(),
fit_temporal_model(),
fit_topic_prevalence_model(),
generate_topic_labels(),
get_topic_prevalence(),
get_topic_terms(),
get_topic_texts(),
identify_topic_trends(),
plot_model_comparison(),
plot_quality_metrics(),
plot_topic_effects_categorical(),
plot_topic_effects_continuous(),
plot_topic_probability(),
run_neural_topics_internal(),
validate_semantic_coherence()
