harbor run -t bespokelabs/budgeted-imputation-mcar50harbor download bespokelabs/budgeted-imputation-mcar50Fill in the missing values in unseen numeric tables as accurately as possible. Each value is missing independently with 50% probability, and each call has a 30 second wall clock limit.
Write an imputer at /app/output/impute.py.
/app/output/impute.py.def impute(X_train: np.ndarray, X_eval: np.ndarray, seed: int) -> np.ndarray
X_train: shape (n_train, d), dtype float64.X_eval: shape (n_eval, d), dtype float64.X_train and X_eval are row-disjoint samples from the same numeric tabular dataset.np.nan at their missing entries.seed: an integer you may use for any randomness you need.Return value:
numpy.float64 array, or something numpy.asarray can convert to one.(n_eval, d), with row i and column j aligned to row i and column j of X_eval.nan, no +inf/-inf.X_eval are scored.nan or an infinity, invalidates the call (see "Execution and budget" for the consequence).$$R^2_j = 1 - \frac{\sum_{\text{masked}} (\text{true} - \text{returned})^2}{\sum_{\text{masked}} (\text{true} - \overline{\text{true}})^2}$$
impute call together.1 in that process: OMP_NUM_THREADS, MKL_NUM_THREADS, OPENBLAS_NUM_THREADS, NUMEXPR_NUM_THREADS, VECLIB_MAXIMUM_THREADS.HOME, and TMPDIR. Anything it leaves elsewhere is removed before the next call starts, so nothing survives between calls.n_train up to 10000, n_eval up to 2500, d up to 42 (as low as 3 on some datasets)./app/data/dev/: six complete numeric tabular datasets as .npz files, plus manifest.json describing each one. These are development material only; none is an evaluation dataset./app/cellspec.py: provides build_cell(X, seed, n_train, n_eval), which builds (X_train, X_eval, X_eval_true, mask_eval) from a complete matrix using the row split, MCAR masks, and quantile transform described above. Also provides imputation_r2(pred, true, mask), the metric function. The evaluation harness uses this same file to build its cells./app/cellrunner.py: loads one call's inputs, imports impute.py, and saves what it returns. The evaluation harness runs this same file./app/devkit.py: runs /app/output/impute.py over the development panel under the same 30-second budget and prints per-draw, per-dataset, and panel scores. Run python3 /app/devkit.py --list to show the panel./app/output/impute.py currently contains column-mean imputation./app/output/ is collected for evaluation./app/output/./app/output/: at most 2000 files and 512 MB total./app/output/ are not copied.