Open
Conversation
Replace module-level config loading in conftest.py with parameterized fixtures. dr_technique and forecast_technique are now pulled directly from the dimensionality_reduction_techniques and forecast_techniques dicts, creating a cross-product with existing indirect parametrization. Tests will now automatically cover any technique registered in those dicts. Note: This will cause a large increase in the number of test cases and cause some DR and forecasting techniques specific tests to fail or error.
Move PCA-specific tests from test_simulation.py and test_prediction.py into test_pca.py with local fixtures that hardcode DimensionalityReductionPCA, bypassing the conftest cross-product. Bundle (technique, comp) pairs in conftest's dr_technique fixture so each DR class gets an appropriate comp value — fixes KernelPCA InvalidParameterError from receiving a float. Remove unused dummy_sim_array fixture from test_simulation.py.
RecursiveForecaster hardcoded steps=30, ignoring the caller's forecast horizon. This caused shape mismatches when the caller requested a different number of steps. Derive steps from x_pred.shape[0] instead, matching how DirectForecaster works. Remove overly strict isinstance(y_hat, np.ndarray) checks in tests — shape and value assertions already cover checking for array-like data structures.
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
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.
Change Description
This PR decouples the tests from the dimensionality reduction and forecasting config files and begins to allow parameterisation of tests across custom methods.
Task List
conftest.pywith parameterized fixtures.test_simulation.pyandtest_prediction.pyintotest_pca.pywith local fixturesx_pred.shape[0]instead, matching how DirectForecaster works.isinstance(y_hat, np.ndarray)checks in tests