S******y 发帖数: 1123 | 1 I am wondering if anybody here have a simple example in R for Naive
Bayes.
For example, I can do k-means clustering on the "iris" data -
data(iris)
cl <- kmeans(iris[,1:4], 3)
cl$cluster
cbind(1:150,iris$Species)
===========
But how to do Naive Bayes classification in the same "iris" data?
Many thanks! | d**n 发帖数: 198 | 2 write one
【在 S******y 的大作中提到】 : I am wondering if anybody here have a simple example in R for Naive : Bayes. : For example, I can do k-means clustering on the "iris" data - : data(iris) : cl <- kmeans(iris[,1:4], 3) : cl$cluster : cbind(1:150,iris$Species) : =========== : But how to do Naive Bayes classification in the same "iris" data? : Many thanks!
| q**j 发帖数: 10612 | 3 and do not forget to share after you are done.
【在 d**n 的大作中提到】 : write one
| S******y 发帖数: 1123 | 4 library(e1071)
【在 q**j 的大作中提到】 : and do not forget to share after you are done.
|
|