Repository: sktime/sktime

Issue:
[ENH] Update `MSTL` import in `sktime.transformations.series.detrend`
**Is your feature request related to a problem? Please describe.**
`detrend` in `sktime.transformations.series.detrend` currently looks like this
```
detrend
├── _deseasonalize.py
├── _detrend.py
├── __init__.py
├── mstl.py
```
To use detrend algorithms, you import them like this
```py
# to use other classes
from sktime.transformations.series.detrend import Detrender, ConditionalDeseasonalizer, Deseasonalizer, STLTransformer
# to use mstl
from sktime.transformations.series.detrend.mstl import MSTL
```
I don't understand the discrimination here of `MSTL` from other same detrend algorithms. I think the import should look like this to make it more congruous
```py
from sktime.transformations.series.detrend import MSTL, Detrender, ConditionalDeseasonalizer, Deseasonalizer, STLTransformer
```

**Describe the solution you'd like**
We should convert the structure to look like this
```
detrend
├── _deseasonalize.py
├── _detrend.py
├── __init__.py
├── _mstl.py
```
and add this line in `detrend/__init__.py`
```py
from sktime.transformations.series.detrend._mstl import MSTL
```
and add the deprecation warnings

**Describe alternatives you've considered**
We can also keep the structure as it is and just add this line in `detrend/__init__.py`
```py
from sktime.transformations.series.detrend.mstl import MSTL
```

**Additional context**
This is not a very high demanding enhancement but it will make the API design better.


Discussion:
Agreed with the end result - there is a slight problem, which is the requirement "don't break user code without forewarning", more details in the change/deprecation guide here https://www.sktime.net/en/stable/developer_guide/deprecation.html

If we rename `mstl` to `_mstl`, then it breaks every import anyone has involving `mstl`.

Hence, even if it is a bit unsatisfactory, my preference would be to add the export to the `__init__`, but *not* rename `mstl`.

The alternative would be raising warning messages for a while for the old import location, scheduling a name change at release, etc.

(unless you would like to do this, I can add a "good first issue" label to this)
sure, I'll work on this, it an easy fix
I actually want to do the rename thing that will need deprecation messages, just to learn how deprecation and release cycles work. But if you think I should not get into this yet, I'll do the simple import thing.

For the rename stuff, I have this plan

1. I'll rename `mstl.py` to `_mstl.py` and update all the imports
2. create a new file `mstl.py` and import the `MSTL` class from the new `_mstl.py`

It will work fine and we can add a deprecation message in `mstl.py` till the next release following the guide you linked. Later in the release, we can delete `mstl.py` file
> But if you think I should not get into this yet, I'll do the simple import thing.

I think you can definitely do it and you should learn about deprecation, see guide here:
https://www.sktime.net/en/stable/developer_guide/deprecation.html

However, *in this specific case*, I would avoid renaming the module - not because I don't trust you being able to carry it out, but because I think it doesn't hurt anyone to have it public, even if by accident. I would deal by this by not advertising the module in docs, rather than renaming it.

Some change/warning management that would be higher priority imo:

* defaults of loaded mtype in loaders in `datasets._single_problem_loaders` should move to `pd-multiindex` if they were `nested_univ`
* `cINNForecaster` should be renamed to start with capital letter - if @benHeid agrees. To be handled in similar way to #5742 
* the splitters in `series_as_features.model_selection` should get moved to the `split` module (and inherit from `BaseSplitter`). This is more challenging as there may be interface non-compliances as well.
> * `cINNForecaster` should be renamed to start with capital letter - if @benHeid agrees. To be handled in similar way to [[ENH] New PAA and SAX transformer implementations #5742](https://github.com/sktime/sktime/pull/5742)

should `cINNNetwork` in `sktime/networks/cinn.py` also be started with capital letter? though it is not a part of user interface

Resolving patch:
diff --git a/sktime/transformations/series/detrend/__init__.py b/sktime/transformations/series/detrend/__init__.py
--- a/sktime/transformations/series/detrend/__init__.py
+++ b/sktime/transformations/series/detrend/__init__.py
@@ -2,7 +2,13 @@
 """Transformer module for detrending and deseasonalization."""
 
 __author__ = ["mloning", "eyalshafran", "SveaMeyer13"]
-__all__ = ["Detrender", "Deseasonalizer", "ConditionalDeseasonalizer", "STLTransformer"]
+__all__ = [
+    "Detrender",
+    "Deseasonalizer",
+    "ConditionalDeseasonalizer",
+    "STLTransformer",
+    "MSTL",
+]
 
 from sktime.transformations.series.detrend._deseasonalize import (
     ConditionalDeseasonalizer,
@@ -10,3 +16,4 @@
     STLTransformer,
 )
 from sktime.transformations.series.detrend._detrend import Detrender
+from sktime.transformations.series.detrend.mstl import MSTL
diff --git a/sktime/transformations/series/detrend/mstl.py b/sktime/transformations/series/detrend/mstl.py
--- a/sktime/transformations/series/detrend/mstl.py
+++ b/sktime/transformations/series/detrend/mstl.py
@@ -88,7 +88,7 @@ class MSTL(BaseTransformer):
     --------
     >>> import matplotlib.pyplot as plt  # doctest: +SKIP
     >>> from sktime.datasets import load_airline
-    >>> from sktime.transformations.series.detrend.mstl import MSTL
+    >>> from sktime.transformations.series.detrend import MSTL
     >>> y = load_airline()
     >>> y.index = y.index.to_timestamp()
     >>> mstl = MSTL(return_components=True)  # doctest: +SKIP


Test patch: