Error for not providing the optional arguments for the feature selection methods

### Describe the bug

Hi, 
here https://github.com/scikit-learn/scikit-learn/blob/364c77e047ca08a95862becf40a04fe9d4cd2c98/sklearn/base.py#L850  and more specifically here https://github.com/scikit-learn/scikit-learn/blob/364c77e047ca08a95862becf40a04fe9d4cd2c98/sklearn/base.py#L876  it says that the ``y`` argument is optional. 
But in practice you'd get an error if you do not provide `y` 

The problem rises when you want to have a feature selection for images with different shapes. 
Consider this scenario, We have two separate Dataframes such as: 

- data_feature.csv : 180 images x 500 features 
- Each row is 500 features vector consisting of the bag of words based on SIFT descriptions. All 180 images are sampled from NUS-WIDE dataset. the feature dataframe is 5 rows × 500 columns

Unless you reshape the Dataframe for the feature it is practically impossible to provide both `X` and `y` for the feature selection methods such as: 

```
Pearson’s Correlation Coefficient: f_regression()
ANOVA: f_classif()
Chi-Squared: chi2()
Mutual Information: mutual_info_classif() and mutual_info_regression() 
``` 

Here ``y`` should be optional which is not. 

```
### Steps/Code to Reproduce

#### import a dataset such as mturk-user-perceived-clusters-over-images

from sklearn.feature_selection import SelectKBest, chi2, f_regression    

Maindata = pd.read_csv("../input/mturk-user-perceived-clusters-over-images/cluster_data.csv")
Maindata.head()

MainFeatures= pd.read_csv("../input/mturk-user-perceived-clusters-over-images/data_feature.csv")
MainFeatures.head()

#### Due to different shapes, we can not get a result in feature selection

X = Maindata
y = MainFeatures 

#### You'd get errors here
fs = SelectKBest(score_func=f_regression, k=10)

#### apply feature selection
X_selected = fs.fit_transform(X, y='None')
print(X_selected.shape)


### Expected Results

X_selected = fs.fit_transform(X, y='None')
#### we should have the X_selected  without any problem.
```

### Actual Results

TypeError: _BaseFilter.fit() missing 1 required positional argument: 'y'

### Versions

```shell
System:
    python: 3.10.10 | packaged by conda-forge | (main, Mar 24 2023, 20:08:06) [GCC 11.3.0]
executable: /opt/conda/bin/python3.10
   machine: Linux-5.15.109+-x86_64-with-glibc2.31

Python dependencies:
      sklearn: 1.2.2
          pip: 23.0.1
   setuptools: 59.8.0
        numpy: 1.23.5
        scipy: 1.7.3
       Cython: 0.29.34
       pandas: 1.5.3
   matplotlib: 3.6.3
       joblib: 1.2.0
threadpoolctl: 3.1.0

Built with OpenMP: True

threadpoolctl info:
       user_api: blas
   internal_api: openblas
         prefix: libopenblas
       filepath: /opt/conda/lib/python3.10/site-packages/numpy.libs/libopenblas64_p-r0-742d56dc.3.20.so
        version: 0.3.20
threading_layer: pthreads
   architecture: Haswell
    num_threads: 4

       user_api: openmp
   internal_api: openmp
         prefix: libgomp
       filepath: /opt/conda/lib/python3.10/site-packages/scikit_learn.libs/libgomp-a34b3233.so.1.0.0
        version: None
    num_threads: 4

       user_api: blas
   internal_api: openblas
         prefix: libopenblas
       filepath: /opt/conda/lib/python3.10/site-packages/scipy.libs/libopenblasp-r0-8b9e111f.3.17.so
        version: 0.3.17
threading_layer: pthreads
   architecture: Haswell
    num_threads: 4
```

COMMENT:
As I see, we do accept multioutput for `y` in many transformers. Please provide a minimal reproducible which can be copy pasted in its entirety producing the error. Otherwise we can't investigate.

Happy to re-open whenever there's a reproducible.

Labels: Needs Reproducible Code