My question is about baysian theory. I want to predict probability of each class by naive bayes. In my case ,class is three (YES,NO,UNKNOWN), and prior probability is almost same (0.33,0.33.0.34). However, Data does not include one class (UNKNOWN). Can I get the posterior probability by using naive bayes? I do not know whether my thinking is incorrect or code is incorrect. Please teach me.
This is my sample code.
library(e1071)
library(naivebayes)
random<-floor(abs(rnorm(1000,mean=0,sd=50)))%%2+1
class<-c('YES','NO','UNKNOWN')
random<-class[random]
randmat<-as.data.frame(matrix(rnorm(4000,mean=0,sd=1),nrow=1000))
dataset<-cbind(randmat,random)
dataset$random<-factor(dataset$random,levels=c(levels(dataset$random),'UNKNOWN'))
Naive_Bayes_Model<-naive_bayes(random~., data=dataset,prior=c(0.33,0.33,0.34))
NB_Predictions<-predict(Naive_Bayes_Model,dataset,type='prob')
head(NB_Predictions)