r - Naive Bayes implementation -


in project, used naive bayes implementation "e1071" library , time execution large. then, used naive bayes implementation "nblearn", , results similar execution time 10 times smaller!

has noticed same? can reason that?

testnaivebayes <-function(formula, trainingdata, testdata) {     model <- naivebayes(formula, trainingdata)     pred <- predict(model, testdata)     result <- calcratesfor(formula, testdata, pred )      result }  testnb <-function(formula, trainingdata, testdata) {     cl <- tostring(formula[[2]])     model <- naive.bayes(trainingdata, cl)     pred <- predict(model, testdata)     result <- calcratesfor(formula, testdata, pred )      result } 


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -