Skip to content

feat: add insample parameter to Diff and Pipeline inverse_transform#3046

Open
TamarAzriel wants to merge 1 commit intounit8co:masterfrom
TamarAzriel:feature/add-insample-to-inverse-transform-
Open

feat: add insample parameter to Diff and Pipeline inverse_transform#3046
TamarAzriel wants to merge 1 commit intounit8co:masterfrom
TamarAzriel:feature/add-insample-to-inverse-transform-

Conversation

@TamarAzriel
Copy link
Copy Markdown

Checklist before merging this PR:

  • Mentioned all issues that this PR fixes or addresses.
  • Summarized the updates of this PR under Summary.
  • [] Added an entry under Unreleased in the Changelog.

Fixes #3045.

Summary

This PR adds an optional insample parameter to inverse_transform() in InvertibleDataTransformer and Pipeline.
It specifically enables the Diff transformer to use historical context for accurate inversion.
I've also refactored the Pipeline inverse loop to handle types correctly and update the context iteratively.

Other Information

Verified with ~8,100 tests. Added new tests for Diff in test_diff.py.
Unrelated local failures on Windows (Uber hash, Tkinter) are noted but do not affect this PR's logic.

Note to reviewers:
I hope this implementation aligns with the library standards. I'm very open to feedback and would be happy to make any necessary changes or improvements based on your review!

@TamarAzriel TamarAzriel marked this pull request as draft March 26, 2026 19:20
@TamarAzriel TamarAzriel marked this pull request as ready for review March 26, 2026 19:20
@TamarAzriel TamarAzriel marked this pull request as draft March 26, 2026 19:20
@TamarAzriel TamarAzriel marked this pull request as ready for review March 26, 2026 19:23
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.

Add optional insample parameter to inverse_transform() of data transformers and pipeline for simpler Diff handling

1 participant