Class CsvDataset.Feature

  • Enclosing class:
    CsvDataset

    public static final class CsvDataset.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, CsvDataset.Featurizer 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.
    • Constructor Detail

      • Feature

        public Feature​(java.lang.String name,
                       CsvDataset.Featurizer 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 CsvDataset.Featurizer getFeaturizer()
        Returns the Featurizer.
        Returns:
        the Featurizer