Source code for baybe.surrogates.gaussian_process.presets.core
"""Preset configurations for Gaussian process surrogates."""from__future__importannotationsfromenumimportEnumfromtypingimportTYPE_CHECKINGifTYPE_CHECKING:frombaybe.surrogates.gaussian_process.coreimportGaussianProcessSurrogate
[docs]classGaussianProcessPreset(Enum):"""Available Gaussian process surrogate presets."""BAYBE="BAYBE""""Recreates the default settings of the Gaussian process surrogate class."""
[docs]defmake_gp_from_preset(preset:GaussianProcessPreset)->GaussianProcessSurrogate:"""Create a :class:`GaussianProcessSurrogate` from a :class:`GaussianProcessPreset."""# noqa: E501frombaybe.surrogates.gaussian_process.coreimportGaussianProcessSurrogateifpresetisGaussianProcessPreset.BAYBE:returnGaussianProcessSurrogate()raiseValueError(f"Unknown '{GaussianProcessPreset.__name__}' with name '{preset.name}'.")