Class FeatureTypeConfig

java.lang.Object
com.linkedin.feathr.common.FeatureTypeConfig
All Implemented Interfaces:
Serializable

public class FeatureTypeConfig extends Object implements Serializable
This class encapsulates the type definition for a feature. This implementation supports Feathr's high level semantic type system (e.g. NUMERIC, BOOLEAN, VECTOR) and the new Tensor type system which includes additional metadata such as category, dimensions, shape, value type and etc. When the feature type annotation from the feature definition is processed, the following scenarios are expected: 1. No type annotated --> (FeatureType=UNSPECIFIED, TensorType=null) 2. High level semantic NON-TENSOR feature types --> (FeatureType=, TensorType=) 3. Parameterized Tensor type annotated --> (FeatureTypes = TENSOR, TensorType = )
See Also:
  • Field Details

    • UNDEFINED_TYPE_CONFIG

      public static final FeatureTypeConfig UNDEFINED_TYPE_CONFIG
    • NUMERIC_TYPE_CONFIG

      public static final FeatureTypeConfig NUMERIC_TYPE_CONFIG
    • DENSE_VECTOR_TYPE_CONFIG

      public static final FeatureTypeConfig DENSE_VECTOR_TYPE_CONFIG
    • TERM_VECTOR_TYPE_CONFIG

      public static final FeatureTypeConfig TERM_VECTOR_TYPE_CONFIG
    • CATEGORICAL_TYPE_CONFIG

      public static final FeatureTypeConfig CATEGORICAL_TYPE_CONFIG
    • CATEGORICAL_SET_TYPE_CONFIG

      public static final FeatureTypeConfig CATEGORICAL_SET_TYPE_CONFIG
  • Constructor Details

    • FeatureTypeConfig

      public FeatureTypeConfig()
    • FeatureTypeConfig

      public FeatureTypeConfig(FeatureTypes featureType)
      Constructs a new instance with the legacy FeatureTypes. The corresponding TensorType will be populated
    • FeatureTypeConfig

      public FeatureTypeConfig(@Nonnull TensorType tensorType)
      Constructs a new instance with the new TensorType. The corresponding the legacy FeatureTypes will be populated as FeatureTypes.TENSOR
    • FeatureTypeConfig

      public FeatureTypeConfig(@Nonnull FeatureTypes featureType, @Nonnull TensorType tensorType, String documentation)
      Package private constructor where both the legacy type and tensor types are passed in. This constructor is reserved for internal use only and does not provide any of consistency checking between legacy types and TensorType from the other pubic constructors
  • Method Details

    • getDocumentation

      public String getDocumentation()
    • hasTensorType

      public boolean hasTensorType()
    • getFeatureType

      public FeatureTypes getFeatureType()
    • getTensorType

      public TensorType getTensorType()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object