Class FeatureVector

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    FeatureVectorWithDescription

    @JsonObject("FeatureVector")
    public class FeatureVector
    extends java.lang.Object
    implements java.io.Serializable
    Feature vector for one well.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      FeatureVector​(WellPosition well, double[] values)
      Creates an instance for the specified well assuming all features are numbers.
      FeatureVector​(WellPosition well, double[] values, boolean[] vocabularyFeatureFlags, java.lang.String[] vocabularyTerms)
      Creates an instance for the specified well.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.Object> getValueObjects()
      Returns the feature vector as a list of objects.
      double[] getValues()
      Returns the array of numerical features.
      boolean[] getVocabularyFeatureFlags()
      Return the array of flags specifying the type of feature where true means vocabulary-based feature and false numerical feature.
      java.lang.String[] getVocabularyTerms()
      Returns the array of vocabulary-based features.
      WellPosition getWellPosition()
      Returns the well position on a plate.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • FeatureVector

        public FeatureVector​(WellPosition well,
                             double[] values)
        Creates an instance for the specified well assuming all features are numbers.
      • FeatureVector

        public FeatureVector​(WellPosition well,
                             double[] values,
                             boolean[] vocabularyFeatureFlags,
                             java.lang.String[] vocabularyTerms)
        Creates an instance for the specified well.
        Parameters:
        values - Array with values of numerical features.
        vocabularyFeatureFlags - Array telling which feature is a numerical one ( false) or a vocabulary term (true).
        vocabularyTerms - Array with values of vocabulary-based features.
        Throws:
        java.lang.IllegalArgumentException - if all arrays have not the same length.
    • Method Detail

      • getWellPosition

        public WellPosition getWellPosition()
        Returns the well position on a plate.
      • getValues

        public double[] getValues()
        Returns the array of numerical features. If the value is Double.NaN it means either an unknown value of the numerical feature or a vocabulary-based feature.
      • getVocabularyFeatureFlags

        public final boolean[] getVocabularyFeatureFlags()
        Return the array of flags specifying the type of feature where true means vocabulary-based feature and false numerical feature.
      • getVocabularyTerms

        public final java.lang.String[] getVocabularyTerms()
        Returns the array of vocabulary-based features. If the value is null it means either an unknown value of the vocabulary-base feature or a numerical feature.
      • getValueObjects

        public java.util.List<java.lang.Object> getValueObjects()
        Returns the feature vector as a list of objects. The list element is either an instance of String (vocabulary-based feature), an instance of Double (numerical feature), or null if the feature is unknown.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object