Class SigmoidNormalizer
java.lang.Object
org.tribuo.math.util.SigmoidNormalizer
- All Implemented Interfaces:
Serializable,VectorNormalizer
Normalizes the input by applying a logistic sigmoid to each element.
Used when the input is independent dimensions of log space.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexportNormalizer(ONNXNode input) Returns the ONNX sigmoid node, operating independently over each element.double[]normalize(double[] input) Normalizes the input array in some fashion specified by the class.voidnormalizeInPlace(double[] input) In place normalization of the array.static doublesigmoid(double input) A logistic sigmoid function.
-
Constructor Details
-
SigmoidNormalizer
public SigmoidNormalizer()
-
-
Method Details
-
sigmoid
public static double sigmoid(double input) A logistic sigmoid function.- Parameters:
input- The input to sigmoid.- Returns:
- The logistic function applied to the input.
-
normalize
public double[] normalize(double[] input) Description copied from interface:VectorNormalizerNormalizes the input array in some fashion specified by the class.- Specified by:
normalizein interfaceVectorNormalizer- Parameters:
input- The input to normalize.- Returns:
- The normalized array.
-
normalizeInPlace
public void normalizeInPlace(double[] input) Description copied from interface:VectorNormalizerIn place normalization of the array.Note: This default implementation performs a copy by calling the standard normalize method.
- Specified by:
normalizeInPlacein interfaceVectorNormalizer- Parameters:
input- The input to normalize.
-
exportNormalizer
Returns the ONNX sigmoid node, operating independently over each element.- Specified by:
exportNormalizerin interfaceVectorNormalizer- Parameters:
input- The node to be normalized according to this implementation.- Returns:
- the sigmoid node applied to input.
-