Proposal: Automated Outlier Handling in scikit-learn's Preprocessing Module

### Describe the workflow you want to enable

## How it will work on user's end
- User will just have to import the necessary module, Let's say that this new module will be named FixOutliers
- User will then mention parameters while making an instance of this new module that we are calling FixOutliers
- The user will use .fit_transform function to run it will get new dataset returned 
```python
>>> from sklearn.preprocessing import FixOutliers # Let's Say We've Named It This
>>> fixOut = FixOutliers() # Arguments can be mentioned
>>> X_new = fixOut.fit_transform(X_old) # Let's Assume that X_old is our raw dataset we've
```

### Important Things That Are A Part Of Workflow

- Input Data: The user provides a dataset containing numerical features, which may potentially have outliers.

- Outlier Detection: The preprocessing module automatically detects outliers within the dataset using suitable statistical methods or machine learning algorithms.

- Outlier Handling: The module provides options for handling outliers based on user preferences. This could include various techniques such as imputation, removal, or transformation of outlier values.

- Data Transformation: The module applies the chosen outlier handling technique to the dataset, transforming the outliers according to the specified method.

- Preprocessing Pipeline Integration: The outlier handling functionality seamlessly integrates with the existing scikit-learn preprocessing pipeline. Users can incorporate the outlier handling step into their data preprocessing pipeline along with other preprocessing steps like scaling, encoding, or feature selection.

- Compatibility and Flexibility: The new feature should be designed to be compatible with various types of datasets and able to handle different types of outliers (e.g., univariate or multivariate outliers). It should also offer flexibility in terms of parameterization, allowing users to customize the outlier handling approach based on their specific requirements.


### Describe your proposed solution

## There Can Be Approaches To Deal With The Outliers

### Approach 1: On The Basis Of _Z Score_
 Z = (Datapoint - Mean) / Standard Deviation
Find The Data Points Whose Z-Scores Are Higher Than The Specified Threshold Value (Default Threshold Value Is 3)
That Datapoint Will Be Classified As A Outlier
![image](https://github.com/scikit-learn/scikit-learn/assets/125975388/69ef9071-c87a-40b2-978f-2f7dd0f54b5c)

### Approach 2: On The Basis Of _Inter Quartile Range_
Q1 Is The Point That Accounts 25 Percentile Of All Data
Q2 Is The Point That Accounts 50 Percentile Of All Data
Q3 Is The Point That Accounts 75 Percentile Of All Data
Interquartile Range = Q3 - Q1
Minimum of Quartile = Q1 - (1.5 X Interquartile Range)
Maximum of Quartile = Q3 + (1.5 X Interquartile Range)
Data Points Not In Range Of Minimum of Quartile And Maximum of Quartile Are Outliers 

### Approach 3 - On The Basis Of _Both Approaches_ Mentioned Above
First Outliers Will Detected And Taken Care Of Using 1st Approach Then 2nd Approach

### Describe alternatives you've considered, if relevant

_No response_

### Additional context

By implementing this workflow, scikit-learn users will have a convenient and efficient way to automatically handle and minimize outliers within their datasets during the preprocessing stage.

COMMENT:
One possible way to do this within the limitations of the current transformer/pipeline API for the handling part would be to instead design a meta-estimator to be able to discard (or down-weight) the detected outliers from the training set of the estimator of interest.

Furthermore I would rather separate the detection stage from the handling stage. For the detection stage we already have several multivariate outlier detectors in scikit-learn:

- https://scikit-learn.org/stable/modules/outlier_detection.html

It might make sense to add some `UnivariateOutlierDetector` class with the baseline strategies your propose as they are typically faster than multivariate alternatives and easier to reason about (explain why a data point was detected as an outlier), even if they will be fundamentally blind to some inherently multivariate outliers.

Labels: New Feature, Needs Triage