piglot.objectives.response_objective.ResponseComposition

class ResponseComposition(objectives: List[ResponseSingleObjective], scalarisation: Scalarisation | None = None)[source]

Bases: Composition, ABC

Generic class for compositions to use for response-based objectives.

Methods

composition

Abstract method for computing the outer function of the composition

composition_torch

Compute the composition for all objectives.

get_latent_space

Compute the latent space representation of the given results.

composition(inner: ndarray, params: ndarray) ndarray

Abstract method for computing the outer function of the composition

Parameters

innernp.ndarray

Return value from the inner function

paramsnp.ndarray

Parameters for the given responses

Returns

np.ndarray

Composition result

abstract composition_torch(inner: Tensor, params: Tensor) Tensor[source]

Compute the composition for all objectives.

Parameters

innertorch.Tensor

Return value from the inner function.

paramstorch.Tensor

Paratemers for the given responses.

Returns

torch.Tensor

Composition results.

abstract get_latent_space(params: ndarray, raw_responses: Dict[str, OutputResult]) Tuple[ndarray, ndarray][source]

Compute the latent space representation of the given results.

Parameters

paramsnp.ndarray

Parameter values for these results.

raw_responsesDict[str, OutputResult]

Raw responses from the solver.

Returns

Tuple[np.ndarray, np.ndarray]

Latent space representation of the results: mean and covariance.