下载此文档

使用r语言的bnlearn包实现贝叶斯网络.doc


文档分类:IT计算机 | 页数:约27页 举报非法文档有奖
1/27
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/27 下载此文档
文档列表 文档介绍
------------------------------------------------------------------------------------------------ ——————————————————————————————————————使用 R 语言的 BNLearn 包实现贝叶斯网络标签:生活 2013-08-01 22:26 星期四 1. 加载程序包导入数据 library(bnlearn) #CRAN 中有,可以直接用 ( “ bnlearn ”) 安装或者去网上下载后复制到 library 文件夹下即可。 library(Rgraphviz) # 用于绘图。这个包 CRAN 中没有,需要到 kages/release/#___Sof twa re 去下载。 data() # 导入数据, 数据框中的变量必须全部为因子型(离散)或数值型(连续)。 =("***.csv", colClasses ="factor") # 也可以直接从 csv 文件直接导入数据。需要注意的是如果数据中含有 0-1 之类的布尔型, 或者 1-3 之类的等级数据, 需要强行指定其为因子型, 不然许多BN 函数会报错。因为 rea d 函数只会自动的将字符型转换成因子型, 其他的不会自动转换。该包包含贝叶斯网络的结构学习、参数学习和推理三个方面的功能, 其中结构学习包含基于约束的算法、基于得分的算法和混合算法, 参数学习包括最大似然估计和贝叶斯估计两种方法。此外还有引导( bootstrap ) ,交叉验证( cross-validation )和随机模拟( stochastic ------------------------------------------------------------------------------------------------ —————————————————————————————————————— simulation )等功能,附加的绘图功能需要调用前述的 Rgraphviz and lattice 包。 work structure learning (via constraint-based, score-based and hybrid algorithms), parameter learning (via ML and Bayesian estimators) and inference. This package implements some algorithms for learning the structure of works. Constraint-based algorithms, also known as conditional independence learners, are all optimized derivatives of the Inductive Causation algorithm (Verma and Pearl, 1991). These algorithms use conditional independence tests to detect the Markov blankets of the variables, which in turn are used pute the structure of the work. Score-based learning algorithms are general purpose heuristic optimization algorithms which work structures with respect toa goodness-of-fit score. Hybrid bine aspects of both constraint-based and score-based algorithms, as they use conditional independence tests (usually to reduce the search space) work scores (to find the work in the reduced space) at the same time. Several functions for parameter estimation, parametric inference, bootstrap, cross-validation and stochastic simulat

使用r语言的bnlearn包实现贝叶斯网络 来自淘豆网m.daumloan.com转载请标明出处.

非法内容举报中心
文档信息
  • 页数27
  • 收藏数0 收藏
  • 顶次数0
  • 上传人wz_198614
  • 文件大小33 KB
  • 时间2017-06-04
最近更新