Skip to contents

Auxiliary function for "naive_bayes", "*_naive_bayes" and "naive_bayes_tables" objects for obtaining names of class conditional distributions assigned to the features.

Usage

get_cond_dist(object)

Arguments

object

object of class inheriting from "naive_bayes" or "*_naive_bayes" or "naive_bayes_tables".

Value

vector with names of class conditional distributions assigned to the features.

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"