# tf_agents.bandits.multi_objective.multi_objective_scalarizer.ChebyshevScalarizer

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/agents/blob/v0.19.0/tf_agents/bandits/multi_objective/multi_objective_scalarizer.py#L265-L330) |

Implement the Chebyshev Scalarization.

Inherits From: [`Scalarizer`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/bandits/multi_objective/multi_objective_scalarizer/Scalarizer)

    tf_agents.bandits.multi_objective.multi_objective_scalarizer.ChebyshevScalarizer(
        weights: Sequence[https://www.tensorflow.org/agents/api_docs/python/tf_agents/bandits/multi_objective/multi_objective_scalarizer/ScalarFloat],
        reference_point: Sequence[https://www.tensorflow.org/agents/api_docs/python/tf_agents/bandits/multi_objective/multi_objective_scalarizer/ScalarFloat]
    )

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.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `weights` | A `Sequence` of weights. |
| `reference_point` | A `Sequence` of coordinates for the reference point. |

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `ValueError` | if `len(weights) != len(reference_point)`. |

<br />

## Methods

### `set_parameters`

[View source](https://github.com/tensorflow/agents/blob/v0.19.0/tf_agents/bandits/multi_objective/multi_objective_scalarizer.py#L312-L330)

    set_parameters(
        weights: tf.Tensor, reference_point: tf.Tensor
    )

Set the scalarization parameters for the ChebyshevScalarizer.

<br />

<br />

<br />

| Args ||
|---|---|
| `weights` | A rank-2 [`tf.Tensor`](https://www.tensorflow.org/api_docs/python/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`](https://www.tensorflow.org/api_docs/python/tf/Tensor) of coordinates for the reference point that must satisfy the same rank and shape requirements as `weights`. |

<br />

<br />

<br />

<br />

| 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`. |

<br />

### `__call__`

[View source](https://github.com/tensorflow/agents/blob/v0.19.0/tf_agents/bandits/multi_objective/multi_objective_scalarizer.py#L135-L161)

    __call__(
        multi_objectives: tf.Tensor
    ) -> tf.Tensor

Returns a single reward by scalarizing multiple objectives.

<br />

<br />

<br />

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

<br />

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

<br />

<br />

<br />

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

<br />