I'm trying to use hill-climbing function hc()
in bnlearn package .
Despite that all columns of my data frame are factor and carry no NA values, I still kept getting such error message:
Error in hill.climbing(x = x, start = start, whitelist = whitelist, blacklist = blacklist, :
INTEGER() can only be applied to a 'integer', not a 'NULL'
The following is my hc function code.
hcdata<-hc(data, score = "bic" )
hcdatafit <- bn.fit(hcdata, train)
What might cause this problem? Thanks!