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

update with source

parent f8cf2153
Pipeline #2474 passed with stage
in 2 seconds
<!-- README.md is generated from README.Rmd. Please edit that file -->
# mcmcabn: An R Package for sampling DAGs using structural MCMC
[![](https://www.r-pkg.org/badges/version-ago/mcmcabn)](http://cran.rstudio.com/web/packages/mcmcabn/index.html)
[![Downloads](http://cranlogs.r-pkg.org/badges/grand-total/mcmcabn)](http://cran.rstudio.com/web/packages/mcmcabn/index.html)
[![Downloads](http://cranlogs.r-pkg.org/badges/mcmcabn)](http://cran.rstudio.com/web/packages/mcmcabn/index.html)
[![License: GPL
v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0)
(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: a structural MCMC sampler for DAGs learned from observed systemic datasets
## Installation
## Quick start
`install.packages("https://git.math.uzh.ch/gkratz/mcmcabn/raw/master/mcmcabn_0.3.tar.gz", repo=NULL, type="source")`
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`:
CRAN: https://CRAN.R-project.org/package=mcmcabn
Website: https://www.math.uzh.ch/pages/mcmcabn/
``` r
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install(c("RBGL","Rgraphviz","graph"), version = "3.8")
install.packages("mcmcabn", dependencies = TRUE)
```
The three main problems addressed by this R package are:
- selecting the most probable structure based on a cache of
pre-computed scores.
- 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.
## 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.
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.
-----
## What’s New
- 08/03/2019 - mcmcabn is available on CRAN (v 0.1)
- 18/02/2019 - new pre-print [Is a single unique Bayesian network
enough to accurately represent your
data?](https://arxiv.org/pdf/1902.06641.pdf) on arXiv
- 01/07/2019 - mcmcabn 0.2 available on CRAN
-----
## Future implementations (ordered by urgency)
**`mcmcabn` is developed and maintained by [Gilles
Kratzer](https://gilleskratzer.netlify.com/) and [Prof. Dr. Reinhard
Furrer](https://user.math.uzh.ch/furrer/) from [Applied Statistics
Group](https://www.math.uzh.ch/as/index.php?id=as) from the University
of Zurich.**
......@@ -88,27 +88,48 @@
</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">
<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-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">
<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">
<h2 class="hasAnchor">
<a href="#installation" class="anchor"></a>Installation</h2>
<p><code><a href="https://rdrr.io/r/utils/install.packages.html">install.packages("https://git.math.uzh.ch/gkratz/mcmcabn/raw/master/mcmcabn_0.3.tar.gz", repo=NULL, type="source")</a></code></p>
<p>CRAN: <a href="https://CRAN.R-project.org/package=mcmcabn" class="uri">https://CRAN.R-project.org/package=mcmcabn</a> Website: <a href="https://www.math.uzh.ch/pages/mcmcabn/" class="uri">https://www.math.uzh.ch/pages/mcmcabn/</a></p>
<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"><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>
<a class="sourceLine" id="cb1-3" data-line-number="3">BiocManager<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/BiocManager/man/install.html">install</a></span>(<span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"RBGL"</span>,<span class="st">"Rgraphviz"</span>,<span class="st">"graph"</span>), <span class="dt">version =</span> <span class="st">"3.8"</span>)</a>
<a class="sourceLine" id="cb1-4" data-line-number="4"></a>
<a class="sourceLine" id="cb1-5" data-line-number="5"><span class="kw"><a href="https://rdrr.io/r/utils/install.packages.html">install.packages</a></span>(<span class="st">"mcmcabn"</span>, <span class="dt">dependencies =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
<p>The three main problems addressed by this R package are:</p>
<ul>
<li>selecting the most probable structure based on a cache of pre-computed scores.</li>
<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>
</div>
<div id="description" class="section level2">
<h2 class="hasAnchor">
<a href="#description" class="anchor"></a>Description</h2>
<p>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) <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>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>
<hr>
</div>
<div id="future-implementations-ordered-by-urgency" class="section level2">
<div id="whats-new" class="section level2">
<h2 class="hasAnchor">
<a href="#future-implementations-ordered-by-urgency" class="anchor"></a>Future implementations (ordered by urgency)</h2>
<a href="#whats-new" class="anchor"></a>What’s New</h2>
<ul>
<li><p>08/03/2019 - mcmcabn is available on CRAN (v 0.1)</p></li>
<li><p>18/02/2019 - new pre-print <a href="https://arxiv.org/pdf/1902.06641.pdf">Is a single unique Bayesian network enough to accurately represent your data?</a> on arXiv</p></li>
<li><p>01/07/2019 - mcmcabn 0.2 available on CRAN</p></li>
</ul>
<hr>
<p><strong><code>mcmcabn</code> is developed and maintained by <a href="https://gilleskratzer.netlify.com/">Gilles Kratzer</a> and <a href="https://user.math.uzh.ch/furrer/">Prof. Dr. Reinhard Furrer</a> from <a href="https://www.math.uzh.ch/as/index.php?id=as">Applied Statistics Group</a> from the University of Zurich.</strong></p>
</div>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
......@@ -142,7 +163,16 @@
</ul>
</div>
</div>
<div class="dev-status">
<h2>Dev status</h2>
<ul class="list-unstyled">
<li><a href="http://cran.rstudio.com/web/packages/mcmcabn/index.html"><img src="https://www.r-pkg.org/badges/version-ago/mcmcabn"></a></li>
<li><a href="http://cran.rstudio.com/web/packages/mcmcabn/index.html"><img src="http://cranlogs.r-pkg.org/badges/grand-total/mcmcabn" alt="Downloads"></a></li>
<li><a href="http://cran.rstudio.com/web/packages/mcmcabn/index.html"><img src="http://cranlogs.r-pkg.org/badges/mcmcabn" alt="Downloads"></a></li>
<li><a href="http://www.gnu.org/licenses/gpl-3.0"><img src="https://img.shields.io/badge/License-GPL%20v3-blue.svg" alt="License: GPL v3"></a></li>
</ul>
</div>
</div>
</div>
......
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