plot.NaiveBayes {klaR}R Documentation

Naive Bayes Plot

Description

Visualizes the marginal probabilities of predictor variables given the class.

Usage

plot.NaiveBayes(x, vars, n = 1000, legendplot = TRUE, 
    lty = 1:length(x$apriori), col = rainbow(length(x$apriori)), 
    ylab = "Density", main = "Naive Bayes Plot", ...)
    

Arguments

x an object of class NaiveBayes
vars variables to be plotted. If missing all predictor variables are plotted.
n Number points used to plot the density line.
legendplot print a legend?
lty lty of the different classes.
col color for the different classes.
ylab label for y-axis.
main title of the plots.
... furhter arguments passed to the underlying plot functions.

Details

For metric variables the estimated density is plotted. For categorial variables mosaicplot is called.

Author(s)

Karsten Luebke

See Also

NaiveBayes

Examples

data(iris)
mN<-NaiveBayes(Species~.,data=iris)
plot(mN)

mK<-NaiveBayes(Species~.,data=iris,usekernel=TRUE)
plot(mK)

[Package Contents]