2009-07-10 Rでナイーブベイズ install.packages('e1071') library(e1071) data(iris) #Naive Bayes分類器を用いて分類 m <- naiveBayes(iris[,-5], iris[,5]) #分類精度の表示 m #分類結果のテーブル表示 table(predict(m, iris[,-5]), iris[,5]) 参考