View source: R/plot.NaiveBayes.R
plot.NaiveBayes | R Documentation |
Visualizes the marginal probabilities of predictor variables given the class.
## S3 method for class 'NaiveBayes'
plot(x, vars, n = 1000, legendplot = TRUE, lty, col,
ylab = "Density", main = "Naive Bayes Plot", ...)
x |
an object of class |
vars |
variables to be plotted. If missing, all predictor variables are plotted. |
n |
number of points used to plot the density line. |
legendplot |
logical, whether to print a |
lty |
line type for different classes, defaults to the first |
col |
color for different classes, defaults to |
ylab |
label for y-axis. |
main |
title of the plots. |
... |
furhter arguments passed to the underlying plot functions. |
For metric variables the estimated density is plotted. For categorial variables mosaicplot is called.
Karsten Luebke, karsten.luebke@fom.de
NaiveBayes
data(iris)
mN <- NaiveBayes(Species ~ ., data = iris)
plot(mN)
mK <- NaiveBayes(Species ~ ., data = iris, usekernel = TRUE)
plot(mK)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.