Class NoopNormalizer
java.lang.Object
org.tribuo.math.util.NoopNormalizer
- All Implemented Interfaces:
Serializable,VectorNormalizer,ProtoSerializable<org.tribuo.math.protos.NormalizerProto>
NoopNormalizer returns a copy in
normalize(double[]) and is a no-op in place.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intProtobuf serialization version.Fields inherited from interface org.tribuo.protos.ProtoSerializable
DESERIALIZATION_METHOD_NAME, PROVENANCE_SERIALIZER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic NoopNormalizerdeserializeFromProto(int version, String className, com.google.protobuf.Any message) Deserialization factory.booleanexportNormalizer(ONNXNode input) Returns its input.inthashCode()double[]normalize(double[] input) Normalizes the input array in some fashion specified by the class.voidnormalizeInPlace(double[] input) In place normalization of the array.org.tribuo.math.protos.NormalizerProtoSerializes this object to a protobuf.
-
Field Details
-
CURRENT_VERSION
public static final int CURRENT_VERSIONProtobuf serialization version.- See Also:
-
-
Constructor Details
-
NoopNormalizer
public NoopNormalizer()Constructs a NoopNormalizer.
-
-
Method Details
-
deserializeFromProto
public static NoopNormalizer deserializeFromProto(int version, String className, com.google.protobuf.Any message) Deserialization factory.- Parameters:
version- The serialized object version.className- The class name.message- The serialized data.- Returns:
- The deserialized object.
-
serialize
public org.tribuo.math.protos.NormalizerProto serialize()Description copied from interface:ProtoSerializableSerializes this object to a protobuf.- Specified by:
serializein interfaceProtoSerializable<org.tribuo.math.protos.NormalizerProto>- Returns:
- The protobuf.
-
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 its input.- Specified by:
exportNormalizerin interfaceVectorNormalizer- Parameters:
input- The node to be normalized according to this implementation.- Returns:
- the input node
-
equals
-
hashCode
-