SequentialFeatureSelector may not be working correctly with transformers that transform with respect to each sample

### Describe the bug

This is (probably) an extended issue of #25711, in which when `SequentialFeatureSelector` is used with `ColumnTransformer`, an `IndexError` will be raised. After reading the code, I found that this is because `SequentialFeatureSelector` treats each feature (column) separately, as in

https://github.com/scikit-learn/scikit-learn/blob/42c2731af1ff97216b947225545cb8c086243f8b/sklearn/feature_selection/_sequential.py#L305-L318

This would cause `ColumnTransformer` to raise an `IndexError`, since its specified columns to transform is regarding the original `X` but not each column of `X`. Then I was thinking that `ColumnTransformer` may not be the only one that does not work correctly with `SequentialFeatureSelector`. For instance, `Normalizer` normalizes each sample (row), so when it is used with `ColumnTransformer`, it will be applied on each row of each column of `X`, thus causing every single feature to become 1 or -1. Though no error will be raised, this is a serious error.

### Steps/Code to Reproduce

To test if my guess is true, I changed a few lines of code in the class `Pipeline` to print information:
https://github.com/scikit-learn/scikit-learn/blob/75aa03505549a455e1d0a5f747e8cc4e0dd7d550/sklearn/pipeline.py#L414-L420

```python
with _print_elapsed_time("Pipeline", self._log_message(len(self.steps) - 1)):
    if self._final_estimator != "passthrough":
        fit_params_last_step = fit_params_steps[self.steps[-1][0]]
        print("self._final_estimator.fit(Xt, y, **fit_params_last_step)")
        print(self._final_estimator)
        print("Xt", Xt, Xt.shape, type(Xt))
        self._final_estimator.fit(Xt, y, **fit_params_last_step)
```

Then I used the following code, respectively using a `Normalizer` and a `StandardScaler`:

```python
import pandas as pd
import numpy as np

from sklearn.pipeline import Pipeline
from sklearn.preprocessing import StandardScaler, Normalizer
from sklearn.ensemble import GradientBoostingClassifier
from sklearn.feature_selection import SequentialFeatureSelector

# Creating dummy data, adopted from #25711
N = 10
dummy_X = pd.DataFrame(np.random.randn(N, 3), columns=list("abc"))
dummy_y = pd.DataFrame(np.random.choice([0, 1], size=(N, 1)), columns=["label"])

# Creating correct pipeline
pipe = Pipeline(
    [
        ("Preprocessing", StandardScaler()),
        ("Learning", GradientBoostingClassifier()),
    ]
)

# Fitting the model using SequentialFeatureSelector
# In the class Pipeline, printed the input to the final estimator
print("Fitting correct pipeline")
print("------------------------")
sfs = SequentialFeatureSelector(pipe)
sfs.fit(dummy_X, dummy_y)

# Creating faulty pipeline
faulty_pipe = Pipeline(
    [
        ("Preprocessing", Normalizer()),
        ("Learning", GradientBoostingClassifier()),
    ]
)

# Fitting the model using SequentialFeatureSelector
# In the class Pipeline, printed the input to the final estimator
print("Fitting faulty pipeline")
print("-----------------------")
faulty_sfs = SequentialFeatureSelector(faulty_pipe)
faulty_sfs.fit(dummy_X, dummy_y)
```

### Expected Results

The expected result is that, with either `StandardScaler` (that transforms each feature) or `Normalizer` (that transforms each sample), the `Xt` that is passed into the last estimator in the pipeline should be kind of random (because the original data is random).

### Actual Results

For the `StandardScalar`, I got
```
self._final_estimator.fit(Xt, y, **fit_params_last_step)
GradientBoostingClassifier()
Xt [[ 1.44911814]
 [ 0.30786986]
 [ 0.31529636]
 [ 0.71013191]
 [-0.70218243]
 [ 0.78120551]
 [-1.4771622 ]
 [-1.38427716]] (8, 1) <class 'numpy.ndarray'>
self._final_estimator.fit(Xt, y, **fit_params_last_step)
GradientBoostingClassifier()
Xt [[-1.08849001]
 [-1.28788874]
 [ 0.93887755]
 [ 1.29130753]
 [ 0.03067658]
 [ 1.35474778]
 [-0.66106991]
 [-0.57816078]] (8, 1) <class 'numpy.ndarray'>

etc.
```
This seems to be correct.

However, for the `Normalizer`, I got
```
self._final_estimator.fit(Xt, y, **fit_params_last_step)
GradientBoostingClassifier()
Xt [[ 1.]
 [ 1.]
 [ 1.]
 [ 1.]
 [-1.]
 [ 1.]
 [-1.]
 [-1.]] (8, 1) <class 'numpy.ndarray'>
self._final_estimator.fit(Xt, y, **fit_params_last_step)
GradientBoostingClassifier()
Xt [[-1.]
 [-1.]
 [ 1.]
 [ 1.]
 [-1.]
 [ 1.]
 [-1.]
 [-1.]] (8, 1) <class 'numpy.ndarray'>

etc.
```
This seems to be incorrect. Since `ColumnTransformer` deals with each feature (column) respectively, `Normalizer` than transforms with respect to each sample is not working well. It is making every single feature consist of only -1 and 1. I assume that this is not what we expect when using `Normalizer` with `ColumnTransformer`.

### Versions

```shell
System:
    python: 3.9.16 | packaged by conda-forge | (main, Feb  1 2023, 21:28:38) [MSC v.1929 64 bit (AMD64)]
executable: D:\Downloads\miniforge3\envs\sklearn-env\python.exe
   machine: Windows-10-10.0.22621-SP0

Python dependencies:
      sklearn: 1.3.dev0
          pip: 23.0.1
   setuptools: 67.6.0
        numpy: 1.22.4
        scipy: 1.10.1
       Cython: 0.29.33
       pandas: 1.5.3
   matplotlib: 3.7.1
       joblib: 1.2.0
threadpoolctl: 3.1.0

Built with OpenMP: True

threadpoolctl info:
       user_api: blas
   internal_api: openblas
         prefix: libopenblas
       filepath: C:\Users\17458\AppData\Roaming\Python\Python39\site-packages\numpy\.libs\libopenblas.EL2C6PLE4ZYW3ECEVIV3OXXGRN2NRFM2.gfortran-win_amd64.dll
        version: 0.3.18
threading_layer: pthreads
   architecture: Haswell
    num_threads: 12

       user_api: blas
   internal_api: mkl
         prefix: libblas
       filepath: D:\Downloads\miniforge3\envs\sklearn-env\Library\bin\libblas.dll        
        version: 2022.1-Product
threading_layer: intel
    num_threads: 6

       user_api: openmp
   internal_api: openmp
         prefix: vcomp
       filepath: D:\Downloads\miniforge3\envs\sklearn-env\vcomp140.dll
        version: None
    num_threads: 12
```

COMMENT:
If we have a pipeline passed into the `SequentialFeatureSelector`, I think we may do the transforms in advance and only keep the final estimator in the pipeline. However, I'm not sure if this would give the expected behavior. For instance, when performing cross validation, `SequentialFeatureSelector` will split each column into training and testing sets, and then use the pipeline to transform them respectively. Then the behavior of transforming in advance would be completely different. I'm not sure which one is desired. When users use `SequentialFeatureSelectors` with `Pipelines`, do they really expect those transformers to be applied over and over again on each column or do they simply what to transform the original data?

Labels: Bug, Needs Triage