API: Interacting with YLearn

All-in-one API

Class Name

Description

Why

An API which encapsulates almost everything in YLearn, such as identifying causal effects and scoring a trained estimator model. It provides to users a simple and efficient way to use YLearn.

Causal Structures Discovery

Class Name

Description

CausalDiscovery

Find causal structures in observational data.

Causal Model

Class Name

Description

CausalGraph

Express the causal structures and support other operations related to causal graph, e.g., add and delete edges to the graph.

CausalModel

Encode causations represented by the CausalGraph. Mainly support causal effect identification, e.g., backdoor adjustment.

Prob

Represent the probability distribution.

Estimator Models

Class Name

Description

GRForest

A highly flexible nonparametric estimator (Generalized Random Forest, GRF) model which supports both discrete and continuous treatment. The unconfoundedness condition is required.

CausalForest

A generalized random forest combined with the local centering technique (i.e. double machine learning framework). The unconfoundedness condition is required.

CTCausalForest

A causal forest as an ensemble of a bunch of CausalTree. Similar to the CausalTree, the treatment should be binary. The unconfoundedness condition is required.

ApproxBound

A model used for estimating the upper and lower bounds of the causal effects. This model does not need the unconfoundedness condition.

CausalTree

A class for estimating causal effect with decision tree. The unconfoundedness condition is required.

DeepIV

Instrumental variables with deep neural networks. Must provide the names of instrumental variables.

NP2SLS

Nonparametric instrumental variables. Must provide the names of instrumental variables.

DoubleML

Double machine learning model for the estimation of CATE. The unconfoundedness condition is required.

DoublyRobust and PermutedDoublyRobust

Doubly robust method for the estimation of CATE. The permuted version considers all possible treatment-control pairs. The unconfoundedness condition is required and the treatment must be discrete.

SLearner and PermutedSLearner

SLearner. The permuted version considers all possible treatment-control pairs. The unconfoundedness condition is required and the treatment must be discrete.

TLearner and PermutedTLearner

TLearner with multiple machine learning models. The permuted version considers all possible treatment-control pairs. The unconfoundedness condition is required and the treatment must be discrete.

XLearner and PermutedXLearner

XLearner with multiple machine learning models. The permuted version considers all possible treatment-control pairs. The unconfoundedness condition is required and the treatment must be discrete.

RLoss

Effect score for measuring the performances of estimator models. The unconfoundedness condition is required.

Policy

Class Name

Description

PolicyTree

A class for finding the optimal policy for maximizing the causal effect with the tree model.

Interpreter

Class Name

Description

CEInterpreter

An object used to interpret the estimated CATE using the decision tree model.

PolicyInterpreter

An object used to interpret the policy given by some PolicyModel.