I am using the naivebayes function of the e1071 library. Some example commands are:

model = naiveBayes(Species ~ ., data = iris)
pred = predict(model, iris[,])

My question is: how can I obtain the maximum likelihood estimate for the conditional probability distribution of this model?

  • 1
    $\begingroup$ Crossposting between here and StackOverflow is discouraged. $\endgroup$ – Dirk Eddelbuettel Oct 27 '10 at 15:47
  • 2
    $\begingroup$ I would suggest that this would be the more appropriate place for this question. $\endgroup$ – csgillespie Oct 27 '10 at 15:48
  • $\begingroup$ sorry for crossposting.i didn't know here when i posted the question to stackoverflow.somebody suggested here and i posted here then. thanks. $\endgroup$ – Yuan Oct 27 '10 at 15:50
  • 1
    $\begingroup$ At the very least, you should provide the link to the other posting. $\endgroup$ – Jeromy Anglim Oct 28 '10 at 3:20

This seems a bit ambiguous... What's wrong with model$table?

| cite | improve this answer | |
  • $\begingroup$ unfortunately, i have no background in statistics so i don't know what to expect from a "MLE" output. sorry for that. so, when i print model$table, i get something like below. is this MLE? Sepal.Length Y [,1] [,2] setosa 5.006 0.3524897 versicolor 5.936 0.5161711 virginica 6.588 0.6358796 $\endgroup$ – Yuan Oct 27 '10 at 17:18
  • 1
    $\begingroup$ @Yuan I don't know, because simple "MLE" can mean different things... Try reading ?naivebayes, it is quite detail description what is what in table, maybe you could find something familiar there. Or try to specify what you need in more detailed way -- what is your desired use, for what you need it? $\endgroup$ – user88 Oct 27 '10 at 20:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy