Commit 12cf1e54 authored by Gilles Kratzer's avatar Gilles Kratzer
Browse files

title capitalization + website

parent 57a3c7a6
Pipeline #2617 passed with stage
in 3 seconds
......@@ -8,7 +8,7 @@ Authors@R: c(person("Gilles", "Kratzer", role = c("aut", "cre"),
email = "reinhard.furrer@math.uzh.ch",
comment = c(ORCID = "0000-0002-6319-2332")))
Maintainer: Gilles Kratzer <gilles.kratzer@math.uzh.ch>
Description: Flexible implementation of a structural MCMC sampler for Directed Acyclic Graphs (DAGs). It supports the new edge reversal move from Grzegorczyk and Husmeier (2008) <doi:10.1007/s10994-008-5057-7> and the Markov blanket resampling from Su and Borsuk (2016) <http://jmlr.org/papers/v17/su16a.html>. It supports three priors: a prior controlling for structure complexity from Koivisto and Sood (2004) <http://dl.acm.org/citation.cfm?id=1005332.1005352>, 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.
Description: Flexible implementation of a structural MCMC sampler for Directed Acyclic Graphs (DAGs). It supports the new edge reversal move from Grzegorczyk and Husmeier (2008) <doi:10.1007/s10994-008-5057-7> and the Markov blanket resampling from Su and Borsuk (2016) <http://jmlr.org/papers/v17/su16a.html>. It supports three priors: a prior controlling for structure complexity from Koivisto and Sood (2004) <http://dl.acm.org/citation.cfm?id=1005332.1005352>, 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 us to quantify the marginal impact of relationships of interest by marginalizing out over structures or nuisance dependencies. Structural MCMC seems an 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.
Depends: R (>= 3.5.0)
License: GPL-3
Encoding: UTF-8
......
# mcmcabn: An R Package for sampling DAGs using structural MCMC
# mcmcabn: An R Package for Sampling Dags Using Structural MCMC
(PUBLIC) !!! UNSTABLE VERSION !!!
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.
mcmcabn is a one-man-show (me!) and made of more than 15'000 lines of code which are not bug free! So use it with caution and awareness.
## Installation
......@@ -13,6 +13,6 @@ Website: https://www.math.uzh.ch/pages/mcmcabn/
## Description
The package provides a flexible implementation of a structural MCMC sampler for Directed Acyclic Graphs (DAGs). It supports the new edge reversal move from Grzegorczyk and Husmeier (2008) <https://doi.org/10.1007/s10994-008-5057-7> and the Markov blanket resampling from Su and Borsuk (2016) <http://jmlr.org/papers/v17/su16a.html>. It supports three priors: a prior controlling for structure complexity from Koivisto and Sood (2004) <http://dl.acm.org/citation.cfm?id=1005332.1005352>, 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.
Flexible implementation of a structural MCMC sampler for Directed Acyclic Graphs (DAGs). It supports the new edge reversal move from Grzegorczyk and Husmeier (2008) <doi:10.1007/s10994-008-5057-7> and the Markov blanket resampling from Su and Borsuk (2016) <http://jmlr.org/papers/v17/su16a.html>. It supports three priors: a prior controlling for structure complexity from Koivisto and Sood (2004) <http://dl.acm.org/citation.cfm?id=1005332.1005352>, 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 us to quantify the marginal impact of relationships of interest by marginalizing out over structures or nuisance dependencies. Structural MCMC seems an 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.
## Future implementations (ordered by urgency)
......@@ -146,7 +146,7 @@
<ul>
<li><a href="mcmcabn-advanced.html">Advances with Mcmcabn: A Structural Mcmc Sampler for Dags Learned from Observed Systemic Datasets</a></li>
<li><a href="mcmcabn.html">mcmcabn: a structural MCMC sampler for DAGs learned from observed systemic datasets</a></li>
<li><a href="mcmcabn.html">mcmcabn: A Structural Mcmc Sampler for Dags Learned from Observed Systemic Datasets</a></li>
</ul>
</div>
</div>
......
......@@ -104,7 +104,7 @@
<h1>Advances with Mcmcabn: A Structural Mcmc Sampler for Dags Learned from Observed Systemic Datasets</h1>
<h4 class="author">Gilles Kratzer, Reinhard Furrer</h4>
<h4 class="date">2019-10-14</h4>
<h4 class="date">2019-11-06</h4>
<div class="hidden name"><code>mcmcabn-advanced.Rmd</code></div>
......
......@@ -5,12 +5,12 @@
<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>mcmcabn: a structural MCMC sampler for DAGs learned from observed systemic datasets • mcmcabn</title>
<title>mcmcabn: A Structural Mcmc Sampler for Dags Learned from Observed Systemic Datasets • 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="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script><meta property="og:title" content="mcmcabn: a structural MCMC sampler for DAGs learned from observed systemic datasets">
<script src="../pkgdown.js"></script><meta property="og:title" content="mcmcabn: A Structural Mcmc Sampler for Dags Learned from Observed Systemic Datasets">
<meta property="og:description" content="">
<meta name="twitter:card" content="summary">
<!-- 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]>
......@@ -101,7 +101,7 @@
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header toc-ignore">
<h1>mcmcabn: a structural MCMC sampler for DAGs learned from observed systemic datasets</h1>
<h1>mcmcabn: A Structural Mcmc Sampler for Dags Learned from Observed Systemic Datasets</h1>
<h4 class="author">Gilles Kratzer, Reinhard Furrer</h4>
<h4 class="date">2019-11-06</h4>
......
......@@ -153,13 +153,13 @@
}</pre>
<p>Kratzer G, Furrer R (2019).
<em>mcmcabn: a structural MCMC sampler for DAGs learned from observed systemic datasets</em>.
R package version 0.1, <a href="https://CRAN.R-project.org/package=mcmcabn">https://CRAN.R-project.org/package=mcmcabn</a>.
R package version 0.3, <a href="https://CRAN.R-project.org/package=mcmcabn">https://CRAN.R-project.org/package=mcmcabn</a>.
</p>
<pre>@Manual{,
title = {mcmcabn: a structural MCMC sampler for DAGs learned from observed systemic datasets},
author = {Gilles Kratzer and Reinhard Furrer},
year = {2019},
note = {R package version 0.1},
note = {R package version 0.3},
url = {https://CRAN.R-project.org/package=mcmcabn},
}</pre>
......
......@@ -11,7 +11,7 @@
<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 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 us to quantify the marginal impact of relationships of interest by marginalizing out over structures or nuisance dependencies. Structural MCMC seems an 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">
<!-- 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>
......@@ -105,10 +105,10 @@
<hr>
<div id="mcmcabn-a-structural-mcmc-sampler-for-dags-learned-from-observed-systemic-datasets" 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-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="quickstart" class="section level2">
<h2 class="hasAnchor">
<a href="#quick-start" class="anchor"></a>Quick start</h2>
<a href="#quickstart" class="anchor"></a>Quickstart</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"><a class="sourceLine" id="cb1-1" data-line-number="1"><span class="cf">if</span> (<span class="op">!</span><span class="kw"><a href="https://rdrr.io/r/base/ns-load.html">requireNamespace</a></span>(<span class="st">"BiocManager"</span>, <span class="dt">quietly =</span> <span class="ot">TRUE</span>))</a>
<a class="sourceLine" id="cb1-2" data-line-number="2"> <span class="kw"><a href="https://rdrr.io/r/utils/install.packages.html">install.packages</a></span>(<span class="st">"BiocManager"</span>)</a>
......@@ -121,12 +121,12 @@
<li>controlling for overfitting.</li>
<li>sampling the landscape of high scoring structures.</li>
</ul>
<p>The latter could be very useful in an applied perspective to avoid reducing the richeness of Bayesian network modelling to report only <strong>one</strong> structure. Indeed, it allows user 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.</p>
<p>The latter could be beneficial in an applied perspective to avoid reducing the richness of Bayesian network modeling to report only <strong>one</strong> structure. Indeed, it allows the user to quantify the marginal impact of relationships of interest by marginalizing 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.</p>
</div>
<div id="description" class="section level2">
<h2 class="hasAnchor">
<a href="#description" class="anchor"></a>Description</h2>
<p>mcmcabn is a flexible implementation of a structural MCMC sampler for Directed Acyclic Graphs (DAGs). It supports the new edge reversal move from Grzegorczyk and Husmeier (2008) <a href="https://doi.org/10.1007/s10994-008-5057-7" class="uri">https://doi.org/10.1007/s10994-008-5057-7</a> and the Markov blanket resampling from Su and Borsuk (2016) <a href="http://jmlr.org/papers/v17/su16a.html" class="uri">http://jmlr.org/papers/v17/su16a.html</a>. It supports three priors: a prior controlling for structure complexity from Koivisto and Sood (2004) <a href="http://dl.acm.org/citation.cfm?id=1005332.1005352" class="uri">http://dl.acm.org/citation.cfm?id=1005332.1005352</a>, 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.</p>
<p>Flexible implementation of a structural MCMC sampler for Directed Acyclic Graphs (DAGs). It supports the new edge reversal move from Grzegorczyk and Husmeier (2008) <a href="doi:10.1007/s10994-008-5057-7" class="uri">doi:10.1007/s10994-008-5057-7</a> and the Markov blanket resampling from Su and Borsuk (2016) <a href="http://jmlr.org/papers/v17/su16a.html" class="uri">http://jmlr.org/papers/v17/su16a.html</a>. It supports three priors: a prior controlling for structure complexity from Koivisto and Sood (2004) <a href="http://dl.acm.org/citation.cfm?id=1005332.1005352" class="uri">http://dl.acm.org/citation.cfm?id=1005332.1005352</a>, 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 us to quantify the marginal impact of relationships of interest by marginalizing out over structures or nuisance dependencies. Structural MCMC seems an 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.</p>
<hr>
</div>
<div id="whats-new" class="section level2">
......
......@@ -158,7 +158,7 @@
</ul>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='co'># \donttest{</span>
<pre class="examples"><div class='input'><span class='kw'>if</span> (<span class='fl'>FALSE</span>) {
<span class='co'>## This data set was generated using the following code:</span>
<span class='fu'><a href='https://rdrr.io/r/base/library.html'>library</a></span>(<span class='no'>bnlearn</span>) <span class='co'>#for the dataset</span>
<span class='fu'><a href='https://rdrr.io/r/base/library.html'>library</a></span>(<span class='no'>abn</span>) <span class='co'>#for the cache of scores computing function</span>
......@@ -174,7 +174,7 @@
<span class='kw'>prob.rev</span> <span class='kw'>=</span> <span class='fl'>0.03</span>,
<span class='kw'>prob.mbr</span> <span class='kw'>=</span> <span class='fl'>0.03</span>,
<span class='kw'>prior.choice</span> <span class='kw'>=</span> <span class='fl'>2</span>)
<span class='co'># }</span></div></pre>
}</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
......
......@@ -311,7 +311,7 @@
<span class='kw'>score</span> <span class='kw'>=</span> <span class='st'>"mlik"</span>,
<span class='kw'>data.dists</span> <span class='kw'>=</span> <span class='no'>dist.asia</span>,
<span class='kw'>max.parents</span> <span class='kw'>=</span> <span class='fl'>2</span>,
<span class='kw'>mcmc.scheme</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>100</span>,<span class='fl'>0</span>,<span class='fl'>0</span>),
<span class='kw'>mcmc.scheme</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>50</span>,<span class='fl'>0</span>,<span class='fl'>0</span>),
<span class='kw'>seed</span> <span class='kw'>=</span> <span class='fl'>42</span>,
<span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>start.dag</span> <span class='kw'>=</span> <span class='st'>"random"</span>,
......@@ -321,29 +321,29 @@
<span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>mcmc.out.asia.small</span>)</div><div class='output co'>#&gt; MCMC summary:
#&gt; Number of burn-in steps: 0
#&gt; Number of MCMC steps: 100
#&gt; Number of MCMC steps: 50
#&gt; Thinning: 0
#&gt;
#&gt; Maximum score: -11191.14
#&gt; Empirical mean: -11657.76
#&gt; Empirical standard deviation: 973.5608
#&gt; Maximum score: -11417.26
#&gt; Empirical mean: -12059.94
#&gt; Empirical standard deviation: 1246.151
#&gt; Quantiles of the posterior network score:
#&gt; 0.025 0.25 0.5 0.75 0.975
#&gt; BN score -15238.37 -11426.29 -11422.29 -11193.67 -11191.14
#&gt; BN score -15238.37 -11605.14 -11426.29 -11422.29 -11417.26
#&gt;
#&gt;
#&gt; Global acceptance rate: 0.1980198
#&gt; Global acceptance rate: 0.2745098
#&gt; Accepted Rejected
#&gt; MC3 20 81
#&gt; MC3 14 37
#&gt;
#&gt;
#&gt; Sample size adjusted for autocorrelation: 4.625765
#&gt; Sample size adjusted for autocorrelation: 2.392305
#&gt;
#&gt; Autocorrelations by lag:
#&gt; 0 1 2 3 4 5 6 7
#&gt; acf 1 0.9115666 0.8232014 0.7162509 0.6092764 0.5204256 0.4313169 0.3309841
#&gt; 8 9 10
#&gt; acf 0.2299462 0.1679331 0.105142</div><div class='input'>
#&gt; 0 1 2 3 4 5 6 7
#&gt; acf 1 0.9086424 0.8173277 0.7033488 0.5893406 0.4926758 0.3957062 0.285035
#&gt; 8 9 10
#&gt; acf 0.1735033 0.1034769 0.0325007</div><div class='input'>
<span class='co'># Defining a starting DAG</span>
<span class='no'>startDag</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/matrix.html'>matrix</a></span>(<span class='kw'>data</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0</span>, <span class='fl'>0</span>, <span class='fl'>0</span>, <span class='fl'>1</span>, <span class='fl'>0</span>, <span class='fl'>0</span>, <span class='fl'>0</span>, <span class='fl'>0</span>,
<span class='fl'>0</span>, <span class='fl'>0</span>, <span class='fl'>1</span>, <span class='fl'>0</span>, <span class='fl'>0</span>, <span class='fl'>0</span>, <span class='fl'>0</span>, <span class='fl'>0</span>,
......
......@@ -161,7 +161,7 @@
</ul>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='co'># \donttest{</span>
<pre class="examples"><div class='input'><span class='kw'>if</span> (<span class='fl'>FALSE</span>) {
<span class='co'>## This data set was generated using the following code:</span>
<span class='fu'><a href='https://rdrr.io/r/base/library.html'>library</a></span>(<span class='no'>bnlearn</span>) <span class='co'>#for the dataset</span>
<span class='fu'><a href='https://rdrr.io/r/base/library.html'>library</a></span>(<span class='no'>abn</span>) <span class='co'>#for the cache of score function</span>
......@@ -201,7 +201,7 @@
<span class='kw'>prob.rev</span> <span class='kw'>=</span> <span class='fl'>0.03</span>,
<span class='kw'>prob.mbr</span> <span class='kw'>=</span> <span class='fl'>0.03</span>,
<span class='kw'>prior.choice</span> <span class='kw'>=</span> <span class='fl'>2</span>)
<span class='co'># }</span></div></pre>
}</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
......
......@@ -6,9 +6,9 @@
___
# mcmcabn: a structural MCMC sampler for DAGs learned from observed systemic datasets
# mcmcabn: A Structural Mcmc Sampler for Dags Learned from Observed Systemic Datasets
## Quick start
## Quickstart
To install `mcmabn` you need two R packages: [abn](https://CRAN.R-project.org/package=abn) and [gRbase](https://CRAN.R-project.org/package=gRbase) which requires libraries not stored on [CRAN](https://cran.r-project.org/) but on [bioconductor](http://www.bioconductor.org/). Hence you **must** install these packages **before** installing `mcmcabn`:
......@@ -26,11 +26,11 @@ The three main problems addressed by this R package are:
- controlling for overfitting.
- sampling the landscape of high scoring structures.
The latter could be very useful in an applied perspective to avoid reducing the richeness of Bayesian network modelling to report only **one** structure. Indeed, it allows user 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.
The latter could be beneficial in an applied perspective to avoid reducing the richness of Bayesian network modeling to report only **one** structure. Indeed, it allows the user to quantify the marginal impact of relationships of interest by marginalizing 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.
## Description
mcmcabn is a flexible implementation of a structural MCMC sampler for Directed Acyclic Graphs (DAGs). It supports the new edge reversal move from Grzegorczyk and Husmeier (2008) <https://doi.org/10.1007/s10994-008-5057-7> and the Markov blanket resampling from Su and Borsuk (2016) <http://jmlr.org/papers/v17/su16a.html>. It supports three priors: a prior controlling for structure complexity from Koivisto and Sood (2004) <http://dl.acm.org/citation.cfm?id=1005332.1005352>, 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.
Flexible implementation of a structural MCMC sampler for Directed Acyclic Graphs (DAGs). It supports the new edge reversal move from Grzegorczyk and Husmeier (2008) <doi:10.1007/s10994-008-5057-7> and the Markov blanket resampling from Su and Borsuk (2016) <http://jmlr.org/papers/v17/su16a.html>. It supports three priors: a prior controlling for structure complexity from Koivisto and Sood (2004) <http://dl.acm.org/citation.cfm?id=1005332.1005352>, 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 us to quantify the marginal impact of relationships of interest by marginalizing out over structures or nuisance dependencies. Structural MCMC seems an 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.
___
......
......@@ -13,9 +13,9 @@ citEntry(entry = "Manual",
title = "mcmcabn: a structural MCMC sampler for DAGs learned from observed systemic datasets",
author = personList(as.person("Gilles Kratzer"), as.person("Reinhard Furrer")),
year = "2019",
note = "R package version 0.1",
note = "R package version 0.3",
url = "https://CRAN.R-project.org/package=mcmcabn",
textVersion =
paste("Kratzer, G. and Furrer, R. (2019). mcmcabn: a structural MCMC sampler for DAGs learned from observed systemic datasets. R package version 0.1.
paste("Kratzer, G. and Furrer, R. (2019). mcmcabn: a structural MCMC sampler for DAGs learned from observed systemic datasets. R package version 0.3.
https://CRAN.R-project.org/package=mcmcabn"),
)
......@@ -15,7 +15,7 @@
}}
\examples{
\donttest{
\dontrun{
## This data set was generated using the following code:
library(bnlearn) #for the dataset
library(abn) #for the cache of scores computing function
......
......@@ -128,7 +128,7 @@ mcmc.out.asia.small <- mcmcabn(score.cache = bsc.compute.asia,
score = "mlik",
data.dists = dist.asia,
max.parents = 2,
mcmc.scheme = c(100,0,0),
mcmc.scheme = c(50,0,0),
seed = 42,
verbose = FALSE,
start.dag = "random",
......
......@@ -19,7 +19,7 @@
}}
\examples{
\donttest{
\dontrun{
## This data set was generated using the following code:
library(bnlearn) #for the dataset
library(abn) #for the cache of score function
......
No preview for this file type
---
title: "Advances with Mcmcabn: A Structural Mcmc Sampler for Dags Learned from Observed Systemic Datasets"
author: "Gilles Kratzer, Reinhard Furrer"
date: "2019-10-14"
date: "2019-11-06"
---
```{r setup, include = FALSE, cache = FALSE}
......
---
title: "mcmcabn: a structural MCMC sampler for DAGs learned from observed systemic datasets"
title: "mcmcabn: A Structural Mcmc Sampler for Dags Learned from Observed Systemic Datasets"
author: "Gilles Kratzer, Reinhard Furrer"
date: "2019-11-06"
output: rmarkdown::html_vignette
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment