Repository navigation
[BUG] Fix arguments dropped or misapplied in the classifier and regressor getters - #550
Merged
MatthewMiddlehurst merged 3 commits intoOct 17, 2026
Conversation
… getters Regressor: - 1nn-ed and 5nn-ed used the KNeighborsTimeSeriesRegressor default distance, which is dtw. Set euclidean. - 1nn-msm and 5nn-msm did not pass on kwargs. - Pass n_jobs to the kNN regressors. Classifier: - Pass n_jobs to rdst and to the 1nn-dtw-cv grid search. - Stop passing n_jobs to LogisticRegression, where it has no effect since scikit-learn 1.8 and is deprecated. - drcif-unequal passed n_estimators=500 as well as kwargs, raising TypeError when n_estimators was set. Keep 500 as the default and let kwargs change it.
Review feedback: the tests added little, n_estimators stays fixed for drcif-unequal and the LogisticRegression comment is not needed.
The tsf, rise, cif and stsf names (and their -500 versions) did not pass fit_contract as time_limit_in_minutes, so a contract was ignored. drcif already passes it.
Contributor
Thank you for contributing to
|
MatthewMiddlehurst
merged commit Oct 17, 2026
322914a
into
time-series-machine-learning:main
17 of 19 checks passed
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.
Reference Issues/PRs
Follows a review of the estimator getters. The clusterer and forecaster getters are not changed here.
What does this implement/fix? Explain your changes
Fixes names in
get_classifier_by_nameandget_regressor_by_namewhich ignore an argument or build something other than the name says.1nn-ed,5nn-edKNeighborsTimeSeriesRegressordefault distance, which isdtw, so both ran full-window DTWdistance="euclidean"1nn-msm,5nn-msmn_jobswas not passed onn_jobsrdst,1nn-dtw-cvn_jobswas not passed onn_jobs(toGridSearchCVfor1nn-dtw-cv, asgrid-svrdoes)logisticn_jobswas passed toLogisticRegression, where it has no effect since scikit-learn 1.8 and warns infituntil its removal in 1.10n_jobstsf,rise,cifand their-500versions, plus classifierstsf,stsf-500fit_contractwas not passed on, so a contract was ignored.drcifalready passes ittime_limit_in_minutes=fit_contractNeeds careful review:
1nn-edand5nn-ednow give different results. Earlier results fromget_regressor_by_nameunder these names are DTW. The TSER archive publication has its ownset_tser_exp_regressor.py, which already setsdistance="euclidean", so its results are not affected.fit_contractabove 0 aeon ignoresn_estimatorsand builds until the time limit orcontract_max_n_estimators(500), the same asdrcif. The default of 0 is unchanged: no contract andn_estimatorsis used.logisticno longer setsn_jobson any scikit-learn version. Before 1.8 it only applied to one-vs-rest fits.Any other comments?
No tests are added. Run locally with Python 3.13.9, aeon 1.6.0 and scikit-learn 1.9.1 (
all_extrasinstalled):python -m pytest -n logical tsml_eval/experiments: 67 passedpre-commit run --all-files: passedmypy tsml_eval/: no issuesContract-capable names left as they are:
stc-2hour, where the name sets a transform limit, and regressortsf-i, where the forest is built per channel inside an ensemble.