tan_chowliu | R Documentation |
Learns a one-dependence Bayesian classifier using Chow-Liu's algorithm, by maximizing either log-likelihood, the AIC or BIC scores; maximizing log-likelihood corresponds to the well-known tree augmented naive Bayes (Friedman et al., 1997). When maximizing AIC or BIC the output might be a forest-augmented rather than a tree-augmented naive Bayes.
tan_cl(class, dataset, score = "loglik", root = NULL)
class |
A character. Name of the class variable. |
dataset |
The data frame from which to learn the classifier. |
score |
A character. The score to be maximized. |
root |
A character. The feature to be used as root of the augmenting tree. Only one feature can be supplied, even in case of an augmenting forest. This argument is optional. |
A bnc_dag
object.
Friedman N, Geiger D and Goldszmidt M (1997). Bayesian network classifiers. Machine Learning, 29, pp. 131–163.
data(car)
ll <- tan_cl('class', car, score = 'loglik')
## Not run: plot(ll)
ll <- tan_cl('class', car, score = 'loglik', root = 'maint')
## Not run: plot(ll)
aic <- tan_cl('class', car, score = 'aic')
bic <- tan_cl('class', car, score = 'bic')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.