Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeseries split #414

Merged
merged 13 commits into from
Nov 5, 2024
Merged

Timeseries split #414

merged 13 commits into from
Nov 5, 2024

Conversation

tnixon
Copy link
Contributor

@tnixon tnixon commented Oct 31, 2024

Changes

Created a sub-class of the PySpark ML CrossValidator
(see https://spark.apache.org/docs/latest/api/python/reference/api/pyspark.ml.tuning.CrossValidator.html#pyspark.ml.tuning.CrossValidator)
that replicates the timeseries split method implemented by SKLearn's TimeSeriesSplit
(see https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.TimeSeriesSplit.html)

Linked issues

Resolves #409

Functionality

  • added relevant user documentation
  • added a new Class method
  • modified existing Class method: ...
  • added a new function
  • modified existing function: ...
  • added a new test
  • modified existing test: ...
  • added a new example
  • modified existing example: ...
  • added a new utility
  • modified existing utility: ...

Tests

I created an example notebook where I use the new Cross-Validator to train a GBT regression model on some sample data. Notebook included as a reference example.

  • manually tested
  • added unit tests
  • added integration tests
  • verified on staging environment (screenshot attached)

Copy link
Contributor

@R7L208 R7L208 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good. Can you add test cases for TimeSeriesCrossValidator @tnixon ?

@tnixon
Copy link
Contributor Author

tnixon commented Nov 4, 2024

Yeah... I guess that would be a good idea 🙄 😄

Copy link
Contributor

@R7L208 R7L208 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you

@R7L208 R7L208 merged commit 8489cc1 into master Nov 5, 2024
9 checks passed
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.

Time-series split for cross validation not available in Spark ML library
2 participants