poisson-topicmodels Logo

Documentation Contents

  • About poisson-topicmodels
    • What is poisson-topicmodels?
    • Statement of Need
    • Use Cases
    • Core Philosophy
    • Related Packages
    • What Sets poisson-topicmodels Apart
    • Theory Behind Topic Models
    • Getting Help
  • Installation
    • Quick Install (Recommended)
    • Installation from Source
    • Development Installation
    • GPU Support (JAX)
    • Conda Installation
    • Environment Management
      • Using venv
      • Using Conda
    • Verifying the Installation
    • Troubleshooting
    • Need Help?
    • System Requirements
  • Getting Started
    • Quickstart: Your First Topic Model
      • Step 1: Import Required Libraries
      • Step 2: Prepare Your Data
      • Step 3: Initialize and Train the Model
      • Step 4: Extract and Interpret Results
    • Understanding the Output
    • Next Steps
    • Complete Example with Real-ish Data
    • Key Concepts
    • Common Parameters
    • Tips for Best Results
    • What’s Next?
    • Having Issues?
  • Fundamentals
    • Core Concepts
      • What is Topic Modeling?
      • Document-Term Matrix
      • Vocabulary
      • Topics and Word Distributions
      • Document-Topic Mixtures
      • The Complete Picture
      • Poisson Factorization Model
      • Inference: Learning from Data
      • Hyperparameters
      • Convergence and Loss
      • Interpreting Topics
      • Model Assumptions
      • Common Pitfalls
      • Next Steps
    • Poisson Factorization (PF)
      • When to Use PF
      • The Model
      • Example: Basic Usage
      • Interpreting Results
      • Example Interpretation Workflow
      • Hyperparameter Selection
      • Training Tips
      • Common Issues and Solutions
      • Evaluation Metrics
      • Next Steps
    • Seeded Models (SPF & Keywords)
      • When to Use Seeded Models
      • The Model
      • Basic Usage
      • How Seeding Works
      • Advanced: Seed Strength
      • Designing Good Seeds
      • Mixing Seeded and Unseeded Topics
      • Iterative Seeding
      • Practical Example
      • Troubleshooting Seeds
      • Validation
      • Comparison with Unsupervised
      • Next Steps
    • Covariate Models (CPF & CSPF)
      • Covariate Poisson Factorization (CPF)
        • The Model
        • Usage Example
        • Interpreting Covariate Effects
        • Practical Example: Time Evolution
      • Covariate Seeded PF (CSPF)
        • Usage
        • Practical Example: Geographic Topic Analysis
      • Tips for Covariate Modeling
      • Common Patterns
      • Visualization Examples
      • Troubleshooting
      • Next Steps
    • Ideal Points Models (TBIP & STBS)
      • What Are Ideal Points?
      • Model Intuition
      • When to Use TBIP vs STBS
      • Basic Usage (TBIP)
      • Basic Usage (STBS)
      • Interpreting Ideal Points
      • Topic-Word-Author Relationships (TBIP)
      • Practical Example: Political Speeches (TBIP)
      • Validating Ideal Points
      • Relationship to Other Models
      • Implementation Details
      • Troubleshooting
      • Next Steps
    • Embedded Topic Models (ETM)
      • Why Use Embeddings?
      • When to Use ETM
      • Model Overview
      • Basic Usage
      • Loading Pre-trained Embeddings
      • Practical Example: News Classification
      • Comparing ETM vs Standard Models
      • Advanced: Custom ETM Variants
      • Embedding Quality Matters
      • Troubleshooting ETM
      • Evaluation
      • Relationship to Other Models
      • Next Steps
    • Overview of Available Models
    • Which Model Should I Use?
    • Model Comparison Table
    • Common Patterns
    • Probabilistic Background
    • Learn More
  • Tutorials
    • Tutorial: Training Your First Topic Model
      • Step 1: Prepare Your Data
      • Step 2: Initialize the Model
      • Step 3: Train the Model
      • Step 4: Extract Results
      • Step 5: Interpret Topics
      • Step 6: Analyze Document-Topic Distribution
      • Step 7: Advanced Analysis
      • Step 8: Quality Metrics
      • Next: Validation and Optimization
      • Quick Checklist
      • Common Issues
    • Tutorial: GPU Acceleration
      • Why GPU?
      • Checking GPU Availability
      • Enabling GPU for poisson-topicmodels
      • Setting Up GPU Environment
      • Training with GPU
      • Monitoring GPU Usage
      • Memory Management
      • Performance Benchmarking
      • Optimizing for Speed
      • Troubleshooting GPU
      • Best Practices
      • Scaling to Large Datasets
      • Next Steps
      • Key Takeaway
    • Tutorial: Model Validation & Evaluation
      • Validation Approaches
      • The Coherence Metric
      • Qualitative Inspection
      • Comparative Evaluation
      • Downstream Task Evaluation
      • Topic Similarity Analysis
      • Document Coverage
      • Visualization for Validation
      • Validation Checklist
      • Red Flags
      • Validation Workflow
      • Version Tracking
      • Next Steps
    • Tutorial: Hyperparameter Tuning
      • Key Hyperparameters
      • num_topics: The Critical Parameter
      • learning_rate: Optimization Speed
      • batch_size: Gradient Stability
      • Systematic Hyperparameter Search
      • Random Search (More Efficient)
      • Practical Tuning Strategy
      • Early Stopping
      • Documenting Experiments
      • Common Mistakes & Solutions
      • Tuning Checklist
      • Next Steps
      • Summary
    • Tutorial Overview
    • Quick Start Tutorials
    • Prerequisites
    • Tutorial Series: From Data to Insights
    • Troubleshooting Tutorials
    • Feedback
  • How-To Guides
    • Common Topics
    • Tips & Best Practices
    • Learn More
  • API Reference
    • Module Organization
    • Model API Pattern
    • Common Parameters
    • Common Methods (all models)
    • SPF-specific Methods
    • CPF-specific Methods
    • CSPF-specific Methods
    • TBIP-specific Methods
    • STBS-specific Methods
    • ETM-specific Methods
    • Metrics Dataclass
    • Error Handling
    • Type Hints
    • Performance Notes
    • API Stability
    • Next Steps
  • API Reference (Auto-generated)
    • NumpyroModel
      • NumpyroModel.Metrics
      • NumpyroModel.estimated_params
      • NumpyroModel.D
      • NumpyroModel.V
      • NumpyroModel.batch_size
      • NumpyroModel.counts
      • NumpyroModel.vocab
      • NumpyroModel.K
      • NumpyroModel.train_step()
      • NumpyroModel.return_topics()
      • NumpyroModel.return_beta()
      • NumpyroModel.return_top_words_per_topic()
      • NumpyroModel.plot_model_loss()
      • NumpyroModel.plot_topic_wordclouds()
      • NumpyroModel.summary()
      • NumpyroModel.compute_topic_coherence()
      • NumpyroModel.compute_topic_diversity()
      • NumpyroModel.plot_topic_prevalence()
      • NumpyroModel.plot_topic_correlation()
      • NumpyroModel.plot_document_topic_heatmap()
    • PF
      • PF.D
      • PF.V
      • PF.K
      • PF.counts
      • PF.vocab
    • SPF
      • SPF.D
      • SPF.V
      • SPF.K
      • SPF.counts
      • SPF.vocab
      • SPF.keywords
      • SPF.residual_topics
      • SPF.return_topics()
      • SPF.return_beta()
      • SPF.plot_seed_effectiveness()
    • CPF
      • CPF.D
      • CPF.V
      • CPF.K
      • CPF.C
      • CPF.counts
      • CPF.vocab
      • CPF.X_design_matrix
      • CPF.return_covariate_effects()
      • CPF.return_covariate_effects_ci()
      • CPF.plot_cov_effects()
    • CSPF
      • CSPF.return_topics()
      • CSPF.return_beta()
      • CSPF.return_covariate_effects()
      • CSPF.return_covariate_effects_ci()
      • CSPF.plot_cov_effects()
    • TBIP
      • TBIP.train_step()
      • TBIP.return_topics()
      • TBIP.return_beta()
      • TBIP.return_ideal_points()
      • TBIP.return_ideological_words()
      • TBIP.plot_ideal_points()
    • STBS
      • STBS.train_step()
      • STBS.plot_topic_wordclouds()
      • STBS.plot_topic_prevalence()
      • STBS.plot_author_topic_heatmap()
      • STBS.plot_ideol_points()
      • STBS.plot_iota_credible_intervals()
      • STBS.return_ideal_points()
      • STBS.return_ideal_covariates()
  • Examples & Applications
    • Example Scripts
    • Running Examples
    • Example Notebooks
    • Custom Examples
    • Applications
    • Using Examples as Templates
    • Next Steps
    • Contributing Examples
    • File Organization
    • Quick Reference
    • Support
  • Testing Guide
    • Running Tests
    • Test Categories
    • Test Coverage
    • Writing Tests
    • Continuous Integration
    • Testing Best Practices
    • Test Organization
    • Common Test Patterns
    • Debugging Tests
    • Performance Testing
    • Testing GPU Code
    • Troubleshooting Tests
    • Contributing Tests
    • Test Configuration
    • Testing Progress
    • Contribution Checklist
    • Next Steps
  • Contributing Guide
    • Ways to Contribute
    • Development Setup
    • Code Style
    • Pre-commit Hooks
    • Workflow
    • Contributing Code
    • Contributing Documentation
    • Contributing Examples
    • Reporting Bugs
    • Requesting Features
    • Code Review Process
    • Merging & Release
    • Getting Help
    • Code of Conduct
    • Recognition
    • Thank You!
  • Release Notes & Changelog
    • Current Version
    • Version 0.2.0 - Inspection & Diagnostics
    • Version 0.1.0 - Initial Release
    • Coming Soon (0.3.0)
    • Deprecation Policy
    • Installation by Version
    • Compatibility Matrix
    • Dependency Versions
    • Citing poisson-topicmodels
    • Community Feedback
    • Report Issues
    • Acknowledgments
    • License
    • Next Steps
    • Questions About Releases
poisson-topicmodels
  • Overview: module code

All modules for which code is available

  • poisson_topicmodels.models.CPF
  • poisson_topicmodels.models.CSPF
  • poisson_topicmodels.models.ETM
  • poisson_topicmodels.models.Metrics
  • poisson_topicmodels.models.PF
  • poisson_topicmodels.models.SPF
  • poisson_topicmodels.models.STBS
  • poisson_topicmodels.models.TBIP
  • poisson_topicmodels.models.numpyro_model

© Copyright 2026, Bernd Prostmaier, Bettina Grün, Paul Hofmarcher.

Built with Sphinx using a theme provided by Read the Docs.