# NOT RUN {
rm(list = ls())
library(fastNaiveBayes)
cars <- mtcars
y <- as.factor(ifelse(cars$mpg > 25, "High", "Low"))
x <- cars[, 2:ncol(cars)]
# Uses default of top 10 rows to determine distributions
dist <- fastNaiveBayes.detect_distribution(x)
print(dist)
# Uses all rows of x to determine distributions
dist <- fastNaiveBayes.detect_distribution(x, nrows = nrow(x))
print(dist)
# }
Run the code above in your browser using DataLab