Giter Site home page Giter Site logo

pdag's Introduction

PDAG

This contains all the simulation code for PDAG. The main function used in generating the tables is located in simulations.R. This requires installation of the partitionDAG package, which in turn requires the pdagDFS package. To install these packages, please type the following commands into R:

install.packages("devtools")
library(devtools)
install_github("shr264/pdagDFS")
install_github("shr264/partitionDAG")

Files

A few of the key files in this repo include:

  • amat.Rdata
  • data_generating_functions.R
  • metric_functions.R
  • simulations.R
  • pDag_dairy_cattle_data.pdf
  • pDag_dairy_cattle_data.Rmd

Details on key Files

amat.Rdata

This file contains the adjacency matrices for Yeast1, Yeast2, Yeast3, Ecoli1, Ecoli2 from the DREAM3 challenge.

data_generating_functions.R

This file contains the files to generate the true covariance matrix according the various adjacency matrices incluiding those from the DREAM3 challenge as well as random DAGs.

metric_functions.R

This file contains functions that calculate various metrics of interest, especially the macro-averaged AUC for DAGs.

simulations.R

This file contains the code to generate the simulations reported in the paper.

pDag_dairy_cattle_data.Rmd

This file contains the code to conduct the analysis of the dairy cattle data.

pDag_dairy_cattle_data.pdf

This file contains the output for the analysis of the dairy cattle data.

Example

To generate all the data for the tables, open up bash and type:

Rscript simulations.R

In particular, the lines that generates Table 1 are:

# Table 1
values = expand.grid(
  list(
    Methods = c('pcalg_custom','ccdr_paper_t','partial2','pcalg_addBG2', 
                'partial2_t',
                'pcalg_addBG2_t','lingam_custom','pcalg_custom_par','pcalg_custom_stable'),
    nlambda = c(30),
    Btypes = c('genB_mult_Yeast1','genB_mult_Yeast2','genB_mult_Yeast3',
              'genB_mult_Ecoli1','genB_mult_Ecoli2'),
    Ns = c(40,50,100,200),
    Seeds = 1:10,
    m = c(2),
    m1 = c(25)), stringsAsFactors = FALSE)


table1 = mcmapply(get_metrics_by_method, method=values$Methods, nlambda=values$nlambda, Btype=values$Btypes, n=values$Ns, seed=values$Seeds, m=values$m, m1=values$m1,
                  mc.cores=ncores)

Python version

The Python version and related code is available at https://github.com/shr264/pyPDAG.

Authors

Syed Rahman

pdag's People

Contributors

shr264 avatar

Watchers

James Cloos 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.