# tfdf.tuner.SearchSpace

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/decision-forests/blob/main/tensorflow_decision_forests/component/tuner/tuner.py#L67-L139) |

Set of hyperparameter and their respective possible values.

    tfdf.tuner.SearchSpace(
        fields: Fields,
        parent_values: Optional[hyperparameter_pb2.HyperParameterSpace.DiscreteCandidates] = None
    )

The user is not expected to create a "SearchSpace" object directly. Instead,
SearchSpace object are instantiated by tuners.

## Methods

### `choice`

[View source](https://github.com/tensorflow/decision-forests/blob/main/tensorflow_decision_forests/component/tuner/tuner.py#L82-L130)

    choice(
        key: str,
        values: Union[List[int], List[float], List[str], List[bool]],
        merge: bool = False
    ) -> 'SearchSpace'

Adds a hyperparameter with a list of possible values.

<br />

<br />

<br />

| Args ||
|---|---|
| `key` | Name of the hyper-parameter. |
| `values` | List of possible value for the hyperparameter. |
| `merge` | If false (default), raises an error if the hyper-parameter already exist. If true, adds values to the parameter if it already exist. |

<br />

<br />

<br />

<br />

| Returns ||
|---|---|
| The conditional SearchSpace corresponding to the values in "values". ||

<br />