sklearn.utils.metadata_routing.MetadataRequest#

class sklearn.utils.metadata_routing.MetadataRequest(owner)[source]#

Contains the metadata request info of a consumer.

Instances of MethodMetadataRequest are used in this class for each available method under metadatarequest.{method}.

Consumer-only classes such as simple estimators return a serialized version of this class as the output of get_metadata_routing().

New in version 1.3.

Parameters:
ownerstr

The name of the object to which these requests belong.

Methods

consumes(method, params)

Check whether the given parameters are consumed by the given method.

consumes(method, params)[source]#

Check whether the given parameters are consumed by the given method.

New in version 1.4.

Parameters:
methodstr

The name of the method to check.

paramsiterable of str

An iterable of parameters to check.

Returns:
consumedset of str

A set of parameters which are consumed by the given method.