Giter Site home page Giter Site logo

polytree's Introduction

   

Documentation Status Maintenance License: GPL v3

Optimal Estimation of Gaussian (Poly)trees

This is an implementation of the following paper: "Optimal Estimation of Gaussian (Poly)trees".

Introduction

We develop optimal algorithms for learning undirected Gaussian trees and directed Gaussian polytrees from data. We consider both problems of distribution learning (i.e. in KL distance) and structure learning (i.e. exact recovery).

  1. [Chow-Liu algorithm] The first approach is based on the Chow-Liu algorithm, and learns an optimal tree-structured distribution efficiently.
  2. [PC-tree] The second approach is a modification of the PC algorithm for polytrees that uses partial correlation as a conditional independence tester for constraint-based structure learning. We derive explicit finite-sample guarantees for both approaches, and show that both approaches are optimal by deriving matching lower bounds.

Prerequisites

  • Python 3.6+
    • argpase
    • numpy
    • pandas
    • scipy
    • sklearn
    • networkx
    • tqdm
    • causallearn
    • Tetrad

Contents

  • data.py - generate synthetic data.
  • config.py - simulation parameters.
  • evaluate.py - performance evauation
  • main.py - main algorihtm.
  • method.py- including mutual information tester, chow-liu tree algorithm, and pc-tree algorithm

Parameters

Parameter Type Description Options
n int number of samples -
d int number of variables -
tg str type of graph (default: random tree) -

Running a simple demo

The simplest way to try out Polytree is to run a simple example:

$ git clone https://github.com/YohannaWANG/Polytree.git
$ cd Polytree/
$ python $ cd Polytree/main.py

Runing as a command

Alternatively, you can install the package and run the algorithm as a command:

$ pip install git+git://github.com/YohannaWANG/Polytree
$ cd Polytree
$ python main.py --d 100 --n 1000 

Performance comparison

SHD PRR
characterization characterization

polytree's People

Contributors

yohannawang avatar

Watchers

 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.