Add automatic hurdle regression - #395
Open
adrian-prior wants to merge 3 commits into
Open
Conversation
adrian-prior
added this pull request to stack #397
September 11, 2026 15:10
adrian-prior
marked this pull request as ready for review
September 11, 2026 15:14
adrian-prior
removed this pull request from stack #397
September 11, 2026 15:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Generated by Codex
Add
AutoHurdleRegressorfor regression targets with a point mass at zero. It fits a zero/nonzero classifier and a regressor on positive rows, then combines their predictions into means, medians, or quantiles. A runnable Facebook Comment Volume example compares means with RMSE first, then medians with MAE, against plain TabPFN and constant baselines.Automatic selection uses a configurable training zero-rate threshold. Supplied estimators and the interpolation grid are configurable; the default prediction is the mixture median, using a 21-point grid from 0.01 to 0.99. All-zero targets predict zero without fitting either stage, and signed targets use ordinary regression in automatic mode.
Validation: all 32 hurdle tests passed with local TabPFN 8.4.0, including a real-model integration test. Repository Ruff lint/format checks and pinned pre-commit hooks passed.
Example command and captured output
The example samples 1,000 training rows and 1,000 test rows separately from the published splits, using seed 0. Results depend on the sample and model version.
Data: Singh, K. (2015), Facebook Comment Volume, CC BY 4.0.