Class Feature


  • public final class Feature
    extends java.lang.Object
    A class contains feature name and its Featurizer.
    • Constructor Summary

      Constructors 
      Constructor Description
      Feature​(java.lang.String name, boolean numeric)
      Constructs a Feature instance.
      Feature​(java.lang.String name, Featurizer featurizer)
      Constructs a Feature instance.
      Feature​(java.lang.String name, Featurizer.DataFeaturizer featurizer)
      Constructs a Feature instance.
      Feature​(java.lang.String name, java.util.Map<java.lang.String,​java.lang.Integer> map, boolean onehotEncode)
      Constructs a Feature instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Featurizer getFeaturizer()
      Returns the Featurizer.
      java.lang.String getName()
      Returns the feature name.
      • Methods inherited from class java.lang.Object

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

      • Feature

        public Feature​(java.lang.String name,
                       Featurizer featurizer)
        Constructs a Feature instance.
        Parameters:
        name - the feature name
        featurizer - the Featurizer
      • Feature

        public Feature​(java.lang.String name,
                       Featurizer.DataFeaturizer featurizer)
        Constructs a Feature instance.
        Parameters:
        name - the feature name
        featurizer - the Featurizer
      • Feature

        public Feature​(java.lang.String name,
                       boolean numeric)
        Constructs a Feature instance.
        Parameters:
        name - the feature name
        numeric - true if input is numeric data
      • Feature

        public Feature​(java.lang.String name,
                       java.util.Map<java.lang.String,​java.lang.Integer> map,
                       boolean onehotEncode)
        Constructs a Feature instance.
        Parameters:
        name - the feature name
        map - a map contains categorical value maps to index
        onehotEncode - true if use onehot encode
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns the feature name.
        Returns:
        the feature name
      • getFeaturizer

        public Featurizer getFeaturizer()
        Returns the Featurizer.
        Returns:
        the Featurizer