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
graph-modelsGuides pomegranate BayesianNetwork and FactorGraph workflows, including categorical graph construction, structure learning, factor-graph inference, masked missing-value prediction, and graph troubleshooting.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this sub-skill for directed categorical Bayesian networks, direct factor-graph inference, categorical structure learning, and discrete missing-value inference with torch.masked.MaskedTensor. It covers BayesianNetwork, FactorGraph, Categorical, ConditionalCategorical, and JointCategorical interactions.
Typical imports:
from pomegranate.distributions import Categorical, ConditionalCategorical, JointCategorical
from pomegranate.bayesian_network import BayesianNetwork
from pomegranate.factor_graph import FactorGraph
Read references/api-reference.md for constructors, edge semantics, structure learning, and inference examples. Run scripts/smoke_graph_models.py for a self-contained Monty Hall Bayesian-network check and a tiny factor-graph check.
structure or algorithm='chow-liu'/'exact' and call fit.Categorical; child nodes with parents use ConditionalCategorical; factor-graph factors use Categorical or JointCategorical.predict, predict_proba, and predict_log_proba infer missing variables from torch.masked.MaskedTensor where mask=True means observed.State, Node, or bake; v1.x uses direct distribution objects.BayesianNetwork currently expects Categorical and ConditionalCategorical node distributions.FactorGraph is bipartite: edges connect marginals to factors, not factor-to-factor or marginal-to-marginal.predict_proba returns a list of tensors, one per variable, because variables can have different category counts.