public class ColumnarFeature extends Feature
Example
s may destroy and recreate Feature instances so don't
expect ColumnarFeatures to still be ColumnarFeatures if you probe the
Example after construction.
Modifier and Type | Field and Description |
---|---|
static String |
CONJUNCTION |
static String |
JOINER |
Constructor and Description |
---|
ColumnarFeature(String fieldName,
String columnEntry,
double value)
Constructs a
ColumnarFeature from the field name, column entry and value. |
ColumnarFeature(String firstFieldName,
String secondFieldName,
String columnEntry,
double value)
Constructs a
ColumnarFeature which is the conjunction of features from two fields. |
Modifier and Type | Method and Description |
---|---|
static String |
generateFeatureName(String fieldName,
String name)
Generates a feature name based on the field name.
|
static String |
generateFeatureName(String firstFieldName,
String secondFieldName,
String name)
Generates a feature name used for conjunction features.
|
String |
getColumnEntry()
Gets the columnEntry (i.e., the feature name produced by the
FieldExtractor
without the fieldName). |
String |
getFieldName()
Gets the field name.
|
String |
getFirstFieldName()
If it's a conjunction feature, return the first field name.
|
String |
getSecondFieldName()
If it's a conjunction feature, return the second field name.
|
public static final String CONJUNCTION
public static final String JOINER
public ColumnarFeature(String fieldName, String columnEntry, double value)
ColumnarFeature
from the field name, column entry and value.fieldName
- The field name.columnEntry
- The name of the extracted value from the field.value
- The feature value.public ColumnarFeature(String firstFieldName, String secondFieldName, String columnEntry, double value)
ColumnarFeature
which is the conjunction of features from two fields.firstFieldName
- The first field name.secondFieldName
- The second field name.columnEntry
- The name of the extracted value from the field.value
- The feature value.public static String generateFeatureName(String fieldName, String name)
Uses JOINER
to join the strings.
fieldName
- The field name.name
- The name of the extracted feature.public static String generateFeatureName(String firstFieldName, String secondFieldName, String name)
Uses JOINER
to join the strings and CONJUNCTION
to prepend the name.
firstFieldName
- The name of the first field.secondFieldName
- The name of the second field.name
- The name of the extracted feature.public String getFieldName()
CONJUNCTION
if it's a conjunction.public String getFirstFieldName()
public String getSecondFieldName()
public String getColumnEntry()
FieldExtractor
without the fieldName).Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.