[R] Extract naiveBayes details
david.meyer at wu-wien.ac.at
Fri Jun 27 09:55:09 CEST 2008
the Naive Bayes model consists of several tables, one for each
(categorical) predictor. Using
m = naiveBayes( ... )
you will get (as the help page says):
tables: A list of tables, one for each predictor variable. For each
categorical variable a table giving, for each attribute
level, the conditional probabilities given the target class.
I just like to know how to extract details from the naiveBayes model
(package e1071). I mean, for each possible value the model defines how much
it influences the outcome. I want to sort those probabilities and show the
values with the highest impact.
How could I do that?
PS: I tried using 's to get to the model's internals, however, all I get
is a "list" not a "matrix" I could work with. What am I doing wrong?
More information about the R-help