tf_agents.bandits.multi_objective.multi_objective_scalarizer.ChebyshevScalarizer

Implement the Chebyshev Scalarization.

Inherits From: Scalarizer

Given a vector of (at least two) objectives M, a weight vector W, and a reference point Z, all having the same dimension, the Chebyshev scalarization is defined as:

min_{i} W_i * (M_i - Z_i).

Note that reference point Z is expected to be dominated by all Pareto-optimal objective vectors.

weights A Sequence of weights.
reference_point A Sequence of coordinates for the reference point.

ValueError if len(weights) != len(reference_point).

Methods

set_parameters

View source

Set the scalarization parameters for the ChebyshevScalarizer.

Args
weights A rank-2 tf.Tensor of weights shaped as [batch_size, self._num_of_objectives], where batch_size should match the batch size of the multi_objectives passed to the scalarizer call.
reference_point A tf.Tensor of coordinates for the reference point that must satisfy the same rank and shape requirements as weights.

Raises
ValueError if any input scalarization parameter tensor is not rank-2, or has a last dimension size that does not match self._num_of_objectives.

__call__

View source

Returns a single reward by scalarizing multiple objectives.

Args
multi_objectives A Tensor of shape [batch_size, number_of_objectives], where each column represents an objective.

Returns: A Tensor of shape [batch_size] representing scalarized rewards.

Raises
ValueError if multi_objectives.shape.rank != 2.
ValueError if multi_objectives.shape.dims[1] != self._num_of_objectives.