API Reference

This page lists the public econirl API. Each entry links to a page with the full signature, constructor parameters, attributes, and methods. Import paths match the listed name, for example from econirl import NFXP.

Core types

Problem specifications and panel data containers.

DDCProblem(num_states, num_actions[, ...])

Specification of a Dynamic Discrete Choice problem.

Panel

Trajectory(states, actions, next_states[, ...])

A single individual's observed decision trajectory.

TrajectoryPanel(trajectories[, metadata])

Enhanced panel with efficient tensor operations and DataFrame I/O.

RewardSpec(features, names[, n_actions])

Unified feature specification for structural estimation and IRL.

SufficientStats(state_action_counts, ...)

Pre-computed statistics for tabular estimators.

Structural estimators

Linear-utility dynamic discrete choice estimators with statistical inference.

NFXP([n_states, n_actions, discount, ...])

Sklearn-style NFXP estimator for dynamic discrete choice models.

CCP([n_states, n_actions, discount, ...])

Sklearn-style CCP estimator for dynamic discrete choice models.

TDCCP([n_states, n_actions, discount, ...])

Sklearn-style TD-CCP estimator for dynamic discrete choice models.

UFXP([n_states, n_actions, discount, ...])

Sklearn-style UFXP estimator for dynamic discrete choice models.

NNES([n_states, n_actions, discount, ...])

Sklearn-style NNES estimator for dynamic discrete choice models.

SEES([n_states, n_actions, discount, ...])

Sklearn-style SEES estimator for dynamic discrete choice models.

Inverse reinforcement learning estimators

Reward-learning estimators. GLADIUS and AIRL are the neural-reward estimators; they are also importable as NeuralGLADIUS and NeuralAIRL.

MaxEntIRL([n_states, n_actions, discount, ...])

Sklearn-style MaxEnt IRL estimator for inverse reinforcement learning.

MaxMarginIRL([n_states, n_actions, ...])

Sklearn-style Max Margin IRL estimator (Abbeel & Ng 2004).

MCEIRL([n_states, n_actions, discount, ...])

Sklearn-style Maximum Causal Entropy IRL estimator.

MCEIRLNeural([n_states, n_actions, ...])

Neural Maximum Causal Entropy IRL.

IQLearn

GLADIUS

AIRL

NeuralUFXP([n_states, n_actions, discount, ...])

Neural-utility UFXP estimator (Oguz and Bray 2026).

Environments and simulation

Markov decision process environments and the panel simulator.

RustBusEnvironment([operating_cost, ...])

Rust (1987) bus engine replacement environment.

ArrayMDP(transitions, features, theta[, ...])

A DDC environment defined by explicit transition, feature, and reward arrays.

random_mdp([num_states, num_actions, ...])

Construct a Garnet-style random ArrayMDP.

simulate_panel(env[, n_individuals, ...])

Simulate panel data from a DDC environment.

Utilities and inference

Reward parameterizations and the first-stage transition estimator.

Utility()

Abstract base class for utility functions.

LinearCost()

Linear cost utility for the Rust bus replacement model.

make_utility(fn, n_params[, param_names, ...])

Factory function to create a Utility from a callable.

TransitionEstimator([n_states, max_increase])

Sklearn-style estimator for mileage transition probabilities.

Data preparation

Panel validation and feature-identification checks.

check_panel_structure(df[, id_col, ...])

Validate panel data structure for DDC estimation.

feature_diagnostics(feature_matrix)

Rank and conditioning of a reward-feature design, raw and action-differenced.

Datasets

Bundled and downloadable dataset loaders.

datasets

Built-in datasets for econirl.