GithubHelp home page GithubHelp logo

felixleopoldo / dncdagger Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 8.9 MB

Optimizing Bayesian networks score by pruning node orderings.

License: Apache License 2.0

Dockerfile 0.53% C++ 64.36% R 34.56% Makefile 0.34% Shell 0.14% C 0.07%

dncdagger's Introduction

License

About The Project

The D&C order pruner is an exact structure learning algorithm for Bayesian networks, operating on the space of topological orders and using a divide and conquer technique.

Getting Started

Clone the repository and make

git clone https://github.com/felixleopoldo/dncpruner.git

Easiest way to run the algorithms is to build a Docker image from the Docker file and run the algorithm in a container.

Docker

    $ docker build . -t dnc

Run the container and mount the current directory, with the repo

    $ docker run -w /mnt -v $(pwd):/mnt -it dnc

Inside the container run

make

Now follow the instructions below

Native

Requirements

  • Boost 1.82.0 C++ library

R packages

  • RInside
  • Rcpp
  • Jmisc
  • argparser
  • igraph
  • BiDAG 2.0.0

For plotting:

  • ggplot2
  • dplyr
  • latex2exp
  • patchwork

Installation

After cloning th repo, type make

make

(back to top)

Usage

To run the algorithm with the data file data/p20n300gaussdata.csv type

./dncpruner --filename data/asiadata.csv --scoretype bge --am 0.1 --aw NULL --output_csv dag_adjmat.csv

The estimate dag is then as an adjacency matrix in the CSV file dag_adjmat.csv. If M_ij=1 in the adjacency matrix, then there is an edge i->j in the DAG.

Benchmarks

To generate benchmarks (with the setting specified in R/benchmark_dncpruner.R) type

Rscript R/benchmark_dncpruner.R --output_dir results --filename res.csv --seeds_from 1 --seeds_to 5

This produces joined results in the file res.csv which can be analysed by typing

source('R/plotting.R')

(back to top)

License

Distributed under the Apache 2.0 License. See LICENSE.txt for more information.

(back to top)

dncdagger's People

Contributors

felixleopoldo avatar rocafuerte avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.