Skip to content

An R package for learning context-specific causal models, called CStrees, based on observational, or a mix of observational and interventional, data.

License

Notifications You must be signed in to change notification settings

soluslab/CStrees

Repository files navigation

CStrees

A package for learning an optimal CStree representative of the context-specific causal structure of a data-generating distribution given either observational and/or (general) interventional data.

The file CStrees.R contains code for constructing and learning CStrees and interventional CStrees from data via optimizing penalized maximum likelihood estimates, such as the Bayesian Information Criterion (BIC). These methods score every CStree on the given number of variables. The file CStree_simulations.R contains a greedy backwards hill-climbing algorithm that learns a BIC-optimal CStree by iteratively merging stages to optimally increase the BIC score. In its current form, it learns the BIC-optimal CStree for each causal ordering of the variables and then picks the highest scoring model. This method can learn sparse CStrees on a larger number of variables than the non-greedy version available in the CStrees.R file. The file CStree_simulations.R also contains code for generating random binary staged trees and CStrees with specified expected sparsity and sampling from their distributions. The file mice.R contains an example of these functions applied to a mice protein expression data set available at the UCI Machine Learning Repository. Additional examples are included directly in the CStrees.R and CStree_simulations.R files.

About

An R package for learning context-specific causal models, called CStrees, based on observational, or a mix of observational and interventional, data.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages