# Module: tfl.premade

<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.py) |

TF Lattice premade models implement typical monotonic model architectures.

You can use TFL premade models to easily construct commonly used monotonic model
architectures. To construct a TFL premade model, construct a model configuration
from [`tfl.configs`](https://www.tensorflow.org/lattice/api_docs/python/tfl/configs) and pass it to the premade model constructor. No fields in
the model config will be automatically filled in, so the config must be fully
specified. Note that the inputs to the model should match the order in which
they are defined in the feature configs.

    model_config = tfl.configs.CalibratedLatticeConfig(...)
    calibrated_lattice_model = tfl.premade.CalibratedLattice(
        model_config=model_config)
    calibrated_lattice_model.compile(...)
    calibrated_lattice_model.fit(...)

Supported models are defined in [`tfl.configs`](https://www.tensorflow.org/lattice/api_docs/python/tfl/configs). Each model architecture can be
used the same as any other [`keras.Model`](https://www.tensorflow.org/api_docs/python/tf/keras/Model).

## Modules

[`premade_lib`](https://www.tensorflow.org/lattice/api_docs/python/tfl/premade_lib) module: Implementation of algorithms required for premade models.

## Classes

[`class AggregateFunction`](https://www.tensorflow.org/lattice/api_docs/python/tfl/premade/AggregateFunction): Premade model for Tensorflow aggregate function learning models.

[`class CalibratedLattice`](https://www.tensorflow.org/lattice/api_docs/python/tfl/premade/CalibratedLattice): Premade model for Tensorflow calibrated lattice models.

[`class CalibratedLatticeEnsemble`](https://www.tensorflow.org/lattice/api_docs/python/tfl/premade/CalibratedLatticeEnsemble): Premade model for Tensorflow calibrated lattice ensemble models.

[`class CalibratedLinear`](https://www.tensorflow.org/lattice/api_docs/python/tfl/premade/CalibratedLinear): Premade model for Tensorflow calibrated linear models.

## Functions

[`get_custom_objects(...)`](https://www.tensorflow.org/lattice/api_docs/python/tfl/premade/get_custom_objects): Creates and returns a dictionary mapping names to custom objects.

<br />

<br />

<br />

| ## Other Members ||
|---|---|
| absolute_import | Instance of `__future__._Feature` |
| division | Instance of `__future__._Feature` |
| print_function | Instance of `__future__._Feature` |

<br />