Setting weights on items when passing list of dicts to RandomizedSearchCV

### Describe the workflow you want to enable

We can pass a list of dictionaries to `RandomizedSearchCV`, for example

```python
[
    {"dim_reduction": "passthrough"},
    {
        "dim_reduction": PCA(),
        "dim_reduction__n_components": [10, 20, ...,]
    }
]
```

If I understand correctly [here](https://github.com/scikit-learn/scikit-learn/blob/main/sklearn/model_selection/_search.py#L335) to get a set of hyperparameters one of the items in the list is chosen with equal probabilities, then a set of parameters is sampled from that dict.

In some cases it would be convenient to control the probability of choosing each list item. For example above I might want to invest more computation time in the "not passthrough" branch. Or if I have a column that can be either dropped or transformed I may want to explore more the "not drop" branch.

In other cases we have to create multiple list items due to nested estimators but that results in one choice for a hyperparameter to be over-represented. For example:

```python
[
    {
        "transformer": Flat(),
        "transformer__a": uniform(0.0, 1.0),
        "transformer__b": uniform(0.0, 1.0),
    },
    {
        "transformer": Nested(),
        "transformer__part": A(),
        "transformer__part__a": uniform(0.0, 1.0),
    },
    {
        "transformer": Nested(),
        "transformer__part": B(),
        "transformer__part__b": uniform(0.0, 1.0),
    },
]
```

I have to create 2 grid items for the Nested() option but if I am equally interested in the Flat() one I might want to set weights [1.0, 0.5, 0.5] on the list of param dicts. Maybe this is not a great example but what I mean is the amount of trials spent on one option can be driven by the structure of the estimators and how they are combined and sometimes it would be helpful to be able to correct or control it.


### Describe your proposed solution

Not sure what could be a nice API, maybe there would be a `distribution_weights` parameter which can only be used when `param_distributions` is a list (not dict) and which must be positive and have the same length as `param_distributions`

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

_No response_

### Additional context

this is more relevant for rather complex pipelines with many interdependant choices to make

COMMENT:
> However, this only works for the first level of discrete decisions.

Thanks @ogrisel! Indeed this would be for the first level; for the second level we can get the distribution we want by using an object with a `rvs()` method as the value. But for the second problem I mentioned (preventing estimator nesting to drive the probabilities due to splitting param distributions), only the first level needs to be weighted.

> Also, since optuna has adaptive optimization methods (TPE, Bayesion Optimization, ...), the initial marginal distribution over the choices is less of a problem because the model can learn a better sampling strategy for the next iterations which is not the case for randomized search.

On the scikit-learn side, when using the HalvingRandomSearchCV I guess the initial distribution matters a bit less as well, because we can afford to try many candidates in the first iteration.

Labels: New Feature, Needs Decision - Include Feature