API Reference
CaML Core
from caml import *
Core functionality of CaML for estimating causal effects with cross-sectional data.
CamlCATE | The CamlCATE class represents an opinionated framework of Causal Machine Learning techniques for estimating highly accurate conditional average treatment effects (CATEs). |
FastOLS | FastOLS is an optimized implementation of the OLS estimator designed specifically with treatment effect estimation in mind. |
Synthetic Data Generation
from caml.extensions.synthetic_data import *
Synthetic data generation utilities for CaML.
SyntheticDataGenerator | Generate highly flexible synthetic data for use in causal inference and CaML testing. |
make_partially_linear_dataset_simple | Simulate data generating process from a partially linear model with a simple 1 or 2 dimensional CATE function. |
make_partially_linear_dataset_constant | Simulate a data generating process from a partially linear model with a constant treatment effect (ATE only). |
make_fully_heterogeneous_dataset | Simulate data generating process from an interactive regression model with fully heterogenous treatment effects. |
Plots
from caml.extensions.plots import *
Plotting utilities for CaML.
cate_histogram_plot | Plots a histogram the estimated CATEs. |
cate_line_plot | Plots a line plot of the ordered estimated CATEs as a rolling mean with optional confidence intervals. |
cate_true_vs_estimated_plot | Plots a scatter plot of the estimated CATEs against the true CATEs. |
Developer Tools
Developer tools for CaML.
generics.experimental | Decorator to mark functions or classes as experimental. |
generics.timer | Decorator to measure the execution time of a function or method, logged at DEBUG level. |
generics.maybe_jit | Decorator to JIT compile a function using JAX, if available. |
generics.PandasConvertibleDataFrame | Protocol for DataFrame-like objects that are pandas convertible. |
logging.configure_logging | Configure logging for the entire application. |
logging.set_log_level | Change the logging level after initial configuration. |