R会话中止,R使用bnlearn遇到致命错误

问题描述

我正在尝试通过gs算法使用bnlearn进行结构学习。下面是一个reprex,第一个示例在其中工作,输出"BP" "CO" "CCHL"作为警报数据集的马尔可夫覆盖。第二个示例包含我的数据集的dput,这将杀死我的R会话,如标题中所述。我已经在两个不同的环境(一个是在全新安装的环境)中对此进行了测试,所以我不相信重置RStudio可以解决问题(通常建议这样做)。

我应该从这里去哪里?

# Import library - if not already installed: install.packages("bnlearn")
library("bnlearn")

# Working example of learning a markov blanket by GS ----
data("alarm")
data.info = bnlearn:::check.data(alarm,allow.missing = TRUE)
complete=data.info$complete.nodes
g<-bnlearn:::gs.markov.blanket(
  x="TPR",data=alarm,nodes=names(alarm),whitelist = NULL,blacklist = NULL,test="mi",alpha = 0.05,B=0L,complete=complete,max.sx = ncol(alarm)
)
g

# broken example using a portion of my data ----
flexibo = structure(list(core1_status = structure(c(1L,1L,1L),.Label = c("0","1"),class = "factor"),core2_status = structure(c(1L,core3_status = structure(c(1L,core_freq = c(1113600,1113600,1113600),gpu_freq = c(1300500000,1300500000,1300500000),emc_freq = c(1062400000,1331200000,1.6e+09,1.866e+09),inference_time_tx2_inceptionv3_200x200 = c(0.225589222378201,0.214755137761434,0.207686079872979,0.196737554338243),inference_time_tx2_inceptionv3_400x400 = c(0.24062548743354,0.228842682308621,0.216423908869425,0.209609985351563),inference_time_tx2_inceptionv3_600x600 = c(0.396523714065552,0.317007541656494,0.31098911497328,0.304014258914524),inference_time_tx2_inceptionv3_800x800 = c(0.638514121373495,0.576082282596164,0.525318622589111,0.489617533153958),inference_time_tx2_xception_200x200 = c(0.181074645784166,0.164963987138536,0.175967693328857,0.150462971793281),inference_time_tx2_xception_400x400 = c(0.260576195187039,0.230662610795763,0.209879769219293,0.20272265540229),inference_time_tx2_xception_600x600 = c(0.538474798202515,0.476561334398058,0.452916807598538,0.438972314198812),inference_time_tx2_xception_800x800 = c(0.938906934526232,0.82663533422682,0.791404538684421,0.755376815795898)),row.names = c(NA,4L),class = "data.frame")

# Grow Shrink (GS) crashes R with flexibo 
flexibo.info = bnlearn:::check.data(flexibo,allow.missing = TRUE)
g<-bnlearn:::gs.markov.blanket(
  x="TPR",data=flexibo,nodes=names(flexibo),complete=flexibo.info$complete.nodes,max.sx = ncol(flexibo)
)

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)