Commit f8cf2153 authored by Gilles Kratzer's avatar Gilles Kratzer
Browse files

update v.0.3

parent ff33db7c
Pipeline #2473 passed with stage
in 3 seconds
......@@ -8,4 +8,4 @@
## mcmcabn 0.3:
* update mcmcabn to make it compatible with constraints imported from the cache of scores
* update mcmcabn to make it compatible with constraints imported from the cache of scores. Heating parameter to increase or decrease acceptance probability.
MBR <- function(n.var, dag.tmp, retain, ban, max.parents, sc,sc.scaled, score.cache, score, verbose) {
MBR <- function(n.var, dag.tmp, retain, ban, max.parents, sc, score.cache, score, verbose, heating) {
## scores
score.G <- 0
......@@ -195,8 +195,8 @@ if(FALSE){
#score.A <- ( z.i.G.0 / z.star.i.G.prime.0 * sum(is.finite(score.G)) / sum(is.finite(score.G.prime)))
#score.A <- n.edges/n.edges.tilde * ((z.star.x.i.M.dot) / (z.star.x.j.M.dot) * (z.x.j.M.cross) / (z.x.i.M.tilde.cross))
s.proposed <- score.dag(dag.MBR,score.cache,sc.scaled)
s.current <- score.dag(dag.tmp,score.cache,sc.scaled)
s.proposed <- score.dag(dag.MBR,score.cache,sc)
s.current <- score.dag(dag.tmp,score.cache,sc)
A <- min(exp(( s.proposed - s.current) * (n.edges/n.edges.tilde) ), 1)
......@@ -205,7 +205,7 @@ if(FALSE){
# A <- min(1, score.A)
if (runif(1)<A) {
if (runif(1)<(A**heating)) {
rejection <- 0
dag.tmp <- dag.MBR
......
REV <- function(n.var, dag.tmp, retain, ban, max.parents, sc,sc.scaled, score.cache, score, verbose) {
REV <- function(n.var, dag.tmp, retain, ban, max.parents, sc, score.cache, score, verbose, heating) {
rejection <- 1
A <- 0
......@@ -105,8 +105,8 @@ REV <- function(n.var, dag.tmp, retain, ban, max.parents, sc,sc.scaled, score.ca
############################## Acceptance probability
#score.A <- min(exp((z.star.x.i.M.dot / (z.star.x.j.M.dot) * (z.x.j.M.cross) / (z.x.i.M.tilde.cross))*n.edges/n.edges.tilde),1)
s.proposed <- score.dag(dag.M.tilde,score.cache,sc.scaled)
s.current <- score.dag(dag.tmp,score.cache,sc.scaled)
s.proposed <- score.dag(dag.M.tilde,score.cache,sc)
s.current <- score.dag(dag.tmp,score.cache,sc)
A <- min(exp(( s.proposed - s.current) * (n.edges/n.edges.tilde) ), 1)
......@@ -117,7 +117,7 @@ REV <- function(n.var, dag.tmp, retain, ban, max.parents, sc,sc.scaled, score.ca
#A <- min(1, score.A)
#if (rbinom(n = 1, size = 1, prob = A) == 1) {
if (runif(1)<A){
if (runif(1)<(A**heating)) {
rejection <- 0
dag.tmp <- dag.M.tilde
score <- score.dag(dag.M.tilde,score.cache,sc)
......
mc3 <- function(n.var, dag.tmp, retain, ban, max.parents, sc,sc.scaled, score.cache, score, prior.choice, prior.lambda, prior.dag, verbose, scaling.factor) {
mc3 <- function(n.var, dag.tmp, retain, ban, max.parents, sc, score.cache, score, prior.choice, prior.lambda, prior.dag, verbose, heating) {
## construction of neighbours list
neighbours.list <- NULL
......@@ -141,8 +141,8 @@ mc3 <- function(n.var, dag.tmp, retain, ban, max.parents, sc,sc.scaled, score.ca
}
score.Gprime.scaled <- score.dag(dag.gprime,score.cache,sc.scaled)
score.G.scaled <- score.dag(dag.tmp,score.cache,sc.scaled)
score.Gprime.scaled <- score.dag(dag.gprime,score.cache,sc)
score.G.scaled <- score.dag(dag.tmp,score.cache,sc)
alpha <- min(exp(( score.Gprime.scaled - score.G.scaled) * (n.G/n.Gprime) * (prior.Gprime/prior.G)), 1)
......@@ -150,7 +150,7 @@ mc3 <- function(n.var, dag.tmp, retain, ban, max.parents, sc,sc.scaled, score.ca
score <- score.G
if (!is.null(dag.gprime) && runif(1)<alpha) {
if (!is.null(dag.gprime) && runif(1)<(alpha**heating)) {
dag.tmp <- dag.gprime
score <- score.Gprime
rejection <- 0
......
......@@ -5,13 +5,13 @@
##-------------------------------------------------------------------------
mcmcabn <- function(score.cache = NULL, score = "mlik", data.dists = NULL, max.parents = 1, mcmc.scheme = c(100, 1000,
1000), seed = 42, verbose = FALSE, start.dag = NULL, prior.dag = NULL, prior.lambda = NULL, prob.rev = 0.05, prob.mbr = 0.05, scaling = 0,
1000), seed = 42, verbose = FALSE, start.dag = NULL, prior.dag = NULL, prior.lambda = NULL, prob.rev = 0.05, prob.mbr = 0.05, heating = 1,
prior.choice = 2) {
#################################################### Tests
.tests.mcmcabn(score.cache, data.dists, max.parents, mcmc.scheme, seed, verbose, start.dag, prior.dag, prior.lambda,
prob.rev, prob.mbr, prior.choice,scaling)
prob.rev, prob.mbr, prior.choice,heating)
## end of tests
......@@ -123,11 +123,11 @@ mcmcabn <- function(score.cache = NULL, score = "mlik", data.dists = NULL, max.p
sc <- cbind(tmp, score.cache[[score]])
}
sc.scaled <- sc
tmp.fact <- abs(max(sc[,ncol(sc)]))
if(scaling>0){
sc.scaled[,ncol(sc)] <- sc[,ncol(sc)]/(scaling * tmp.fact)
}
# sc.scaled <- sc
# tmp.fact <- abs(max(sc[,ncol(sc)]))
# if(scaling>0){
# sc.scaled[,ncol(sc)] <- sc[,ncol(sc)]/(scaling * tmp.fact)
# }
## scoring init
......@@ -166,22 +166,22 @@ mcmcabn <- function(score.cache = NULL, score = "mlik", data.dists = NULL, max.p
#if(heating=="auto"){factor <- 1/(j+1)}
switch(method.choice, MC3 = {
out <- mc3(n.var, (dag.tmp), retain, ban, max.parents, sc,sc.scaled, score.cache, score, prior.choice, prior.lambda, prior.dag,
verbose)
out <- mc3(n.var, (dag.tmp), retain, ban, max.parents, sc, score.cache, score, prior.choice, prior.lambda, prior.dag,
verbose, heating)
dag.tmp <- out$dag.tmp
score <- out$score
}, REV = {
if (verbose) {
print("REV move")
}
out <- REV(n.var, (dag.tmp),retain, ban, max.parents, sc,sc.scaled, score.cache, score, verbose)
out <- REV(n.var, (dag.tmp),retain, ban, max.parents, sc, score.cache, score, verbose, heating)
dag.tmp <- out$dag.tmp
score <- out$score
}, MBR = {
if (verbose) {
print("MBR move")
}
out <- MBR(n.var, dag.tmp,retain, ban, max.parents, sc,sc.scaled, score.cache, score, verbose)
out <- MBR(n.var, dag.tmp,retain, ban, max.parents, sc, score.cache, score, verbose, heating)
dag.tmp <- out$dag.tmp
score <- out$score
})
......@@ -207,8 +207,8 @@ mcmcabn <- function(score.cache = NULL, score = "mlik", data.dists = NULL, max.p
method.choice <- sample(x = c("MC3", "REV", "MBR"), size = 1, prob = c(prob.mc3, prob.rev, prob.mbr))
switch(method.choice, MC3 = {
out <- mc3(n.var, (dag.tmp), retain, ban, max.parents, sc,sc.scaled, score.cache, score, prior.choice, prior.lambda, prior.dag,
verbose)
out <- mc3(n.var, (dag.tmp), retain, ban, max.parents, sc, score.cache, score, prior.choice, prior.lambda, prior.dag,
verbose, heating)
dag.tmp <- out$dag.tmp
score <- out$score
alpha <- out$alpha
......@@ -217,7 +217,7 @@ mcmcabn <- function(score.cache = NULL, score = "mlik", data.dists = NULL, max.p
if (verbose) {
print("REV move")
}
out <- REV(n.var, (dag.tmp),retain, ban, max.parents, sc,sc.scaled, score.cache, score, verbose)
out <- REV(n.var, (dag.tmp),retain, ban, max.parents, sc, score.cache, score, verbose, heating)
dag.tmp <- out$dag.tmp
score <- out$score
alpha <- out$alpha
......@@ -226,7 +226,7 @@ mcmcabn <- function(score.cache = NULL, score = "mlik", data.dists = NULL, max.p
if (verbose) {
print("MBR move")
}
out <- MBR(n.var, (dag.tmp), retain, ban, max.parents, sc,sc.scaled, score.cache, score, verbose)
out <- MBR(n.var, (dag.tmp), retain, ban, max.parents, sc, score.cache, score, verbose, heating)
dag.tmp <- out$dag.tmp
score <- out$score
alpha <- out$alpha
......
......@@ -5,7 +5,7 @@
##-------------------------------------------------------------------------
.tests.mcmcabn <- function(score.cache, data.dists, max.parents, mcmc.scheme, seed, verbose, start.dag, prior.dag, prior.lambda,
prob.rev, prob.mbr, prior.choice,scaling) {
prob.rev, prob.mbr, prior.choice,heating) {
# start tests
if (is.null(score.cache))
stop("A cache of score should be provided. You can produce it using the R package abn.")
......@@ -55,12 +55,11 @@
if (is.matrix(prior.dag) && dim(prior.dag)[1] != length(data.dists))
stop("prior.dag should be a squared matrix with dimension equal to the number of variables.")
if(scaling<0)
stop("heating parameter shoud be between zero and one. Zero corresponds to a lower probability of accepting a lower score proposal. One corresponds to a larger probability of accepting a lowering of the score (values higher than one are possible but very unlikely to produce meaningful (or helpful) results.).")
if(heating<0 | !is.numeric(heating))
stop("heating parameter shoud be between a positive real number. One is neutral. Smaller than one is heating up and larger than one is cooling down the convergence rate.")
}
##-------------------------------------------------------------------------
## Internal function that call multiple times strsplit() and remove space
##-------------------------------------------------------------------------
......
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Page not found (404) • mcmcabn</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="https://www.math.uzh.ch/pages/mcmcabn//pkgdown.css" rel="stylesheet">
<script src="https://www.math.uzh.ch/pages/mcmcabn//pkgdown.js"></script>
<meta property="og:title" content="Page not found (404)" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-title-body">
<header>
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="https://www.math.uzh.ch/pages/mcmcabn//index.html">mcmcabn</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.3</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fa fa-home"></span>
</a>
</li>
<li>
<a href="articles/mcmcabn.html">Vignette</a>
</li>
<li>
<a href="news/index.html">
<span class="fa fa-newspaper-o"></span>
news
</a>
</li>
<li>
<a href="reference/index.html">
<span class="fa fa-file-code-o"></span>
functions
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://git.math.uzh.ch/gkratz/mcmcabn">
<span class="fa fa-gitlab fa-lg"></span>
gitlab
</a>
</li>
<li>
<a href="http://twitter.com/GillesKratzer">
<span class="fa fa-lg fa-twitter"></span>
twitter
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="contents col-md-9">
<div class="page-header">
<h1>Page not found (404)</h1>
</div>
Content not found. Please use links in the navbar.
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by <a href='https://gilleskratzer.netlify.com/'>Gilles Kratzer</a>.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>
......@@ -8,21 +8,25 @@
<title>Articles • mcmcabn</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
......@@ -30,10 +34,12 @@
<meta property="og:title" content="Articles" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
......@@ -44,6 +50,7 @@
<![endif]-->
</head>
<body>
......@@ -90,7 +97,6 @@
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://git.math.uzh.ch/gkratz/mcmcabn">
......@@ -113,6 +119,7 @@
</div><!--/.navbar -->
</header>
<div class="row">
......@@ -132,19 +139,23 @@
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by <a href='https://gilleskratzer.netlify.com/'>Gilles Kratzer</a>.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>
This diff is collapsed.
......@@ -8,21 +8,25 @@
<title>Citation and Authors • mcmcabn</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="pkgdown.css" rel="stylesheet">
......@@ -30,10 +34,12 @@
<meta property="og:title" content="Citation and Authors" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
......@@ -44,6 +50,7 @@
<![endif]-->
</head>
<body>
......@@ -90,7 +97,6 @@
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://git.math.uzh.ch/gkratz/mcmcabn">
......@@ -113,6 +119,7 @@
</div><!--/.navbar -->
</header>
<div class="row">
......@@ -143,17 +150,18 @@ R package version 0.1, <a href="https://CRAN.R-project.org/package=mcmcabn">http
note = {R package version 0.1},
url = {https://CRAN.R-project.org/package=mcmcabn},
}</pre>
<div class="page-header">
<h1>Authors</h1>
</div>
<ul class="list-unstyled">
<li>
<p><strong><a href='https://gilleskratzer.netlify.com/'>Gilles Kratzer</a></strong>. Author, maintainer. <a href='https://orcid.org/0000-0002-5929-8935' target='orcid.widget'><img src='https://members.orcid.org/sites/default/files/vector_iD_icon.svg' class='orcid' alt='ORCID' height='16'></a>
<p><strong><a href='https://gilleskratzer.netlify.com/'>Gilles Kratzer</a></strong>. Author, maintainer. <a href='https://orcid.org/0000-0002-5929-8935' target='orcid.widget'><img src='https://members.orcid.org/sites/default/files/vector_iD_icon.svg' class='orcid' alt='ORCID'></a>
</p>
</li>
<li>
<p><strong><a href='https://user.math.uzh.ch/furrer/'>Reinhard Furrer</a></strong>. Contributor. <a href='https://orcid.org/0000-0002-6319-2332' target='orcid.widget'><img src='https://members.orcid.org/sites/default/files/vector_iD_icon.svg' class='orcid' alt='ORCID' height='16'></a>
<p><strong><a href='https://user.math.uzh.ch/furrer/'>Reinhard Furrer</a></strong>. Contributor. <a href='https://orcid.org/0000-0002-6319-2332' target='orcid.widget'><img src='https://members.orcid.org/sites/default/files/vector_iD_icon.svg' class='orcid' alt='ORCID'></a>
</p>
</li>
</ul>
......@@ -163,19 +171,23 @@ R package version 0.1, <a href="https://CRAN.R-project.org/package=mcmcabn">http
</div>
<footer>
<div class="copyright">
<p>Developed by <a href='https://gilleskratzer.netlify.com/'>Gilles Kratzer</a>.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>
......@@ -7,8 +7,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Flexible Implementation of a Structural MCMC Sampler for DAGs • mcmcabn</title>
<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous">
<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script><!-- sticky kit --><script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script><!-- pkgdown --><link href="pkgdown.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous">
<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="pkgdown.css" rel="stylesheet">
<script src="pkgdown.js"></script><meta property="og:title" content="Flexible Implementation of a Structural MCMC Sampler for DAGs">
<meta property="og:description" content="Flexible implementation of a structural MCMC sampler for Directed Acyclic Graphs (DAGs). It supports the new edge reversal move from Grzegorczyk and Husmeier (2008) &lt;doi:10.1007/s10994-008-5057-7&gt; and the Markov blanket resampling from Su and Borsuk (2016) &lt;http://jmlr.org/papers/v17/su16a.html&gt;. It supports three priors: a prior controlling for structure complexity from Koivisto and Sood (2004) &lt;http://dl.acm.org/citation.cfm?id=1005332.1005352&gt;, an uninformative prior and a user defined prior. The three main problems that can be addressed by this R package are selecting the most probable structure based on a cache of pre-computed scores, controlling for overfitting and sampling the landscape of high scoring structures. It allows to quantify the marginal impact of relationships of interest by marginalising out over structures or nuisance dependencies. Structural MCMC seems a very elegant and natural way to estimate the true marginal impact, so one can determine if it's magnitude is big enough to consider as a worthwhile intervention.">
<meta name="twitter:card" content="summary">
......@@ -18,7 +19,7 @@
<![endif]-->
</head>
<body>
<div class="container template-article">
<div class="container template-home">
<header><div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
......@@ -84,51 +85,28 @@
<!--/.navbar -->
</header><div class="row">
<div class="col-md-9 contents">
<!-- README.md is generated from README.Rmd. Please edit that file -->
<hr>
<div id="mcmcabn-a-structural-mcmc-sampler-for-dags-learned-from-observed-systemic-datasets" class="section level1">
</header><div class="row">
<div class="contents col-md-9">
<div id="mcmcabn-an-r-package-for-sampling-dags-using-structural-mcmc" class="section level1">
<div class="page-header"><h1 class="hasAnchor">
<a href="#mcmcabn-a-structural-mcmc-sampler-for-dags-learned-from-observed-systemic-datasets" class="anchor"></a>mcmcabn: a structural MCMC sampler for DAGs learned from observed systemic datasets</h1></div>
<div id="quick-start" class="section level2">
<a href="#mcmcabn-an-r-package-for-sampling-dags-using-structural-mcmc" class="anchor"></a>mcmcabn: An R Package for sampling DAGs using structural MCMC</h1></div>
<p>(PUBLIC) !!! UNSTABLE VERSION !!!</p>
<p>mcmcabn is a one-man-show (me!) and made of more than 10’000 lines of code which are not bug free! So use it with caution and awareness.</p>
<div id="installation" class="section level2">
<h2 class="hasAnchor">
<a href="#quick-start" class="anchor"></a>Quick start</h2>
<p>To install <code>mcmabn</code> you need two R packages: <a href="https://CRAN.R-project.org/package=abn">abn</a> and <a href="https://CRAN.R-project.org/package=gRbase">gRbase</a> which requires libraries not stored on <a href="https://cran.r-project.org/">CRAN</a> but on <a href="http://www.bioconductor.org/">bioconductor</a>. Hence you <strong>must</strong> install these packages <strong>before</strong> installing <code>mcmcabn</code>:</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"