executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
modeling-and-factorsBuilds and validates pgmpy graph, model, CPD, factor, and backend objects for causal and probabilistic graphical models.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this sub-skill when the task is to construct, validate, inspect, or debug pgmpy graph/model/factor objects before learning, inference, simulation, causal effects, or file I/O.
DAG, PDAG, MAG, ADMG, SimpleCausalModel, and UndirectedGraph, including causal roles such as exposures, outcomes, latents, confounders, mediators, and instruments.DiscreteBayesianNetwork, LinearGaussianBayesianNetwork, FunctionalBayesianNetwork, DynamicBayesianNetwork, DiscreteMarkovNetwork, FactorGraph, JunctionTree, ClusterGraph, and MarkovChain.TabularCPD, LinearGaussianCPD, FunctionalCPD, DiscreteFactor, JointProbabilityDistribution, and NoisyORCPD.add_cpds, get_cpds, get_factors, check_model, cardinality, state-name, evidence-order, graph-role, factor-scope, and backend-configuration errors.learning-structure-and-parameters.inference-sampling-and-simulation.causal-identification-and-effects.data-io-and-evaluation.extending-pgmpy.check_model() failures, CPD evidence/cardinality mismatches, state-name confusion, optional torch/Pyro errors, and graph-only-vs-model decisions.TabularCPD, make values a 2-D array with shape (variable_card, product(evidence_card)); every column is a conditional distribution and must sum to 1 before check_model() passes.state_names consistent across parent CPDs and child CPDs. Use the same labels in inference/evidence later.model.check_model() before handing the model to learning, inference, simulation, causal, or I/O workflows.FunctionalBayesianNetwork and FunctionalCPD as optional: they require the torch backend plus pyro-ppl; they were not installed in the minimum CPU environment used for the core skill.From any directory with pgmpy installed, run:
python path/to/check_modeling_smoke.py
The script builds a tiny discrete Bayesian network, validates CPDs, runs one small exact query as a smoke check, and reports whether optional torch/Pyro packages are importable without requiring them.