Repository navigation
physXAI 1.0.0 – Phase 1: leakage free data pipeline - #71
Merged
Merged
Conversation
- BlockSplit: stratified blocks with embargo (default), holdout_end and random_rows; windows are only cut out of one split, so training and test windows never overlap (fixes data leakage of multi step data) - Regular time grid when loading: missing time stamps become invalid rows, targets are never paired across gaps (fixes ignore_nan bug) - Native X_lagN and Change(X) columns, lags dict, transform hook, datetime index, eval_horizon / eval_stride for single step models - TrainingData holds the whole series as numpy with split labels and validity mask, save / load without pickle; TrainingDataMultiStep is built from numpy windows and creates tf.data pipelines on demand - physXAI.set_seed: global seed, used as default random_state - Complete get_config / from_config with class dispatch - Tests for splitting, windows, preprocessing and regressions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 of 4 tasks
Open
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.
Phase 1 of the physXAI 1.0.0 refactoring: leakage free data pipeline. Follows #70.
Summary
BlockSplit(physXAI/preprocessing/splitting.py):gap_stepsbetween splits (default: max lag + shift);blocks(default),holdout_end,random_rows(legacy).windows.py), so multi step training and test windows never overlap (fixes the leakage oftimeseries_dataset_from_array+take/skip). Training windows are reshuffled every epoch.ignore_nan=Truebug, which is active in typical runs.X_lagN/Change(X)columns, pluslags={'X': n}, atransform(df)hook, datetime indices andeval_horizon/eval_stride(used by the recursive evaluation in phase 3). Constructed features still work during the transition.TrainingDataholds the whole series as NumPy with split labels and a validity mask, and is saved/loaded without pickle.TrainingDataMultiStepis built from NumPy windows;tf.datais created on demand.physXAI.set_seed(seed): one global seed (Python, NumPy, Keras) and the defaultrandom_state. The used seed is always stored in the config.get_config/from_configare complete (csv options, split,ignore_nan…) and dispatch on__class_name__. The AgentLib-MPC keys are unchanged..gitattributesnormalizes line endings (Windows / Linux).Behaviour changes
split='random_rows'restores the old behaviour.Test plan
pytest: 65 passed, including 22 new tests for splitting, windows, preprocessing, the gap regression and leakage.verify_installation.pyandTAir_evaluateMultiStep.pyrun.🤖 Generated with Claude Code