baybe.surrogates.gaussian_process.components.generic.to_component_factory

baybe.surrogates.gaussian_process.components.generic.to_component_factory(obj: Kernel | FitCriterion | Kernel | Mean | Likelihood | GPComponentFactoryProtocol, /, *, component_type: GPComponentType | None = None)[source]

Wrap a component into a plain component factory (with factory passthrough).

Parameters:
Return type:

GPComponentFactoryProtocol

Returns:

A component factory.

Raises:

TypeError – If the given component does not match the allowed types.