Interface FeatureBuilder

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      com.c12e.cortex.phoenix.Feature build()
      Build and creates an instantiated Feature instance.
      java.lang.String getDataType()
      String representation of the Spark DataType for the feature.
      java.lang.String getFeatureType()
      String representation of the feature type in Cortex (e.g.
      default void inferFromSample​(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> sampleDf, java.lang.String fieldName)
      Infers feature properties based on the Dataset sample.
    • Method Detail

      • getDataType

        java.lang.String getDataType()
        String representation of the Spark DataType for the feature.
        Returns:
        String data type
      • getFeatureType

        java.lang.String getFeatureType()
        String representation of the feature type in Cortex (e.g. "numeric", "categorical").
        Returns:
        String feature type
      • build

        com.c12e.cortex.phoenix.Feature build()
        Build and creates an instantiated Feature instance.
        Returns:
        instantiated feature
      • inferFromSample

        default void inferFromSample​(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> sampleDf,
                                     java.lang.String fieldName)
        Infers feature properties based on the Dataset sample. Defaulted to a no-op.
        Parameters:
        sampleDf - sample data to infer the Feature properties from
        fieldName - name of the field in the Dataset