enums
pytorch_lattice.enums
Enum Classes for PyTorch Lattice.
CategoricalCalibratorInit
Bases: _Enum
Type of kernel initialization to use for CategoricalCalibrator.
- UNIFORM: initialize the kernel with uniformly distributed values. The sample range
will be [
output_min
,output_max
] if both are provided. - CONSTANT: initialize the kernel with a constant value for all categories. This
value will be
(output_min + output_max) / 2
if both are provided.
Source code in pytorch_lattice/enums.py
InputKeypointsInit
Bases: _Enum
Type of initialization to use for NumericalCalibrator input keypoints.
- QUANTILES: initialize the input keypoints such that each segment will see the same number of examples.
- UNIFORM: initialize the input keypoints uniformly spaced in the feature range.
Source code in pytorch_lattice/enums.py
InputKeypointsType
Bases: _Enum
The type of input keypoints to use.
- FIXED: the input keypoints will be fixed during initialization.
- LEARNED: the interior keypoints will learn through training to best fit the piecewise linear function.
Source code in pytorch_lattice/enums.py
Interpolation
Bases: _Enum
Enum for interpolation method of lattice.
- HYPERCUBE: n-dimensional hypercube surrounding input point(s).
- SIMPLEX: uses only one of the n! simplices in the n-dim hypercube.
Source code in pytorch_lattice/enums.py
LatticeInit
Bases: _Enum
Type of kernel initialization to use for CategoricalCalibrator.
- LINEAR: initialize the kernel with weights represented by a linear function, conforming to monotonicity and unimodality constraints.
- RANDOM_MONOTONIC: initialize the kernel with a uniformly random sampled lattice layer weight tensor, conforming to monotonicity and unimodality constraints.
Source code in pytorch_lattice/enums.py
Monotonicity
Bases: _Enum
Type of monotonicity constraint.
- INCREASING: increasing monotonicity i.e. increasing input increases output.
- DECREASING: decreasing monotonicity i.e. increasing input decreases output.
Source code in pytorch_lattice/enums.py
NumericalCalibratorInit
Bases: _Enum
Type of kernel initialization to use for NumericalCalibrator.
- EQUAL_HEIGHTS: initialize the kernel such that all segments have the same height.
- EQUAL_SLOPES: initialize the kernel such that all segments have the same slope.