Class FeatureInformation

java.lang.Object
es.uam.eps.ir.relison.links.data.letor.FeatureInformation

public class FeatureInformation
extends java.lang.Object
Class for storing some information about the features for ML patterns.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    private java.util.List<java.lang.String> descriptions
    Description of the different features.
    private int numFeats
    Number of different features.
    private java.util.List<es.uam.eps.ir.ranksys.core.util.Stats> stats
    Statistics for the different features.
    private java.util.List<FeatureType> types
    Types of the different features.
  • Constructor Summary

    Constructors 
    Constructor Description
    FeatureInformation​(java.util.List<java.lang.String> featureNames, java.util.List<FeatureType> types)
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getFeatureDescription​(int i)
    Obtains the description of a single feature.
    java.util.List<java.lang.String> getFeatureDescriptions()
    Obtains the descriptions of the different features.
    FeatureType getFeatureType​(int i)
    Obtains the description of a single feature.
    java.util.List<FeatureType> getFeatureTypes()
    Obtains the types of the different features.
    java.util.List<es.uam.eps.ir.ranksys.core.util.Stats> getStats()
    Gets the statistics for the different features.
    es.uam.eps.ir.ranksys.core.util.Stats getStats​(int i)
    Gets the statistics for a single feature
    int numFeats()
    The number of features.
    void updateStats​(Instance<?> pattern)
    Updates the statistics of the different features for the collection.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • numFeats

      private final int numFeats
      Number of different features.
    • descriptions

      private final java.util.List<java.lang.String> descriptions
      Description of the different features.
    • types

      private final java.util.List<FeatureType> types
      Types of the different features.
    • stats

      private final java.util.List<es.uam.eps.ir.ranksys.core.util.Stats> stats
      Statistics for the different features.
  • Constructor Details

    • FeatureInformation

      public FeatureInformation​(java.util.List<java.lang.String> featureNames, java.util.List<FeatureType> types)
      Constructor.
      Parameters:
      featureNames - description of the different features.
      types - a list of feature types (continuous or nominal types).
  • Method Details

    • numFeats

      public int numFeats()
      The number of features.
      Returns:
      the number of features.
    • updateStats

      public void updateStats​(Instance<?> pattern)
      Updates the statistics of the different features for the collection.
      Parameters:
      pattern - the new pattern.
    • getStats

      public java.util.List<es.uam.eps.ir.ranksys.core.util.Stats> getStats()
      Gets the statistics for the different features.
      Returns:
      the statistics for the feature.
    • getStats

      public es.uam.eps.ir.ranksys.core.util.Stats getStats​(int i)
      Gets the statistics for a single feature
      Parameters:
      i - the identifier of the feature.
      Returns:
      the statistics if they exist, null otherwise.
    • getFeatureDescriptions

      public java.util.List<java.lang.String> getFeatureDescriptions()
      Obtains the descriptions of the different features.
      Returns:
      the descriptions of the different features.
    • getFeatureDescription

      public java.lang.String getFeatureDescription​(int i)
      Obtains the description of a single feature.
      Parameters:
      i - the identifier of the feature.
      Returns:
      the descriptions of the feature if it exists, null otherwise.
    • getFeatureTypes

      public java.util.List<FeatureType> getFeatureTypes()
      Obtains the types of the different features.
      Returns:
      the types of the different features.
    • getFeatureType

      public FeatureType getFeatureType​(int i)
      Obtains the description of a single feature.
      Parameters:
      i - the identifier of the feature.
      Returns:
      the descriptions of the feature if it exists, null otherwise.