Repository: sktime/sktime

Issue:
Estimator Test Parameters Refactor
### Aim
To start to move default parameters out of `tests/_config` and into the concrete estimators, by specifying the parameters inside the `get_test_params` method.

This would declutter the logic, and make extending sktime much easier - since it reduces the "points of extension" by one. Default parameters would no longer have to be entered in _config but become part of the list of things to implement, in the extension template.

### Related Issue
#1098 

### Step
[link for step](https://github.com/sktime/enhancement-proposals/blob/main/steps/12_estimator_test_instances/step.md)
This issue is associated with point 3 of the **suggested refactor sequence** given in the above step.

### Contributing Guidelines
If you would like to work on this: please post here and which estimator you are taking on, to avoid duplication of work.
A core dev will then add your name to the estimator under refactoring and/or link the PR.

A general recipe for refactoring is as follows:
- pick up an estimator class from the below checklist of estimators.
- look for parameters of the estimator in `ESTIMATOR_TEST_PARAMS` (in the tests._config file)
- add `get_test_params` method to the corresponding estimator class which returns a dictionary of the above parameters 
- refer to [extension template](https://github.com/alan-turing-institute/sktime/tree/main/extension_templates) to add get_test_params to the corresponding estimator class
- For example, in case of `ColumnEnsembleForecaster` , dictionary of parameters which is `{"forecasters": FORECASTER} `, should be returned from `get_test_params` method. 



Checklist of estimators:

- [x] ColumnEnsembleForecaster
- [x] OnlineEnsembleForecaster
- [x] FeatureUnion
- [x] DirectTabularRegressionForecaster
- [x] MultioutputTabularRegressionForecaster
- [x] RecursiveTabularRegressionForecaster
- [x] DirRecTabularRegressionForecaster
- [x] DirectTimeSeriesRegressionForecaster
- [x] RecursiveTimeSeriesRegressionForecaster
- [x] MultioutputTimeSeriesRegressionForecaster
- [x] DirRecTimeSeriesRegressionForecaster
- [x] TransformedTargetForecaster
- [x] ForecastingPipeline
- [x] EnsembleForecaster
- [x] StackingForecaster
- [x] AutoEnsembleForecaster
- [x] Detrender
- [x] ForecastingGridSearchCV
- [x] ForecastingRandomizedSearchCV
- [x] TabularToSeriesAdaptor
- [x] ColumnEnsembleClassifier
- [x] FittedParamExtractor
- [x] SeriesToPrimitivesRowTransformer
- [x] SeriesToSeriesRowTransformer
- [x] ColumnTransformer
- [x] AutoARIMA
- [x] MultiplexForecaster
- [x] ShapeletTransformClassifier
- [x] ContractedShapeletTransform
- [x] ShapeletTransform
- [x] SignatureTransformer
- [x] SignatureClassifier
- [x] Catch22Classifier
- [x] MatrixProfileClassifier
- [x] TSFreshClassifier
- [x] ROCKETClassifier
- [x] Arsenal
- [x] HIVECOTEV1
- [x] TSFreshFeatureExtractor
- [x] TSFreshRelevantFeatureExtractor
- [x] TSInterpolator
- [x] RandomIntervalSpectralForest
- [x] SFA
- [x] ContractableBOSS
- [x] TemporalDictionaryEnsemble
- [x] TimeSeriesForestClassifier
- [x] ComposableTimeSeriesForestClassifier
- [x] ComposableTimeSeriesForestRegressor
- [x] SupervisedTimeSeriesForest
- [x] CanonicalIntervalForest
- [x] DrCIF
- [x] HCrystalBallForecaster
- [x] BATS
- [x] TBATS
- [x] Prophet
- [x] UnobservedComponents
- [x] PartialAutoCorrelationTransformer
- [x] AutoCorrelationTransformer
- [x] Imputer
- [x] HampelFilter
- [x] OptionalPassthrough
- [x] FeatureSelection
- [x] ColumnwiseTransformer
- [x] AggrDist
- [x] PyODAnnotator
- [x] ClaSPSegmentation


Discussion:
@fkiraly Let me know if I have to make any changes to the above issue.
thanks, great work!
Can you kindly update this and merge with #1098 (which is sort of a duplicate).

I.e., move useful things from #1098 such as explanations here, and then we can close #1098.
most forecasters dealt with here:
https://github.com/alan-turing-institute/sktime/pull/1902
(checked above, since don´t anticipate much problems)
Hi @fkiraly and @Lovkush-A!

Can I work on this issue?
I could start with refactoring `FeatureUnion` and then move on towards the forecasters.
@fkiraly Bit of context: shubham and i have had a small back and forth in slack, resulting in a call on the weekend in which i helped shubham understand this issue. I recommended starting with just one estimator to make sure he (and I) has not missed any details, and then can continue to do remainder of work in batches.
@fkiraly I will start working on `FeatureUnion` as discussed on Slack. 👍🏼 
Hey @fkiraly and @Lovkush-A
I would like to start working on refactoring the TimeSeriesForestClassifier :)
Hi, I would like to start working on refactoring the FittedParamExtractor :) 
Hey @fkiraly,
I would like to do test params refactoring for the ColumnTransformer.

Resolving patch:
diff --git a/sktime/transformations/panel/summarize/_extract.py b/sktime/transformations/panel/summarize/_extract.py
--- a/sktime/transformations/panel/summarize/_extract.py
+++ b/sktime/transformations/panel/summarize/_extract.py
@@ -9,6 +9,7 @@
 from joblib import Parallel, delayed
 
 from sktime.datatypes import convert_to
+from sktime.forecasting.exp_smoothing import ExponentialSmoothing
 from sktime.transformations.base import BaseTransformer
 from sktime.transformations.panel.segment import RandomIntervalSegmenter
 
@@ -420,3 +421,24 @@ def _check_param_names(param_names):
                 f"but found: {type(param_names)}"
             )
         return param_names
+
+    @classmethod
+    def get_test_params(cls):
+        """Return testing parameter settings for the estimator.
+
+        Parameters
+        ----------
+        parameter_set : str, default="default"
+            Name of the set of test parameters to return, for use in tests. If no
+            special parameters are defined for a value, will return `"default"` set.
+            There are currently no reserved values for distance/kernel transformers.
+
+        Returns
+        -------
+        params : dict or list of dict, default = {}
+            Parameters to create testing instances of the class
+            Each dict are parameters to construct an "interesting" test instance, i.e.,
+            `MyClass(**params)` or `MyClass(**params[i])` creates a valid test instance.
+            `create_test_instance` uses the first (or only) dictionary in `params`
+        """
+        return {"forecaster": ExponentialSmoothing(), "param_names": ["initial_level"]}


Test patch:
diff --git a/sktime/tests/_config.py b/sktime/tests/_config.py
--- a/sktime/tests/_config.py
+++ b/sktime/tests/_config.py
@@ -8,7 +8,6 @@
 
 from sktime.annotation.clasp import ClaSPSegmentation
 from sktime.base import BaseEstimator
-from sktime.forecasting.exp_smoothing import ExponentialSmoothing
 from sktime.forecasting.structural import UnobservedComponents
 from sktime.registry import (
     BASE_CLASS_LIST,
@@ -25,7 +24,6 @@
 )
 from sktime.transformations.panel.random_intervals import RandomIntervals
 from sktime.transformations.panel.shapelet_transform import RandomShapeletTransform
-from sktime.transformations.panel.summarize import FittedParamExtractor
 
 # The following estimators currently do not pass all unit tests
 # https://github.com/alan-turing-institute/sktime/issues/1627
@@ -114,10 +112,6 @@
     ),
 ]
 ESTIMATOR_TEST_PARAMS = {
-    FittedParamExtractor: {
-        "forecaster": ExponentialSmoothing(),
-        "param_names": ["initial_level"],
-    },
     SeriesToPrimitivesRowTransformer: {
         "transformer": SERIES_TO_PRIMITIVES_TRANSFORMER,
         "check_transformer": False,