data(iris)
y <- iris[[5]]
M <- as.matrix(iris[-5])
### Train the Gaussian Naive Bayes
gnb <- gaussian_naive_bayes(x = M, y = y)
### Extract coefficients
coef(gnb)
coef(gnb)[c(TRUE,FALSE)] # only means
coef(gnb)[c(FALSE,TRUE)] # only standard deviations
Run the code above in your browser using DataLab