Documentation of 'smile.feature.DateFeature' Java class
DateFeature
smile.feature

Class DateFeature

  • All Implemented Interfaces:
    FeatureGenerator<java.util.Date>


    public class DateFeature
    extends java.lang.Object
    implements FeatureGenerator<java.util.Date>
    Date/time feature generator. A date attribute is usually represented by a long value that is the milliseconds since January 1, 1970, 00:00:00 GMT. Such a value is meaningless in data mining in general. One usually extract information such as year, month, day, etc. as features in further analysis.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class and Description
      static class  DateFeature.Type
      The types of date/time features.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      Attribute[] attributes()
      Returns the variable attributes of generated features.
      double[] feature(java.util.Date date)
      Generates a feature for given object.
      • Methods inherited from class java.lang.Object

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

      • DateFeature

        public DateFeature(DateFeature.Type[] types)
        Constructor.
        Parameters:
        types - the types of features to be generated.
    • Method Detail

      • attributes

        public Attribute[] attributes()
        Description copied from interface: FeatureGenerator
        Returns the variable attributes of generated features. Note that these are NOT the original variable attributes of objects.
        Specified by:
        attributes in interface FeatureGenerator<java.util.Date>
        Returns:
        the variable attributes of generated features
      • feature

        public double[] feature(java.util.Date date)
        Description copied from interface: FeatureGenerator
        Generates a feature for given object.
        Specified by:
        feature in interface FeatureGenerator<java.util.Date>
        Parameters:
        date - an object of interest.
        Returns:
        a feature vector.

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.