tfl.categorical_calibration_lib.project

Monotonicity/bounds constraints implementation for categorical calibration.

Returns the approximate L2 projection of the CategoricalCalibration weights into the constrained parameter space.

weights Tensor which represents weights of Categorical calibration layer.
output_min Lower bound constraint on weights.
output_max Upper bound constraint on weights.
monotonicities List of pair of indices (i, j), indicating constraint weight[i] <= weight[j].

Projected weights tensor.

ValueError If monotonicities are not of the correct format or are circular.