Class Feature

java.lang.Object
ai.djl.basicdataset.tabular.utils.Feature

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

    • Feature

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

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

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

      public Feature(String name, Map<String,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 Details

    • getName

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

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