Class DenseVectorFeatureValue

java.lang.Object
com.linkedin.feathr.common.value.DenseVectorFeatureValue
All Implemented Interfaces:
FeatureValue

public class DenseVectorFeatureValue extends Object implements FeatureValue
A specific FeatureValue class for DENSE_VECTOR features. Underlying representation is an array of float.
  • Method Details

    • fromFloatArray

      public static DenseVectorFeatureValue fromFloatArray(float[] floatArray)
      Returns:
      a DenseVectorFeatureValue of unknown/dynamic size for the provided array of floats
    • fromNumberList

      public static DenseVectorFeatureValue fromNumberList(Collection<? extends Number> numbers)
      Returns:
      a DenseVectorFeatureValue of unknown/dynamic size for the provided collection of numbers
    • getFloatArray

      public float[] getFloatArray()
      Returns:
      the float array backing this dense-vector
    • getFeatureType

      public FeatureType getFeatureType()
      Specified by:
      getFeatureType in interface FeatureValue
      Returns:
      the FeatureType of this feature
    • 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