Model Analysis and Visualization¶
These modules extract structured metadata from block models and render it as plate-notation diagrams.
Model Analyzer¶
ModelAnalyzer: Extracts structured metadata from scikit-agent DBlock/RBlock models for visualization (e.g., plate-notation drawing).
Key concepts: - instant edge: dependency within the same time period - lag edge: dependency from previous time period (including self-lag like p_{t-1} → p_t) - param edge: dependency from a calibration parameter - shock edge: dependency from an exogenous shock
- class skagent.model_analyzer.ModelAnalyzer(model, calibration, block_agent=None)¶
- Analyze a scikit-agent DBlock or RBlock and extract:
node_meta: kind, agent, plate, observed for each variable
edges: instant / lag / param / shock dependencies
plates: loop-notation plates inferred from agents
- analyze()¶
Run the full analysis pipeline.
- to_dict()¶
Return a JSON-serializable dict of the analysis.