by tensorflow

tensorflow /lattice

Lattice methods in TensorFlow

440 Stars 76 Forks Last release: Not found Apache License 2.0 84 Commits 14 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

TensorFlow Lattice

TensorFlow Lattice is a library that implements constrained and interpretable lattice based models. It is an implementation of Monotonic Calibrated Interpolated Look-Up Tables in TensorFlow.

The library enables you to inject domain knowledge into the learning process through common-sense or policy-driven shape constraints. This is done using a collection of Keras layers that can satisfy constraints such as monotonicity, convexity and pairwise trust:

  • PWLCalibration: piecewise linear calibration of signals.
  • CategoricalCalibration: mapping of categorical inputs into real values.
  • Lattice: interpolated look-up table implementation.
  • Linear: linear function with monotonicity and norm constraints.

The library also provides easy to setup canned estimators for common use cases:

  • Calibrated Linear
  • Calibrated Lattice
  • Random Tiny Lattices (RTL)
  • Crystals

With TF Lattice you can use domain knowledge to better extrapolate to the parts of the input space not covered by the training dataset. This helps avoid unexpected model behaviour when the serving distribution is different from the training distribution.

You can install our prebuilt pip package using

pip install tensorflow-lattice

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.