From 59a1ff3bcd31c08936f36f9decc4189f4e473052 Mon Sep 17 00:00:00 2001 From: xillig <56161060+xillig@users.noreply.github.com> Date: Wed, 11 Nov 2026 05:53:32 +0100 Subject: [PATCH] test(transformers): run check_estimator on the Fourier and kernel maps FourierFeatureTransformer, RandomFourierFeaturesTransformer and NystroemFeaturesTransformer were in neither tier of the scikit-learn conformance suite, so nothing guarded their estimator contract. All three pass every check_estimator check, on the locked dependencies and on the minimum supported ones (Python 3.10, scikit-learn 1.6.0), so they join the near-conformant tier without tolerated failures: a future regression in any check now fails the suite. --- tests/transformers/test_sklearn_compat.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/transformers/test_sklearn_compat.py b/tests/transformers/test_sklearn_compat.py index cd18ae1..1336ba3 100644 --- a/tests/transformers/test_sklearn_compat.py +++ b/tests/transformers/test_sklearn_compat.py @@ -5,7 +5,10 @@ * **Near-conformant** transformers run the *full* ``check_estimator`` suite. Only a small, documented set of checks is allowed to fail (``expected_failed_checks``); any *other* failing check is a real regression and fails the test. This is the - enforced contract for the migrated spline / PLE / feature-map families. + enforced contract for the migrated spline / PLE / feature-map families. The + Fourier feature map and the kernel approximations (random Fourier features, + Nystroem) have no sentinel defaults and pass every check, so they are listed + without tolerated failures. * **Deferred** transformers have deep structural gaps (univariate-only, sample-count-changing, or categorical-only) and are tracked as strict @@ -24,15 +27,18 @@ BSplineTransformer, ContinuousOrdinalTransformer, CubicRegressionSplineTransformer, + FourierFeatureTransformer, ISplineTransformer, MSplineTransformer, NaturalCubicSplineTransformer, NoTransformer, NumericBinningTransformer, + NystroemFeaturesTransformer, OneHotFromOrdinalTransformer, PeriodicEncodingTransformer, PLETransformer, PSplineTransformer, + RandomFourierFeaturesTransformer, RBFExpansionTransformer, ReLUExpansionTransformer, SigmoidExpansionTransformer, @@ -98,6 +104,10 @@ "check_parameters_default_constructible": SENTINEL, }, ), + # Fully conformant: no tolerated failures. + (FourierFeatureTransformer(), {}), + (RandomFourierFeaturesTransformer(), {}), + (NystroemFeaturesTransformer(), {}), ]