Package com.linkedin.feathr.common.types
Class DenseVectorFeatureType
java.lang.Object
com.linkedin.feathr.common.types.FeatureType
com.linkedin.feathr.common.types.DenseVectorFeatureType
A FeatureType class for Feathr's DENSE_VECTOR feature type.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.linkedin.feathr.common.types.FeatureType
FeatureType.BasicType -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanintgetSize()inthashCode()toString()static DenseVectorFeatureTypewithSize(int size) Returns a DenseVectorType for a vector of known fixed size.static DenseVectorFeatureTypeReturns a DenseVectorType for a vector of unknown/dynamic size.Methods inherited from class com.linkedin.feathr.common.types.FeatureType
getBasicType
-
Field Details
-
UNKNOWN_SIZE
public static final int UNKNOWN_SIZE- See Also:
-
-
Method Details
-
withSize
Returns a DenseVectorType for a vector of known fixed size.- Parameters:
size- The fixed vector size for features of this type. If a feature's type is DenseVectorFeatureType with size 100, then for all instances of this feature (in all examples/observations) the feature value will always be represented as an array of length 100.
-
withUnknownSize
Returns a DenseVectorType for a vector of unknown/dynamic size. If a feature's type is DenseVectorFeatureType with size UNKNOWN_SIZE, then instances of this feature in various examples/observations may have different sizes. -
getSize
public int getSize()- Returns:
- the size, which might be
UNKNOWN_SIZE
-
equals
-
hashCode
public int hashCode() -
toString
-