Validate and route input parameters.
This function is used inside a router’s method, e.g. fit, to validate the metadata and handle the routing.
Assuming this signature of a router’s fit method: fit(self, X, y, sample_weight=None, **fit_params), a call to this function would be: process_routing(self, "fit", sample_weight=sample_weight, **fit_params).
Note that if routing is not enabled and kwargs is empty, then it returns an empty routing where process_routing(...).ANYTHING.ANY_METHOD is always an empty dictionary.
Added in version 1.3.
An object implementing get_metadata_routing. Typically a meta-estimator.
The name of the router’s method in which this function is called.
Metadata to be routed.
A Bunch of the form {"object_name": {"method_name":
{params: value}}} which can be used to pass the required metadata to A Bunch of the form {"object_name": {"method_name":
{params: value}}} which can be used to pass the required metadata to corresponding methods or corresponding child objects. The object names are those defined in obj.get_metadata_routing().
© 2007–2025 The scikit-learn developers
Licensed under the 3-clause BSD License.
https://scikit-learn.org/1.6/modules/generated/sklearn.utils.metadata_routing.process_routing.html