fix: replace deprecated sklearn PassiveAggressive estimators - #400
Open
tachyonicClock wants to merge 3 commits into
Open
Conversation
tachyonicClock
commented
Aug 20, 2026
tachyonicClock
commented
Aug 20, 2026
…ve estimators scikit-learn 1.8 deprecated PassiveAggressiveClassifier and PassiveAggressiveRegressor, and will remove them in 1.10. Both wrappers now build on SGDClassifier/SGDRegressor with the passive aggressive learning rate schedule, which is what the deprecated classes used internally: hinge/epsilon_insensitive maps to "pa1" (PA-I) and the squared variants map to "pa2" (PA-II), with C passed as eta0. The CapyMOA API is unchanged. Since the loss no longer selects the variant on its own, `loss` is now validated and typed as a Literal. Verified that the resulting coef_ and intercept_ are identical to the deprecated estimators for all four losses. Requires scikit-learn 1.8, which introduced the "pa1"/"pa2" schedules. Assisted-by: claude-code:claude-opus-5
Python 3.14 makes filter="data" the default for tar extraction and warns until then, so downloading any tar dataset raised a DeprecationWarning. Request the filter explicitly: it also rejects members that would escape the download directory. The zip unpacker takes no filter, so only tar formats get one. Assisted-by: claude-code:claude-opus-5
Add 3.13 to the release matrix and drop 3.10, which cannot be kept: scikit-learn 1.8 is needed for the passive aggressive learning rates and requires Python 3.11 or newer. The full suite passes on 3.11 and 3.13. Assisted-by: claude-code:claude-opus-5
tachyonicClock
force-pushed
the
fix/sklearn-passive-aggressive-deprecation
branch
from
August 20, 2026 02:18
20a3a89 to
5d820b4
Compare
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.
Fixes adaptive-machine-learning/backlog#137:
Had to bump the python version 3.10 to 3.11 to use a newer version of sklearn to have the same features. This is a good idea because python 3.0 is end of life 2026.
Assisted-by: claude-code:claude-opus-5