Class NoopFeatureExtractor
java.lang.Object
org.tribuo.classification.sequence.viterbi.NoopFeatureExtractor
- All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.config.Configurable
,com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
,Serializable
,LabelFeatureExtractor
,ProtoSerializable<org.tribuo.classification.protos.LabelFeatureExtractorProto>
A label feature extractor that doesn't produce any label based features.
It always returns Collections.emptyList()
.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Protobuf serialization version.Fields inherited from interface org.tribuo.protos.ProtoSerializable
DESERIALIZATION_METHOD_NAME, PROVENANCE_SERIALIZER
-
Constructor Summary
ConstructorDescriptionCreates a newLabelFeatureExtractor
that doesn't produce any label based features. -
Method Summary
Modifier and TypeMethodDescriptionstatic NoopFeatureExtractor
deserializeFromProto
(int version, String className, com.google.protobuf.Any message) Deserialization factory.extractFeatures
(List<Label> previousOutcomes, double value) Generates features based on the previously produced labels.com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance
org.tribuo.classification.protos.LabelFeatureExtractorProto
Serializes this object to a protobuf.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.oracle.labs.mlrg.olcut.config.Configurable
postConfig
-
Field Details
-
CURRENT_VERSION
public static final int CURRENT_VERSIONProtobuf serialization version.- See Also:
-
-
Constructor Details
-
NoopFeatureExtractor
public NoopFeatureExtractor()Creates a newLabelFeatureExtractor
that doesn't produce any label based features.
-
-
Method Details
-
deserializeFromProto
public static NoopFeatureExtractor 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.
-
extractFeatures
Description copied from interface:LabelFeatureExtractor
Generates features based on the previously produced labels.- Specified by:
extractFeatures
in interfaceLabelFeatureExtractor
- Parameters:
previousOutcomes
- The previous step's labels.value
- The value to give to the features.- Returns:
- Features.
-
toString
-
getProvenance
public com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance getProvenance()- Specified by:
getProvenance
in interfacecom.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
-
serialize
public org.tribuo.classification.protos.LabelFeatureExtractorProto serialize()Description copied from interface:ProtoSerializable
Serializes this object to a protobuf.- Specified by:
serialize
in interfaceProtoSerializable<org.tribuo.classification.protos.LabelFeatureExtractorProto>
- Returns:
- The protobuf.
-