harbor run -t bespokelabs/causalpfn-cate-pehe-ihdp-surfacebharbor download bespokelabs/causalpfn-cate-pehe-ihdp-surfacebGiven observational data where treatment was not randomly assigned, estimate how much the treatment would change the outcome for each held out row.
Write /app/output/estimator.py with a single entry point:
def estimate_cate(X_train, t_train, y_train, X_test):
"""Return one estimated treatment effect per held-out row."""
Each call gets one observational dataset as C-contiguous numpy.float64 arrays:
| argument | shape | contents |
|---|---|---|
X_train |
(672, 25) |
covariates of the training rows |
t_train |
(672,) |
treatment indicator, 0.0 or 1.0 |
y_train |
(672,) |
observed outcome under the arm each row actually received |
X_test |
(75, 25) |
covariates of the held-out rows |
Return a 1-D float64 array of shape (75,). Every value must be finite, but values are
otherwise unbounded. Value i is the estimated treatment effect for held-out row i, in the
given order:
$$\tau(x) = E[Y(1) - Y(0) \mid X = x]$$
/app/data/dev/realization_000.npz through realization_099.npz hold 100 development datasets drawn from the same process as the graded ones. Each file has X_train, t_train, y_train, X_test, plus tau_test, the true effects for that file's 75 held-out rows. /app/data is read-only.
estimator.py is imported once in a fresh process, then estimate_cate is called once for each of 200 sealed datasets generated by the same process with different random seeds.
For each dataset, the grader computes the root mean squared error between your estimates and the true treatment effects. This metric is called PEHE:
$\mathrm{PEHE}_d = \sqrt{\mathrm{mean}_i \left( \tau^{true}_i - \hat{\tau}_i \right)^2}$
The reported metric is the unweighted mean of the 200 per-dataset $\mathrm{PEHE}_d$ values. Lower is better, with no cutoff: a trivial predictor that ignores the covariates earns zero credit, and every strictly lower mean error earns strictly more credit with no point where further improvement stops counting.
/app/output/ crosses over to the grader, so every helper module, fitted parameter file, and other artifact the entry point loads must live inside it.__file__).gpus = 0), 8 vCPUs, a memory cap of memory_mb = 14336, and runs with OMP_NUM_THREADS=1, MKL_NUM_THREADS=1, OPENBLAS_NUM_THREADS=1, and NUMEXPR_NUM_THREADS=1.numpy, scipy, scikit-learn, and torch (CPU build) are installed and importable; nothing else can be added.A call that raises, returns the wrong shape or dtype, or returns a non-finite value is scored for that dataset as if it had returned the constant mean(y_train[t_train == 1]) - mean(y_train[t_train == 0]). A submission whose entry point can't be imported, or none of whose calls returns a usable array, scores 0.