Class FloatFeatureBuilder
- java.lang.Object
-
- com.c12e.cortex.profiles.featurecatalog.featurebuilder.BaseFeatureBuilder
-
- com.c12e.cortex.profiles.featurecatalog.featurebuilder.FloatFeatureBuilder
-
- All Implemented Interfaces:
FeatureBuilder
public class FloatFeatureBuilder extends BaseFeatureBuilder
Implementation of aBaseFeatureBuilder
for handling non-integral data types.
-
-
Field Summary
-
Fields inherited from class com.c12e.cortex.profiles.featurecatalog.featurebuilder.BaseFeatureBuilder
DEFAULT_PROFILE_GROUP
-
-
Constructor Summary
Constructors Constructor Description FloatFeatureBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDataType()
String representation of the SparkDataType
for the feature.java.lang.String
getFeatureType()
String representation of the feature type in Cortex (e.g.void
inferFromSample(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> sampleDf, java.lang.String fieldName)
ComputesFeature
attributes from the provided sample data, specificallyFeature#uniqueCount
andFeature#pctNull
.-
Methods inherited from class com.c12e.cortex.profiles.featurecatalog.featurebuilder.BaseFeatureBuilder
build, getRecordCount, setDescription, setFieldName, setMaxValue, setMeanValue, setMinValue, setNotes, setObservations, setPctDom, setPctNull, setProfileGroup, setProject, setRecordCount, setSourceName, setStdDev, setUniqueCount
-
-
-
-
Method Detail
-
inferFromSample
public void inferFromSample(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> sampleDf, java.lang.String fieldName)
Description copied from class:BaseFeatureBuilder
ComputesFeature
attributes from the provided sample data, specificallyFeature#uniqueCount
andFeature#pctNull
.- Specified by:
inferFromSample
in interfaceFeatureBuilder
- Overrides:
inferFromSample
in classBaseFeatureBuilder
- Parameters:
sampleDf
- sample data to infer the Feature properties fromfieldName
- name of the field in the Dataset
-
getDataType
public java.lang.String getDataType()
Description copied from interface:FeatureBuilder
String representation of the SparkDataType
for the feature.- Returns:
- String data type
-
getFeatureType
public java.lang.String getFeatureType()
Description copied from interface:FeatureBuilder
String representation of the feature type in Cortex (e.g. "numeric", "categorical").- Returns:
- String feature type
-
-