Hi Stackoverflow users,
I'm trying to use the bnlearn package in R to learn the structure of a Bayes Net, however my training data is incomplete. When I try to fit a baynes net using any learning algorithm gs(), hc()... i get an error message.
Does anyone know how I can get around this problem? It seems there isn't a suitable alternative package in R that can deal with missing data yet.
> wildelakedata[wildelakedata==9999]<-NA
> wildelakedata[1:10,]
Install.Yr Hist Eco PWA Anom SF
1 1968 1 4 0 NA NA
2 1968 1 4 0 NA NA
3 1968 1 4 1 NA NA
4 1968 1 4 1 NA NA
5 1968 1 4 1 NA NA
6 1968 1 4 1 NA NA
7 1968 1 4 0 NA NA
8 1968 1 4 0 NA NA
9 1968 1 4 1 NA NA
10 1968 1 4 0 NA NA
> BN<-hc(wildelakedata)
Error in check.data(x) : the data set contains NULL/NaN/NA values.
Thomas