This repository contains python code necessary to replicated the experiments performed in our paper "Invariant Ancestry Search"

Overview

InvariantAncestrySearch

This repository contains python code necessary to replicated the experiments performed in our paper "Invariant Ancestry Search".

Structure of the repository

The repository is structured in the following manner:

  • In the folder /InvariantAncestrySearch there are two important files:
    • utils.py contains a class DataGenerator which we use for sampling SCMs and data from said sampled SCMs. This, can for instance be done by the sequence
    from InvariantAncestrySearch import DataGenerator
    
    SCM1 = DataGenerator(d = 10, N_interventions = 5, p_conn = 2 / 10, InterventionStrength = 1) # This is an SCM generator
    SCM1.SampleDAG()  # Generates a DAG with d = 10 predictor nodes, 5 interventions and roughly d + 1 edges between the (d + 1)-sized subgraph of (X, Y)
    SCM1.BuildCoefMatrix  # Samples coefficients for the linear assignments -- interventions have strength 1
    data1 = SCM1.MakeData(100)  # Generates 100 samples from SCM1
    
    SCM2 = DataGenerator(d = 6, N_interventions = 1, p_conn = 2 / 6, InterventionStrength = 0.5) # And this is also an SCM generator
    SCM2.SampleDAG()  # Generates a DAG with d = 6 predictor nodes, 1 intervention and roughly d + 1 edges between the (d + 1)-sized subgraph of (X, Y)
    SCM2.BuildCoefMatrix  # Samples coefficients for the linear assignments -- interventions have strength 1
    data2 = SCM2.MakeData(1000)  # Generates 1000 samples from SCM2
    
    • IASfunctions.py includes all relevant functions used in the scripts, e.g., to test for minimal invariance or compute the set of all minimally invariant sets. All functions are documentated.
  • In the folder /simulation_scripts there are scripts to reproduce all experiments performed in the paper. These too documentation inside them. The functions run out-of-the-box, if all necessary libraries are installed and do not need to be run in a certain order.
  • In the folder /output/ there are database files, saved from running the scripts in /simulation_scripts/. These contain the data used to make all figures in the paper and can be opened with the python library shelve.
  • The file requirements.txt contains info on which modules are required to run the code. Note also that an R installation is required as well as the R package dagitty
Owner
Phillip Bredahl Mogensen
I'm Phillip Bredahl Mogensen, a Ph.D. student in statistics at the University of Copenhagen
Phillip Bredahl Mogensen
Data pipelines for both TensorFlow and PyTorch!

rapidnlp-datasets Data pipelines for both TensorFlow and PyTorch ! If you want to load public datasets, try: tensorflow/datasets huggingface/datasets

1 Dec 08, 2021
Code for 2021 NeurIPS --- Towards Multi-Grained Explainability for Graph Neural Networks

ReFine: Multi-Grained Explainability for GNNs This is the official code for Towards Multi-Grained Explainability for Graph Neural Networks (NeurIPS 20

Shirley (Ying-Xin) Wu 47 Dec 16, 2022
gym-anm is a framework for designing reinforcement learning (RL) environments that model Active Network Management (ANM) tasks in electricity distribution networks.

gym-anm is a framework for designing reinforcement learning (RL) environments that model Active Network Management (ANM) tasks in electricity distribution networks. It is built on top of the OpenAI G

Robin Henry 99 Dec 12, 2022
Pytorch implementation of Implicit Behavior Cloning.

Implicit Behavior Cloning - PyTorch (wip) Pytorch implementation of Implicit Behavior Cloning. Install conda create -n ibc python=3.8 pip install -r r

Kevin Zakka 49 Dec 25, 2022
A very tiny, very simple, and very secure file encryption tool.

Picocrypt is a very tiny (hence "Pico"), very simple, yet very secure file encryption tool. It uses the modern ChaCha20-Poly1305 cipher suite as well

Evan Su 1k Dec 30, 2022
The repository contains source code and models to use PixelNet architecture used for various pixel-level tasks. More details can be accessed at .

PixelNet: Representation of the pixels, by the pixels, and for the pixels. We explore design principles for general pixel-level prediction problems, f

Aayush Bansal 196 Aug 10, 2022
The official implementation of NeurIPS 2021 paper: Finding Optimal Tangent Points for Reducing Distortions of Hard-label Attacks

The official implementation of NeurIPS 2021 paper: Finding Optimal Tangent Points for Reducing Distortions of Hard-label Attacks

machen 11 Nov 27, 2022
Improving Object Detection by Label Assignment Distillation

Improving Object Detection by Label Assignment Distillation This is the official implementation of the WACV 2022 paper Improving Object Detection by L

Cybercore Co. Ltd 51 Dec 08, 2022
Open CV - Convert a picture to look like a cartoon sketch in python

Use the video https://www.youtube.com/watch?v=k7cVPGpnels for initial learning.

Sammith S Bharadwaj 3 Jan 29, 2022
This repository contains a set of codes to run (i.e., train, perform inference with, evaluate) a diarization method called EEND-vector-clustering.

EEND-vector clustering The EEND-vector clustering (End-to-End-Neural-Diarization-vector clustering) is a speaker diarization framework that integrates

45 Dec 26, 2022
Pytorch Implementation of Interaction Networks for Learning about Objects, Relations and Physics

Interaction-Network-Pytorch Pytorch Implementraion of Interaction Networks for Learning about Objects, Relations and Physics. Interaction Network is a

117 Nov 05, 2022
MonoScene: Monocular 3D Semantic Scene Completion

MonoScene: Monocular 3D Semantic Scene Completion MonoScene: Monocular 3D Semantic Scene Completion] [arXiv + supp] | [Project page] Anh-Quan Cao, Rao

298 Jan 08, 2023
Multi-Task Learning as a Bargaining Game

Nash-MTL Official implementation of "Multi-Task Learning as a Bargaining Game". Setup environment conda create -n nashmtl python=3.9.7 conda activate

Aviv Navon 87 Dec 26, 2022
PyTorch implementations of the beta divergence loss.

Beta Divergence Loss - PyTorch Implementation This repository contains code for a PyTorch implementation of the beta divergence loss. Dependencies Thi

Billy Carson 7 Nov 09, 2022
Unofficial PyTorch implementation of MobileViT.

MobileViT Overview This is a PyTorch implementation of MobileViT specified in "MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Tr

Chin-Hsuan Wu 348 Dec 23, 2022
Y. Zhang, Q. Yao, W. Dai, L. Chen. AutoSF: Searching Scoring Functions for Knowledge Graph Embedding. IEEE International Conference on Data Engineering (ICDE). 2020

AutoSF The code for our paper "AutoSF: Searching Scoring Functions for Knowledge Graph Embedding" and this paper has been accepted by ICDE2020. News:

AutoML Research 64 Dec 17, 2022
Generalized Data Weighting via Class-level Gradient Manipulation

Generalized Data Weighting via Class-level Gradient Manipulation This repository is the official implementation of Generalized Data Weighting via Clas

18 Nov 12, 2022
Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT or GBM) Library, for Python, R, Java, Scala, C++ and more. Runs on single machine, Hadoop, Spark, Dask, Flink and DataFlow

eXtreme Gradient Boosting Community | Documentation | Resources | Contributors | Release Notes XGBoost is an optimized distributed gradient boosting l

Distributed (Deep) Machine Learning Community 23.6k Dec 31, 2022
Read number plates with https://platerecognizer.com/

HASS-plate-recognizer Read vehicle license plates with https://platerecognizer.com/ which offers free processing of 2500 images per month. You will ne

Robin 69 Dec 30, 2022
Awesome Transformers in Medical Imaging

This repo supplements our Survey on Transformers in Medical Imaging Fahad Shamshad, Salman Khan, Syed Waqas Zamir, Muhammad Haris Khan, Munawar Hayat,

Fahad Shamshad 666 Jan 06, 2023