## S3 method for class 'NaiveBayes': plot(x, vars, n = 1000, legendplot = TRUE, lty, col, ylab = "Density", main = "Naive Bayes Plot", ...)
NaiveBayes
legend
length(x$apriori)
rainbow(length(x$apriori))
mosaicplot is called.
data(iris) mN <- NaiveBayes(Species ~ ., data = iris) plot(mN) mK <- NaiveBayes(Species ~ ., data = iris, usekernel = TRUE) plot(mK)
Run the code above in your browser using DataLab