should_drop#
- sdm.prior.should_drop(x: Tensor, y: Tensor, *, task_type: Task, drop_trivial: bool = False, drop_unlearnable: bool = False, trivial_threshold: float = 0.05, num_trees: int = 25, num_resamples: int = 200, max_rows: int | None = 10000) bool#
Decide whether to drop a dataset based on an ExtraTrees probe.
Compare out-of-bag squared errors with a mean baseline, one-hot encoding classification targets. A bootstrap test measures whether the probe improves on the baseline.
- Parameters:
x (Tensor) – Features with shape
[R, C]for rows and columns.y (Tensor) – Targets with shape
[R]; classification labels are nonnegative integer codes.task_type (Task) – Classification or regression task.
drop_trivial (bool) – Discard datasets solved almost perfectly by the probe.
drop_unlearnable (bool) – Discard datasets where the probe does not significantly improve on the mean baseline.
trivial_threshold (float) – Maximum probe-to-baseline RMSE ratio for a trivial dataset.
num_trees (int) – Number of trees in the probe.
num_resamples (int) – Number of bootstrap resamples for the improvement test.
max_rows (int | None) – Maximum rows per tree bootstrap and deterministic scoring subset.
Noneuses all rows.
- Returns:
Whether the dataset should be dropped.
- Return type: