16771 109

[貝葉斯專著]Bayesian Networks in R: with Applications in Systems Biology   [推广有奖]

  • 0关注
  • 10粉丝

教授

8%

还不是VIP/贵宾

-

TA的文库  其他...

Must-Read Book

Winrats NewOccidental

Matlab NewOccidental

威望
1
论坛币
30854 个
通用积分
2.6638
学术水平
96 点
热心指数
43 点
信用等级
79 点
经验
9658 点
帖子
287
精华
10
在线时间
40 小时
注册时间
2013-12-14
最后登录
2024-4-12

相似文件 换一批

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币


Bayesian Networks in R: with Applications in Systems Biology

Radhakrishnan Nagarajan (Author), Marco Scutari (Author), Sophie Lèbre (Author)





Book Description[size=0.86em]Publication Date: May 7 2013 | ISBN-10: 1461464455 | ISBN-13: 978-1461464457 | Edition: 2013
Bayesian Networks in R with Applications in Systems Biology is unique as it introduces the reader to the essential concepts in Bayesian network modeling and inference in conjunction with examples in the open-source statistical environment R. The level of sophistication is also gradually increased across the chapters with exercises and solutions for enhanced understanding for hands-on experimentation of the theory and concepts. The application focuses on systems biology with emphasis on modeling pathways and signaling mechanisms from high-throughput molecular data. Bayesian networks have proven to be especially useful abstractions in this regard. Their usefulness is especially exemplified by their ability to discover new associations in addition to validating known ones across the molecules of interest. It is also expected that the prevalence of publicly available high-throughput biological data sets may encourage the audience to explore investigating novel paradigms using the approaches presented in the book.

Product Details
  • Paperback: 157 pages
  • Publisher: Springer; 2013 edition (May 7 2013)
  • Language: English
  • ISBN-10: 1461464455
  • ISBN-13: 978-1461464457
  • Product Dimensions: 0.9 x 15.4 x 23 cm
  • Shipping Weight: 222 g

本帖隐藏的内容

Bayesian Networks in R.with Applications in Systems Biology Springer 2013.pdf (3.21 MB, 需要: 100 个论坛币)





二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:Applications Application Networks Bayesian Biology essential concepts examples network

已有 1 人评分论坛币 学术水平 热心指数 收起 理由
crystal8832 + 36 + 2 + 2 奖励积极上传好的资料

总评分: 论坛币 + 36  学术水平 + 2  热心指数 + 2   查看全部评分

本帖被以下文库推荐

沙发
tmdxyz 发表于 2014-7-14 02:54:34 |只看作者 |坛友微信交流群
  1. install.packages("bnlearn")
  2. library(bnlearn)
  3. data(lizards)
  4. lizards = read.table("lizards.txt", header = TRUE)

  5. #-----------------------------------------------------------------------------#

  6. str(lizards)
  7. summary(lizards)
  8. dim(lizards)
  9. levels(lizards[, "Species"])
  10. levels(lizards[, "Height"])
  11. levels(lizards[, "Diameter"])
  12. table(lizards[, c(3,2,1)])

  13. #-----------------------------------------------------------------------------#

  14. Sagrei.lizards = lizards[lizards$Species == "Sagrei", ]
  15. Distichus.lizards = lizards[lizards$Species == "Distichus", ]
  16. par(mfrow = c(2, 2))
  17. plot(Sagrei.lizards[, "Height"], main = "Perch Height (Sagrei)")
  18. plot(Distichus.lizards[, "Height"], main = "Perch Height (Distichus)")
  19. plot(Sagrei.lizards[, "Diameter"], main = "Perch Diameter (Sagrei)")
  20. plot(Distichus.lizards[, "Diameter"], main = "Perch Diameter (Distichus)")

  21. #-----------------------------------------------------------------------------#

  22. set.seed(42)
  23. diam = numeric(length = nrow(lizards))
  24. narrow = (lizards$Diameter == "narrow")
  25. wide = (lizards$Diameter == "wide")
  26. diam[narrow] = runif(n = 252, min = 2, max = 4)
  27. diam[wide] = runif(n = 157, min = 4, max = 6)
  28. new.data = data.frame(
  29.              Species = lizards[, "Species"],
  30.              Sim.Diameter = diam)


  31. #-----------------------------------------------------------------------------#

  32. summary(new.data[, "Sim.Diameter"])
  33. is.sagrei = (new.data$Species == "Sagrei")
  34. summary(new.data[is.sagrei, "Sim.Diameter"])
  35. summary(new.data[!is.sagrei, "Sim.Diameter"])
  36. var(new.data[is.sagrei, "Sim.Diameter"])
  37. var(new.data[!is.sagrei, "Sim.Diameter"])

  38. #-----------------------------------------------------------------------------#

  39. boxplot(Sim.Diameter  ìƒ Species, data = new.data, ylab = "Diameter (inches)")
  40. abline(h = 4, lty = "dashed")
复制代码

已有 1 人评分论坛币 收起 理由
Nicolle + 20 精彩帖子

总评分: 论坛币 + 20   查看全部评分

使用道具

藤椅
Nicolle 学生认证  发表于 2014-7-14 03:06:15 |只看作者 |坛友微信交流群
提示: 作者被禁止或删除 内容自动屏蔽

使用道具

板凳
匿名网友  发表于 2014-7-14 03:08:03 |坛友微信交流群
Very helpful, I have been looking for similar reference for a while.
THanks.

使用道具

报纸
jinyizhe282 发表于 2014-7-14 04:29:39 |只看作者 |坛友微信交流群
  1. library(vars)
  2. data(Canada)
  3. VAR(Canada, p = 2)
  4. summary(VAR(Canada, p = 2))
  5. VAR(Canada, p = 2, type = "none")
  6. VAR(Canada, p = 2, type = "trend")
  7. VAR(Canada, p = 2, type = "both")
  8. VAR(Canada, lag.max = 4, ic = "AIC")
  9. VAR(Canada, lag.max = 4, ic = "SC")
  10. var.2c = VAR(Canada, p = 2, type = "const")
  11. stab = stability(var.2c, type = "OLS-CUSUM")
  12. plot(stab)
  13. normality.test(var.2c)
  14. normality.test(var.2c, multivariate.only = FALSE)
  15. serial.test(var.2c, lags.pt = 16, type = "PT.adjusted")
  16. arch.test(var.2c)
  17. arch.test(var.2c, multivariate.only = FALSE)

  18. #-----------------------------------------------------------------------------#

  19. library(lars)
  20. library(GeneNet)
  21. data(arth800)
  22. subset = c(60, 141, 260, 333, 365, 424, 441, 512, 521, 578, 789, 799)
  23. arth12 = arth800.expr[, subset]
  24. x = arth12[1:(nrow(arth12) - 2), ]     
  25. y = arth12[-(1:2), "265768_at"]      
  26. lasso.fit = lars(y = y, x = x, type = "lasso")
  27. fit.all = lapply(colnames(arth12),
  28.    function(gene) {
  29.      y = arth12[-(1:2), gene]
  30.      lars(y = y, x = x, type = "lasso")
  31.    })
  32. plot(lasso.fit)
  33. coef(lasso.fit)
  34. lasso.cv = cv.lars(y = y, x = x, mode = "fraction")
  35. frac = lasso.cv$index[which.min(lasso.cv$cv)]
  36. predict(lasso.fit, s = frac, type = "coef", mode = "fraction")
  37. predict(lasso.fit, s = 3, type = "coef", mode = "step")$coefficients
  38. predict(lasso.fit, s = 0.2, type = "coef", mode = "lambda")$coefficients
  39. lar.fit = lars(y = y, x = x, type = "lar")
  40. plot(lar.fit)
  41. lar.cv = cv.lars(y = y, x = x, type = "lar")
  42. step.fit = lars(y = y, x = x, type = "stepwise")
  43. plot(step.fit)
  44. step.cv = cv.lars(y = y, x = x, type = "stepwise")     

  45. #-----------------------------------------------------------------------------#

  46. library(simone)
  47. simone(arth12, type = "time-course")
  48. ctrl = setOptions(clusters.crit = "BIC")
  49. simone(arth12, type = "time-course", clustering = TRUE, control = ctrl)
  50. plot(simone(arth12, type = "time-course",
  51.        clustering = TRUE, control = ctrl), output = "BIC")
  52. plot(simone(arth12, type = "time-course",
  53.        clustering = TRUE, control = ctrl))

  54. #-----------------------------------------------------------------------------#

  55. library(GeneNet)
  56. dyn = ggm.estimate.pcor(arth800.expr, method = "dynamic")
  57. arth.arcs = network.test.edges(dyn)
  58. arth.net = extract.network(arth.arcs, method.ggm = "number", cutoff.ggm = 10)
  59. arth.net = extract.network(arth.arcs, method.ggm = "prob", cutoff.ggm = 0.05)

  60. #-----------------------------------------------------------------------------#

  61. library(G1DBN)
  62. data(arth800line)
  63. subset = c(60, 141, 260, 333, 365, 424, 441, 512, 521, 578, 789, 799)
  64. arth12 = as.matrix(arth800line[, subset])
  65. step1 = DBNScoreStep1(arth12, method = "ls")
  66. round(step1$S1ls, 2)[1:6, 1:6]
  67. edgesG1 = BuildEdges(score = step1$S1ls, threshold = 0.50,  prec = 6)
  68. nrow(edgesG1)
  69. step2 = DBNScoreStep2(step1$S1ls, data = arth12,
  70.        method = "ls", alpha1 = 0.50)
  71. edgesG = BuildEdges(score = step2, threshold = 0.05, prec = 6)

  72. #-----------------------------------------------------------------------------#

  73. library(ARTIVA)
  74. data(simulatedProfiles)
  75. targets = c("1", "10", "20", "TF3", "45", "50")
  76. parents = c("TF1", "TF2", "TF3", "TF4", "TF5")
  77. DBN = ARTIVAnet(
  78.         targetData = simulatedProfiles[targets, ],
  79.         parentData = simulatedProfiles[parents, ],
  80.         targetNames = targets,
  81.         parentNames = parents,
  82.         niter = 50000,
  83.         savePictures = FALSE)
  84. head(ARTIVAtest1[, -7])
复制代码

已有 1 人评分论坛币 收起 理由
Nicolle + 20 精彩帖子

总评分: 论坛币 + 20   查看全部评分

使用道具

地板
hanilichina 发表于 2014-7-14 04:33:23 |只看作者 |坛友微信交流群
  1. isachs = read.table("sachs.interventional.txt",
  2.            header = TRUE, colClasses = "factor")
  3. library(gRain)
  4. library(bnlearn)
  5. val.str = paste("[PKC][PKA|PKC][praf|PKC:PKA]",
  6.            "[pmek|PKC:PKA:praf][p44.42|pmek:PKA]",
  7.            "[pakts473|p44.42:PKA][P38|PKC:PKA]",
  8.            "[pjnk|PKC:PKA][plcg][PIP3|plcg]",
  9.            "[PIP2|plcg:PIP3]")
  10. val = model2network(val.str)
  11. isachs = isachs[, 1:11]
  12. for (i in names(isachs))
  13.   levels(isachs[, i]) = c("LOW", "AVG", "HIGH")
  14. fitted = bn.fit(val, isachs, method = "bayes")
  15. jtree = compile(as.grain(fitted))
  16. jprop = setFinding(jtree, nodes = "p44.42",
  17.           states = "LOW")
  18. querygrain(jtree, nodes = "pakts473")$pakts473
  19. querygrain(jprop, nodes = "pakts473")$pakts473
  20. querygrain(jtree, nodes = "PKA")$PKA
  21. querygrain(jprop, nodes = "PKA")$PKA
  22. names(which.max(querygrain(jprop,
  23.                     nodes = c("PKA"))$PKA))
  24. particles = cpdist(fitted, nodes = "pakts473",
  25.               evidence = (p44.42 == "LOW"))
  26. prop.table(table(particles))
  27. particles = cpdist(fitted, nodes = "PKA",
  28.               evidence = (p44.42 == "LOW"))
  29. prop.table(table(particles))
  30. cpquery(fitted,
  31.   event = (pakts473 == "LOW") & (PKA != "HIGH"),
  32.   evidence = (p44.42 == "LOW") | (praf == "LOW"))

  33. #-----------------------------------------------------------------------------#

  34. x = arth12[1:(nrow(arth12) - 2), ]
  35. y = arth12[-(1:2), "265768_at"]
  36. lasso.fit = lars(y = y, x = x, type = "lasso")
  37. lasso.cv = cv.lars(y = y, x = x, mode = "fraction")
  38. frac = lasso.cv$index[which.min(lasso.cv$cv)]
  39. lasso.est = predict(lasso.fit, type = "fit",
  40.               newx = x, s = frac,
  41.               mode = "fraction")$fit
  42. lasso.est
  43. lasso.pred = predict(lasso.fit, type = "fit",
  44.                newx = arth12[c("24-1", "24-2"), ],
  45.                s = frac, mode = "fraction")$fit
  46. lasso.pred
  47. library(penalized)
  48. lambda = optL1(response = y, penalized = x)$lambda
  49. lasso.t = penalized(response = y, penalized = x,
  50.             lambda1 = lambda)
  51. coef(lasso.t)
  52. dbn1 =
  53.   model2network("[245094_at][265768_at|245094_at]")
  54. xp.mean = mean(x[, "245094_at"])
  55. xp.sd = sd(x[, "245094_at"])
  56. dbn1.fit =
  57.   custom.fit(dbn1,
  58.     dist = list("245094_at" = list(coef = xp.mean,
  59.              sd = xp.sd), "265768_at" = lasso.t))
  60. cpquery(dbn1.fit, event = (`265768_at` > 8),
  61.                   evidence = (`245094_at` > 8))
  62. cpquery(dbn1.fit, event = (`265768_at` > 8),
  63.                   evidence = (`245094_at` < 8))
  64. dist.low = cpdist(dbn1.fit, node = "265768_at",
  65.              evidence = (`245094_at` < 8))
  66. dist.high = cpdist(dbn1.fit, node = "265768_at",
  67.               evidence = (`245094_at` > 8))
  68. y = arth12[-(1:2), "245094_at"]
  69. colnames(x)[12] = "245094_at1"
  70. lambda = optL1(response = y, penalized = x)$lambda
  71. lasso.s = penalized(response = y, penalized = x,
  72.              lambda1 = lambda)
  73. coef(lasso.s)
  74. dbn2 = empty.graph(c("265768_at", "245094_at",
  75.         "258736_at", "257710_at", "255070_at",
  76.         "245319_at", "245094_at1"))
  77. dbn2 = set.arc(dbn2, "245094_at", "265768_at")
  78. for (node in names(coef(lasso.s))[-c(1, 6)])
  79.   dbn2 = set.arc(dbn2, node, "245094_at")
  80. dbn2 = set.arc(dbn2, "245094_at1", "245094_at")
  81. dbn2.data = as.data.frame(x[, nodes(dbn2)[1:6]])
  82. dbn2.data[, "245094_at"] = y
  83. dbn2.data[, "245094_at1"] = x[, "245094_at"]
  84. dbn2.fit = bn.fit(dbn2, dbn2.data)
  85. dbn2.fit[["265768_at"]] = lasso.t
  86. dbn2.fit[["245094_at"]] = lasso.s
  87. cpquery(dbn2.fit, event = (`265768_at` > 8),
  88.   evidence = (`245094_at` > 8) & (`245094_at1` > 8))
  89. cpquery(dbn2.fit, event = (`265768_at` > 8),
  90. evidence = (`245094_at1` > 7) & (`245094_at1` < 8))
  91. cpquery(dbn2.fit, event = (`265768_at` > 8),
  92.   evidence = TRUE)
  93. cpd =
  94.   cpdist(dbn2.fit, node = "245094_at", evidence =
  95.     (`245094_at1` > 6.5) & (`245094_at1` < 7.5) &
  96.     (`265768_at` > 7) & (`265768_at` < 8))
  97. summary(cpd)
复制代码

已有 1 人评分论坛币 收起 理由
Nicolle + 20 精彩帖子

总评分: 论坛币 + 20   查看全部评分

使用道具

7
duoduoduo 在职认证  发表于 2014-7-14 10:28:46 |只看作者 |坛友微信交流群

Equivalence classes, moral graphs and consistent extensions

  1. Examples
  2. data(learning.test)
  3. res = gs(learning.test)
  4. cpdag(res)
  5. vstructs(res)
复制代码

已有 1 人评分论坛币 收起 理由
Nicolle + 20 精彩帖子

总评分: 论坛币 + 20   查看全部评分

使用道具

8
tlyy1996 发表于 2014-7-14 18:13:06 |只看作者 |坛友微信交流群

Perform conditional probability queries

  1. Examples
  2. ## discrete Bayesian network (it is the same with ordinal nodes).
  3. data(learning.test)
  4. fitted = bn.fit(hc(learning.test), learning.test)
  5. # the result should be around 0.025.
  6. cpquery(fitted, (B == "b"), (A == "a"))
  7. # for a single observation, predict the value of a single
  8. # variable conditional on the others.
  9. var = names(learning.test)
  10. obs = 2
  11. str = paste("(", names(learning.test)[-3], "=='",
  12. sapply(learning.test[obs,-3], as.character), "')",
  13. sep = "", collapse = " & ")
  14. str
  15. str2 = paste("(", names(learning.test)[3], "=='",
  16. as.character(learning.test[obs, 3]), "')", sep = "")
  17. str2
  18. cpquery(fitted, eval(parse(text = str2)), eval(parse(text = str)))
  19. # do the same with likelihood weighting
  20. cpquery(fitted, event = eval(parse(text = str2)),
  21. evidence = as.list(learning.test[2, -3]), method = "lw")
  22. # conditional distribution of A given C == "c".
  23. table(cpdist(fitted, "A", (C == "c")))
  24. ## Gaussian Bayesian network.
  25. data(gaussian.test)
  26. fitted = bn.fit(hc(gaussian.test), gaussian.test)
  27. # the result should be around 0.04.
  28. cpquery(fitted,
  29. event = ((A >= 0) & (A <= 1)) & ((B >= 0) & (B <= 3)),
  30. evidence = (C + D < 10))
复制代码

使用道具

9
tlyy1996 发表于 2014-7-14 18:14:14 |只看作者 |坛友微信交流群

Check whether two nodes are d-separated.

  1. Examples
  2. bn = model2network("[A][C|A][B|C]")
  3. dsep(bn, "A", "B", "C")
  4. bn = model2network("[A][C][B|A:C]")
  5. dsep(bn, "A", "B", "C")
复制代码

已有 1 人评分论坛币 收起 理由
Nicolle + 20 精彩帖子

总评分: 论坛币 + 20   查看全部评分

使用道具

10
Lisrelchen 发表于 2014-7-15 23:27:07 |只看作者 |坛友微信交流群

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-24 00:06