approximate_crappifier#
from pssr.train import approximate_crappifier
- pssr.train.approximate_crappifier(crappifier: Crappifier, space: list[Dimension], dataset: Dataset, max_images=None, opt_kwargs=None)#
Approximates
Crappifier
parameters from ground truth paired images. Uses Bayesian optimization because Crappifier functions are not differentiable.- Parameters:
crappifier (Crappifier) – Crappifier whose parameter space will be optimized.
space (list[Dimension]) – List of parameter spaces for each crappifier parameter.
dataset (Dataset) – Paired image dataset to load data from.
max_images (int) – Number of image samples to average computations over for each optimization step. Default is None, using all images in dataset.
opt_kwargs (dict[str, Any]) – Keyword arguments for skopt
gp_minimize
. Default is None