Splits states of graph variables while a per-variable bin limit allows it.
DiscretizationManager(std::size_t max_bins_per_var=50)
bool should_split(const Graph &graph, NodeId var) const
Tests whether a variable still has fewer states than the limit.
void split_bin(Graph &graph, NodeId var, std::size_t state_idx)
Splits one state of a variable into two.
std::size_t max_bins_per_var_
split_bin() is a no-op at or above this state count
Directed graphical model over discrete variables.
bncore::Graph, the discrete Bayesian network model: variables, their states, directed edges and condi...
std::uint32_t NodeId
Handle of a variable within one Graph.