Package org.tensorflow.metadata.v0
Class WeightedFeature.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderType>
-
- com.google.protobuf.GeneratedMessageV3.Builder<WeightedFeature.Builder>
-
- org.tensorflow.metadata.v0.WeightedFeature.Builder
-
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable,WeightedFeatureOrBuilder
- Enclosing class:
- WeightedFeature
public static final class WeightedFeature.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<WeightedFeature.Builder> 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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description WeightedFeature.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)WeightedFeaturebuild()WeightedFeaturebuildPartial()WeightedFeature.Builderclear()WeightedFeature.BuilderclearFeature()Path of a base feature to be weighted.WeightedFeature.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)WeightedFeature.BuilderclearLifecycleStage()The lifecycle_stage determines where a feature is expected to be used, and therefore how important issues with it are.WeightedFeature.BuilderclearName()Name for the weighted feature.WeightedFeature.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)WeightedFeature.BuilderclearWeightFeature()Path of weight feature to associate with the base feature.WeightedFeature.Builderclone()WeightedFeaturegetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()PathgetFeature()Path of a base feature to be weighted.Path.BuildergetFeatureBuilder()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.PathgetWeightFeature()Path of weight feature to associate with the base feature.Path.BuildergetWeightFeatureBuilder()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.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()WeightedFeature.BuildermergeFeature(Path value)Path of a base feature to be weighted.WeightedFeature.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)WeightedFeature.BuildermergeFrom(com.google.protobuf.Message other)WeightedFeature.BuildermergeFrom(WeightedFeature other)WeightedFeature.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)WeightedFeature.BuildermergeWeightFeature(Path value)Path of weight feature to associate with the base feature.WeightedFeature.BuildersetFeature(Path value)Path of a base feature to be weighted.WeightedFeature.BuildersetFeature(Path.Builder builderForValue)Path of a base feature to be weighted.WeightedFeature.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)WeightedFeature.BuildersetLifecycleStage(LifecycleStage value)The lifecycle_stage determines where a feature is expected to be used, and therefore how important issues with it are.WeightedFeature.BuildersetName(String value)Name for the weighted feature.WeightedFeature.BuildersetNameBytes(com.google.protobuf.ByteString value)Name for the weighted feature.WeightedFeature.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)WeightedFeature.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)WeightedFeature.BuildersetWeightFeature(Path value)Path of weight feature to associate with the base feature.WeightedFeature.BuildersetWeightFeature(Path.Builder builderForValue)Path of weight feature to associate with the base feature.-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeFrom, newUninitializedMessageException
-
-
-
-
Method Detail
-
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.Builder<WeightedFeature.Builder>
-
clear
public WeightedFeature.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<WeightedFeature.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<WeightedFeature.Builder>
-
getDefaultInstanceForType
public WeightedFeature getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public WeightedFeature build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public WeightedFeature buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public WeightedFeature.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<WeightedFeature.Builder>
-
setField
public WeightedFeature.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<WeightedFeature.Builder>
-
clearField
public WeightedFeature.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<WeightedFeature.Builder>
-
clearOneof
public WeightedFeature.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<WeightedFeature.Builder>
-
setRepeatedField
public WeightedFeature.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<WeightedFeature.Builder>
-
addRepeatedField
public WeightedFeature.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<WeightedFeature.Builder>
-
mergeFrom
public WeightedFeature.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<WeightedFeature.Builder>
-
mergeFrom
public WeightedFeature.Builder mergeFrom(WeightedFeature other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<WeightedFeature.Builder>
-
mergeFrom
public WeightedFeature.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<WeightedFeature.Builder>- Throws:
IOException
-
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.
-
setName
public WeightedFeature.Builder setName(String value)
Name for the weighted feature. This should not clash with other features in the same schema.
optional string name = 1;- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
public WeightedFeature.Builder clearName()
Name for the weighted feature. This should not clash with other features in the same schema.
optional string name = 1;- Returns:
- This builder for chaining.
-
setNameBytes
public WeightedFeature.Builder setNameBytes(com.google.protobuf.ByteString value)
Name for the weighted feature. This should not clash with other features in the same schema.
optional string name = 1;- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
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.
-
setFeature
public WeightedFeature.Builder setFeature(Path value)
Path of a base feature to be weighted. Required.
optional .tensorflow.metadata.v0.Path feature = 2;
-
setFeature
public WeightedFeature.Builder setFeature(Path.Builder builderForValue)
Path of a base feature to be weighted. Required.
optional .tensorflow.metadata.v0.Path feature = 2;
-
mergeFeature
public WeightedFeature.Builder mergeFeature(Path value)
Path of a base feature to be weighted. Required.
optional .tensorflow.metadata.v0.Path feature = 2;
-
clearFeature
public WeightedFeature.Builder clearFeature()
Path of a base feature to be weighted. Required.
optional .tensorflow.metadata.v0.Path feature = 2;
-
getFeatureBuilder
public Path.Builder getFeatureBuilder()
Path of a base feature to be weighted. Required.
optional .tensorflow.metadata.v0.Path feature = 2;
-
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.
-
setWeightFeature
public WeightedFeature.Builder setWeightFeature(Path value)
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;
-
setWeightFeature
public WeightedFeature.Builder setWeightFeature(Path.Builder builderForValue)
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;
-
mergeWeightFeature
public WeightedFeature.Builder mergeWeightFeature(Path value)
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;
-
clearWeightFeature
public WeightedFeature.Builder clearWeightFeature()
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;
-
getWeightFeatureBuilder
public Path.Builder getWeightFeatureBuilder()
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;
-
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.
-
setLifecycleStage
public WeightedFeature.Builder setLifecycleStage(LifecycleStage value)
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;- Parameters:
value- The lifecycleStage to set.- Returns:
- This builder for chaining.
-
clearLifecycleStage
public WeightedFeature.Builder clearLifecycleStage()
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;- Returns:
- This builder for chaining.
-
setUnknownFields
public final WeightedFeature.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<WeightedFeature.Builder>
-
mergeUnknownFields
public final WeightedFeature.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<WeightedFeature.Builder>
-
-