Skip to content

Commit

Permalink
Update MAQ notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
erikcs committed Feb 10, 2024
1 parent 9fd905a commit 892bcba
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions docs/examples/qini_curves_for_costly_treatment_arms.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,25 @@
"source": [
"# Qini curves with multiple costly treatment arms\n",
"\n",
"This notebook gives a brief overview of Qini curves for multi-armed treatment rules and a simple simulated example."
"This notebook shows approaches to evaluating multi-armed CATE estimators from `causalML` with the Multi-Armed Qini metric available in the `maq` package (available at https://github.com/grf-labs/maq).\n",
"\n",
"\n",
"This metric is a generalization of the familiar *Qini curve* to settings where we have multiple treatment arms available, and the cost of assigning treatment can vary by both unit and treatment arm according to some known cost structure. At a high level, this metric essentially allows you to quantify the value of targeting with more treatment arms by undertaking a cost-benefit exercise that uses your CATE estimates to assign the arm to the unit that is most cost-beneficial at various budget constraints.\n",
"\n",
"This notebook gives a brief overview of the statistical setup and a walkthrough with a simple simulated example. \n",
"\n",
"\n",
"To use this functionality, you first have to install the `maq` Python package from GitHub. The latest source release can be installed with:"
]
},
{
"cell_type": "markdown",
"id": "0a633fa7",
"metadata": {},
"source": [
"```\n",
"pip install \"git+https://github.com/grf-labs/maq.git#egg=maq&subdirectory=python-package\"\n",
"```"
]
},
{
Expand All @@ -22,7 +40,7 @@
"from xgboost import XGBRFRegressor\n",
"\n",
"# Generalized Qini curves\n",
"from causalml.metrics import MAQ, get_ipw_scores\n",
"from maq import MAQ, get_ipw_scores\n",
"\n",
"import numpy as np\n",
"np.random.seed(42)"
Expand Down

0 comments on commit 892bcba

Please sign in to comment.