Package org.tensorflow.metadata.v0
Class WeightedFeature
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- org.tensorflow.metadata.v0.WeightedFeature
-
- All Implemented Interfaces:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable,WeightedFeatureOrBuilder
public final class WeightedFeature extends com.google.protobuf.GeneratedMessageV3 implements WeightedFeatureOrBuilder
Represents a weighted feature that is encoded as a combination of raw base features. The `weight_feature` should be a float feature with identical shape as the `feature`. This is useful for representing weights associated with categorical tokens (e.g. a TFIDF weight associated with each token). TODO(b/142122960): Handle WeightedCategorical end to end in TFX (validation, TFX Unit Testing, etc)
Protobuf typetensorflow.metadata.v0.WeightedFeature- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWeightedFeature.BuilderRepresents a weighted feature that is encoded as a combination of raw base features.-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static intFEATURE_FIELD_NUMBERstatic intLIFECYCLE_STAGE_FIELD_NUMBERstatic intNAME_FIELD_NUMBERstatic com.google.protobuf.Parser<WeightedFeature>PARSERDeprecated.static intWEIGHT_FEATURE_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)static WeightedFeaturegetDefaultInstance()WeightedFeaturegetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()PathgetFeature()Path of a base feature to be weighted.PathOrBuildergetFeatureOrBuilder()Path of a base feature to be weighted.LifecycleStagegetLifecycleStage()The lifecycle_stage determines where a feature is expected to be used, and therefore how important issues with it are.StringgetName()Name for the weighted feature.com.google.protobuf.ByteStringgetNameBytes()Name for the weighted feature.com.google.protobuf.Parser<WeightedFeature>getParserForType()intgetSerializedSize()com.google.protobuf.UnknownFieldSetgetUnknownFields()PathgetWeightFeature()Path of weight feature to associate with the base feature.PathOrBuildergetWeightFeatureOrBuilder()Path of weight feature to associate with the base feature.booleanhasFeature()Path of a base feature to be weighted.inthashCode()booleanhasLifecycleStage()The lifecycle_stage determines where a feature is expected to be used, and therefore how important issues with it are.booleanhasName()Name for the weighted feature.booleanhasWeightFeature()Path of weight feature to associate with the base feature.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static WeightedFeature.BuildernewBuilder()static WeightedFeature.BuildernewBuilder(WeightedFeature prototype)WeightedFeature.BuildernewBuilderForType()protected WeightedFeature.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static WeightedFeatureparseDelimitedFrom(InputStream input)static WeightedFeatureparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static WeightedFeatureparseFrom(byte[] data)static WeightedFeatureparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static WeightedFeatureparseFrom(com.google.protobuf.ByteString data)static WeightedFeatureparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static WeightedFeatureparseFrom(com.google.protobuf.CodedInputStream input)static WeightedFeatureparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static WeightedFeatureparseFrom(InputStream input)static WeightedFeatureparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static WeightedFeatureparseFrom(ByteBuffer data)static WeightedFeatureparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<WeightedFeature>parser()WeightedFeature.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
FEATURE_FIELD_NUMBER
public static final int FEATURE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
WEIGHT_FEATURE_FIELD_NUMBER
public static final int WEIGHT_FEATURE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
LIFECYCLE_STAGE_FIELD_NUMBER
public static final int LIFECYCLE_STAGE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PARSER
@Deprecated public static final com.google.protobuf.Parser<WeightedFeature> PARSER
Deprecated.
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getUnknownFields
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
- Specified by:
getUnknownFieldsin interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
hasName
public boolean hasName()
Name for the weighted feature. This should not clash with other features in the same schema.
optional string name = 1;- Specified by:
hasNamein interfaceWeightedFeatureOrBuilder- Returns:
- Whether the name field is set.
-
getName
public String getName()
Name for the weighted feature. This should not clash with other features in the same schema.
optional string name = 1;- Specified by:
getNamein interfaceWeightedFeatureOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()
Name for the weighted feature. This should not clash with other features in the same schema.
optional string name = 1;- Specified by:
getNameBytesin interfaceWeightedFeatureOrBuilder- Returns:
- The bytes for name.
-
hasFeature
public boolean hasFeature()
Path of a base feature to be weighted. Required.
optional .tensorflow.metadata.v0.Path feature = 2;- Specified by:
hasFeaturein interfaceWeightedFeatureOrBuilder- Returns:
- Whether the feature field is set.
-
getFeature
public Path getFeature()
Path of a base feature to be weighted. Required.
optional .tensorflow.metadata.v0.Path feature = 2;- Specified by:
getFeaturein interfaceWeightedFeatureOrBuilder- Returns:
- The feature.
-
getFeatureOrBuilder
public PathOrBuilder getFeatureOrBuilder()
Path of a base feature to be weighted. Required.
optional .tensorflow.metadata.v0.Path feature = 2;- Specified by:
getFeatureOrBuilderin interfaceWeightedFeatureOrBuilder
-
hasWeightFeature
public boolean hasWeightFeature()
Path of weight feature to associate with the base feature. Must be same shape as feature. Required.
optional .tensorflow.metadata.v0.Path weight_feature = 3;- Specified by:
hasWeightFeaturein interfaceWeightedFeatureOrBuilder- Returns:
- Whether the weightFeature field is set.
-
getWeightFeature
public Path getWeightFeature()
Path of weight feature to associate with the base feature. Must be same shape as feature. Required.
optional .tensorflow.metadata.v0.Path weight_feature = 3;- Specified by:
getWeightFeaturein interfaceWeightedFeatureOrBuilder- Returns:
- The weightFeature.
-
getWeightFeatureOrBuilder
public PathOrBuilder getWeightFeatureOrBuilder()
Path of weight feature to associate with the base feature. Must be same shape as feature. Required.
optional .tensorflow.metadata.v0.Path weight_feature = 3;- Specified by:
getWeightFeatureOrBuilderin interfaceWeightedFeatureOrBuilder
-
hasLifecycleStage
public boolean hasLifecycleStage()
The lifecycle_stage determines where a feature is expected to be used, and therefore how important issues with it are.
optional .tensorflow.metadata.v0.LifecycleStage lifecycle_stage = 4;- Specified by:
hasLifecycleStagein interfaceWeightedFeatureOrBuilder- Returns:
- Whether the lifecycleStage field is set.
-
getLifecycleStage
public LifecycleStage getLifecycleStage()
The lifecycle_stage determines where a feature is expected to be used, and therefore how important issues with it are.
optional .tensorflow.metadata.v0.LifecycleStage lifecycle_stage = 4;- Specified by:
getLifecycleStagein interfaceWeightedFeatureOrBuilder- Returns:
- The lifecycleStage.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static WeightedFeature parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static WeightedFeature parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static WeightedFeature parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static WeightedFeature parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static WeightedFeature parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static WeightedFeature parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static WeightedFeature parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static WeightedFeature parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static WeightedFeature parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static WeightedFeature parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static WeightedFeature parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static WeightedFeature parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public WeightedFeature.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static WeightedFeature.Builder newBuilder()
-
newBuilder
public static WeightedFeature.Builder newBuilder(WeightedFeature prototype)
-
toBuilder
public WeightedFeature.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected WeightedFeature.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static WeightedFeature getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<WeightedFeature> parser()
-
getParserForType
public com.google.protobuf.Parser<WeightedFeature> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public WeightedFeature getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-