Class BinningTransformation.BinningTransformer
java.lang.Object
org.tribuo.transform.transformations.BinningTransformation.BinningTransformer
- All Implemented Interfaces:
Serializable,ProtoSerializable<org.tribuo.protos.core.TransformerProto>,Transformer
- Enclosing class:
BinningTransformation
public static final class BinningTransformation.BinningTransformer
extends Object
implements Transformer
The implementation of a
Transformer which splits the input into n bins.- 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
ConstructorsConstructorDescriptionBinningTransformer(BinningTransformation.BinningType type, double[] bins, double[] values) Constructs a binning transformer with the supplied bin widths and bin values. -
Method Summary
-
Field Details
-
CURRENT_VERSION
public static final int CURRENT_VERSIONProtobuf serialization version.- See Also:
-
-
Constructor Details
-
BinningTransformer
Constructs a binning transformer with the supplied bin widths and bin values.- Parameters:
type- The type of the generated bins.bins- The bin start/end points.values- The values for each bin.
-
-
Method Details
-
transform
public double transform(double input) Description copied from interface:TransformerApplies the transformation to the supplied input value.- Specified by:
transformin interfaceTransformer- Parameters:
input- The value to transform.- Returns:
- The transformed value.
-
toString
-
equals
-
hashCode
-
serialize
public org.tribuo.protos.core.TransformerProto serialize()Description copied from interface:ProtoSerializableSerializes this object to a protobuf.- Specified by:
serializein interfaceProtoSerializable<org.tribuo.protos.core.TransformerProto>- Returns:
- The protobuf.
-