BN Learn Error

BN Learn Error

Postby rpazo001 » Wed Jun 14, 2023 2:30 pm

Here is the error I keep getting. The data = RATBN and the network is BN13a. Compile comes from the "gRain" package.


library("tidyverse")
library("bnlearn")
library("gRain")

#### Class BN
> class(Bn13a)
[1] "bn"
>
> class(RATBN)
[1] "data.frame"
>
> ### Create Equation
> bn.bayes<-bn.fit(Bn13a,data=RATBN,method="bayes",iss=1)
>
> ### Compile data
> junction <-compile(as.grain(bn.bayes))
Error in str2lang(x) : <text>:1:10: unexpected input
1: ~ 1375689_
^
rpazo001
 
Posts: 58
Joined: Fri May 29, 2020 12:34 pm

Return to R package for Bayesian network structure learning (BNlearn)

Who is online

Users browsing this forum: No registered users and 19 guests