Uses Kruskal's algorithm to find the augmenting forest that maximizes the sum of pairwise weights. When the weights are class-conditional mutual information this forest maximizes the likelihood of the tree-augmented naive Bayes network.
max_weight_forest(g)
A graph. The maximum spanning forest.
A graph. The undirected graph with pairwise weights.
If g
is not connected than this will return a forest; otherwise it is
a tree.
Friedman N, Geiger D and Goldszmidt M (1997). Bayesian network classifiers. Machine Learning, 29, pp. 131--163.
Murphy KP (2012). Machine learning: a probabilistic perspective. The MIT Press. pp. 912-914.