Class ColumnarFeature
java.lang.Object
org.tribuo.Feature
org.tribuo.data.columnar.ColumnarFeature
- All Implemented Interfaces:
- Serializable,- Cloneable,- Comparable<Feature>
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionColumnarFeature(String fieldName, double value) Constructs aColumnarFeaturefrom the field name.ColumnarFeature(String fieldName, String columnEntry, double value) Constructs aColumnarFeaturefrom the field name, column entry and value.ColumnarFeature(String firstFieldName, String secondFieldName, String columnEntry, double value) Constructs aColumnarFeaturewhich is the conjunction of features from two fields.
- 
Method SummaryModifier and TypeMethodDescriptionstatic StringgenerateFeatureName(String fieldName, String name) Generates a feature name based on the field name and the name.static StringgenerateFeatureName(String firstFieldName, String secondFieldName, String name) Generates a feature name used for conjunction features.Gets the columnEntry (i.e., the feature name produced by theFieldExtractorwithout the fieldName).Gets the field name.If it's a conjunction feature, return the first field name.If it's a conjunction feature, return the second field name.
- 
Field Details- 
CONJUNCTIONThe string used as the field name of conjunction features.- See Also:
 
- 
JOINER
 
- 
- 
Constructor Details- 
ColumnarFeatureConstructs aColumnarFeaturefrom the field name. The column entry is blank.This produces a ColumnarFeature which is identical to a Feature. - Parameters:
- fieldName- The field name.
- value- The feature value.
 
- 
ColumnarFeature
- 
ColumnarFeaturepublic ColumnarFeature(String firstFieldName, String secondFieldName, String columnEntry, double value) Constructs aColumnarFeaturewhich is the conjunction of features from two fields.- Parameters:
- firstFieldName- The first field name.
- secondFieldName- The second field name.
- columnEntry- The name of the extracted value from the field.
- value- The feature value.
 
 
- 
- 
Method Details- 
generateFeatureName
- 
generateFeatureNamepublic static String generateFeatureName(String firstFieldName, String secondFieldName, String name) Generates a feature name used for conjunction features.Uses JOINERto join the strings andCONJUNCTIONto prepend the name.- Parameters:
- firstFieldName- The name of the first field.
- secondFieldName- The name of the second field.
- name- The name of the extracted feature.
- Returns:
- The new feature name.
 
- 
getFieldNameGets the field name. ReturnsCONJUNCTIONif it's a conjunction.- Returns:
- The field name.
 
- 
getFirstFieldNameIf it's a conjunction feature, return the first field name. Otherwise return an empty String.- Returns:
- The first field name, or an empty string.
 
- 
getSecondFieldNameIf it's a conjunction feature, return the second field name. Otherwise return an empty String.- Returns:
- The second field name, or an empty string.
 
- 
getColumnEntryGets the columnEntry (i.e., the feature name produced by theFieldExtractorwithout the fieldName).- Returns:
- The feature's column entry.
 
 
-