Skip to content

[ENH] Add TargetTransform and DistrPredictiveCalibration for probabilistic regression#988

Open
arnavk23 wants to merge 7 commits intosktime:mainfrom
arnavk23:feature/target-transform-pipeline
Open

[ENH] Add TargetTransform and DistrPredictiveCalibration for probabilistic regression#988
arnavk23 wants to merge 7 commits intosktime:mainfrom
arnavk23:feature/target-transform-pipeline

Conversation

@arnavk23
Copy link
Copy Markdown
Contributor

@arnavk23 arnavk23 commented Mar 23, 2026

Reference Issues/PRs

Towards #7

What does this implement/fix? Explain your changes.

This PR adds two probabilistic regression pipeline wrappers:

  • TargetTransform fits a regressor on a transformed target and inverse-transforms predictions back to the original target scale.
  • DistrPredictiveCalibration wraps a probabilistic regressor and applies a calibrator to its predicted distributions.

Does your contribution introduce a new dependency? If yes, which one?

No.

What should a reviewer concentrate their feedback on?

  • Correctness of the inverse transformation logic in TargetTransform, specially for distribution location and scale.
  • Whether DistrPredictiveCalibration applies calibration at the right points in the prediction flow.
  • Whether the test-only calibrators are acceptable as implemented, or should be moved further out.

Did you add any tests for the change?

Added tests that verify:

  • TargetTransform with StandardScaler correctly inverse-transforms predictive distributions.
  • DistrPredictiveCalibration actually changes the predicted distribution. Calibration also affects quantile predictions.

Any other comments?

PR checklist

For all contributions
  • I've added myself to the list of contributors with any new badges I've earned :-)
  • The PR title starts with either [ENH], [MNT], [DOC], or [BUG]. [BUG] - bugfix, [MNT] - CI, test framework, [ENH] - adding or improving code, [DOC] - writing or improving documentation or docstrings.
For new estimators
  • I've added the estimator to the API reference - in docs/source/api_reference/taskname.rst, follow the pattern.
  • I've added one or more illustrative usage examples to the docstring, in a pydocstyle compliant Examples section.
  • If the estimator relies on a soft dependency, I've set the python_dependencies tag and ensured
    dependency isolation, see the estimator dependencies guide.

…mutation from dummy calibrators for test compatibility
@arnavk23 arnavk23 changed the title [ENH] Add TargetTransform and DistrPredictiveCalibration pipeline elements for probabilistic regression [ENH] Add TargetTransform and DistrPredictiveCalibration for probabilistic regression Mar 23, 2026
Restored estimator test-params coverage for DistrPredictiveCalibration
Added a second explicit calibrator class and returned two parameter sets from get_test_params:
Fixed plotting test backend issue on Windows/headless
Forced matplotlib to use Agg inside the plotting test and closed figures to avoid backend/Tk leakage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant