harbor run -t bespokelabs/act-tensor-sparse-panel-imputation-r2harbor download bespokelabs/act-tensor-sparse-panel-imputation-r2Recover missing values in unseen firm characteristic panels as accurately as possible. Each panel
is an array with shape (60 months, N firms, 45 characteristics).
Data:
(month, characteristic) slice
and rescaled to [-0.5, 0.5].NaN./app/solution/impute.py, exposing exactly one entry point:
def impute(panel: np.ndarray, seed: int) -> np.ndarray:
...
panel - a C-contiguous float64 array of shape (60, N, 45), with NaN at every
entry you cannot see and the observed value elsewhere. N varies between panels and is
between 350 and 450.seed - an int. Use it for any stochastic initialization, so a rerun on the same panel
returns the same array.(60, N, 45), finite everywhere (no NaN,
no inf), with every value inside [-1.0, 1.0]./app/solution/ is yours: put any helper modules, cached artifacts, or configuration there
and they travel with the submission. Only impute.py is imported, and only impute is
called. Nothing outside /app/solution/ is preserved. The submitted tree must contain no
symbolic links and no hard links: either one gets the whole submission rejected. Grading
runs in a separate environment from wherever you develop this: /app/solution/ is the
only artifact carried over, so your solution must be fully self-contained inside it.
Nothing else from this workspace persists, and there is no network access at grading time
to fetch anything you didn't already put there.
NaN, indistinguishable
from cells that were never observed. Nothing tells you which cells they are.$$R^2_{imp} = 1 - \frac{\sum_m (x_m - \hat{x}_m)^2}{\sum_m (x_m - \bar{x})^2}$$
where $x$ are the true values at those cells, $\hat{x}$ your returned values there, and $\bar{x}$ the mean of the true values.
/app/data/dev/instance_00.npz through /app/data/dev/instance_07.npz are eight panels
drawn by the same procedure as the sealed ones, each with ground truth included so you can
score yourself. Every file holds four arrays:
| key | dtype, shape | meaning |
|---|---|---|
panel |
float64 (60, N, 45) |
exactly what impute receives |
eval_mask |
bool (60, N, 45) |
True at the held-out cells |
eval_true |
float64 (M,) |
the true values at those cells, in C order of eval_mask |
seed |
int64 |
the seed argument passed alongside panel |
The sealed panels are drawn with independently redrawn generator hyperparameters, so the dev panels do not pin them down.
impute is called once per sealed panel, in a fresh
unprivileged process per panel, with no network.OMP_NUM_THREADS, OPENBLAS_NUM_THREADS, MKL_NUM_THREADS, and
NUMEXPR_NUM_THREADS are all pinned to 1.numpy, scipy, and scikit-learn are installed. There is nothing to
download.