analysis-visualization
Inspect and visualize trained BERTopic models with topic, document, distribution, time, class, and hierarchy views.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- analysis-visualization
- license
- MIT
- metadata
- { "package": "BERTopic", "disco-role": "operating", "parent-skill": "bertopic", "package-version": "0.17.4" }
- description
- Inspect and visualize trained BERTopic models with topic, document, distribution, time, class, and hierarchy views.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/api-reference.md11.6 KB
- 参考文档references/troubleshooting.md7.2 KB
- 参考文档references/workflows.md6.3 KB
- 脚本scripts/smoke_visualization.py11.1 KB
03 SKILL.md 正文
analysis-visualization
Use this sub-skill when the model is already fitted and the task is to inspect, compare, or visualize topics, documents, topic distributions, hierarchy, temporal change, or class-specific topic views.
Route here for
get_topic_info,get_topic,get_topics,get_topic_freq,get_representative_docshierarchical_topics,get_topic_treeapproximate_distribution,topics_over_time,topics_per_class- all
visualize_*methods, including topic maps, document views, hierarchy views, heatmaps, bar charts, term-rank plots, topic-over-time plots, topics-per-class plots, probability/distribution plots, and approximate-distribution tables
Route elsewhere
- Fitting, transforming, partial updates, topic mutation, outlier reassignment, or model building: use the topic-modeling sub-skill.
- Embedding backend selection or downloads: use the embeddings-backends sub-skill.
- Vectorizer / c-TF-IDF tuning and topic-word refreshes: use the vectorizers-ctfidf sub-skill.
- Representation models, labeling, or multi-aspect label generation: use the representations-labeling sub-skill.
- Save/load, hub publishing, or serialization formats: use the serialization sub-skill.
Operating references
references/api-reference.mdreferences/workflows.mdreferences/troubleshooting.mdscripts/smoke_visualization.py
Minimal decision flow
- Need a quick readout of what the model learned? Start with
get_topic_info(),get_topic_freq(),get_topic(), andget_representative_docs(). - Need a global topic landscape? Use
visualize_topics(),visualize_barchart(),visualize_heatmap(), andvisualize_term_rank(). - Need document-level inspection? Use
visualize_documents()orvisualize_hierarchical_documents()with precomputedreduced_embeddingswhen possible. - Need a single-document distribution? Use
approximate_distribution()and thenvisualize_distribution()orvisualize_approximate_distribution(). - Need time or class comparison? Use
topics_over_time()/visualize_topics_over_time()ortopics_per_class()/visualize_topics_per_class(). - Need hierarchy? Use
hierarchical_topics(), inspectget_topic_tree(), then rendervisualize_hierarchy().
Notes
- Most plot functions exclude topic
-1by default. custom_labelsin plotting calls can be a boolean or an aspect-name string when the model has matching topic aspects.visualize_topics()andvisualize_hierarchy()need UMAP for internal 2D topic layout; document views can avoid UMAP by acceptingreduced_embeddings.visualize_document_datamap()needsdatamapplot;visualize_approximate_distribution()returns a styled table only when Jinja2 is available.
Verification anchors
- Tiny synthetic no-download model: exercise
visualize_topics,visualize_barchart,visualize_heatmap,visualize_documents, andvisualize_distributionfrom precomputed embeddings without downloading external models. - Small-corpus analysis loop: compute
approximate_distribution,hierarchical_topics, andget_topic_tree, then connect them to the distribution and hierarchy plots.
Handoff constraint
Keep this sub-skill focused on inspection and visualization. Do not pull fit, backend, vectorizer, representation, or serialization setup into this skill.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).