Obtain names of class conditional distribution assigned to features
get_cond_dist.Rd
Auxiliary function for "naive_bayes"
, "*_naive_bayes"
and "naive_bayes_tables"
objects for obtaining names of class conditional distributions assigned to the features.
Arguments
- object
object of class inheriting from
"naive_bayes"
or"*_naive_bayes"
or"naive_bayes_tables"
.
Author
Michal Majka, michalmajka@hotmail.com
Examples
data(iris)
nb <- naive_bayes(Species ~ ., data = iris)
get_cond_dist(nb) # <=> attr(nb$tables, "cond_dist")
#> Sepal.Length Sepal.Width Petal.Length Petal.Width
#> "Gaussian" "Gaussian" "Gaussian" "Gaussian"
get_cond_dist(tables(nb))
#> Sepal.Length Sepal.Width Petal.Length Petal.Width
#> "Gaussian" "Gaussian" "Gaussian" "Gaussian"