# tfl.premade_lib.set_random_lattice_ensemble

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/lattice/blob/v2.1.1/tensorflow_lattice/python/premade_lib.py#L945-L981) |

Sets random lattice ensemble in the given model_config.

#### View aliases


**Main aliases**

[`tfl.premade.premade_lib.set_random_lattice_ensemble`](https://www.tensorflow.org/lattice/api_docs/python/tfl/premade_lib/set_random_lattice_ensemble)

<br />

    tfl.premade_lib.set_random_lattice_ensemble(
        model_config, feature_names=None
    )

### Used in the notebooks

| Used in the tutorials |
|---|
| - [TF Lattice Premade Models](https://www.tensorflow.org/lattice/tutorials/premade_models) |

<br />

<br />

<br />

| ## Args ||
|---|---|
| `model_config` | Model configuration object describing model architecture. Should be one of the model configs in [`tfl.configs`](https://www.tensorflow.org/lattice/api_docs/python/tfl/configs). |
| `feature_names` | A list of feature names. If not provided, feature names will be extracted from the feature configs contained in the model_config. |

<br />