public final class InputSchema extends Object implements Serializable
Constructor and Description |
---|
InputSchema(com.typesafe.config.Config config) |
Modifier and Type | Method and Description |
---|---|
int |
featureToPredictorIndex(int featureIndex) |
List<String> |
getFeatureNames() |
int |
getNumFeatures() |
int |
getNumPredictors() |
String |
getTargetFeature() |
int |
getTargetFeatureIndex() |
boolean |
hasTarget() |
boolean |
isActive(int featureIndex) |
boolean |
isActive(String featureName) |
boolean |
isCategorical(int featureIndex) |
boolean |
isCategorical(String featureName) |
boolean |
isClassification() |
boolean |
isID(int featureIndex) |
boolean |
isID(String featureName) |
boolean |
isNumeric(int featureIndex) |
boolean |
isNumeric(String featureName) |
boolean |
isTarget(int featureIndex) |
boolean |
isTarget(String featureName) |
int |
predictorToFeatureIndex(int predictorIndex) |
String |
toString() |
public List<String> getFeatureNames()
public int getNumFeatures()
public int getNumPredictors()
public boolean isID(String featureName)
featureName
- feature nametrue
iff feature is an ID featurepublic boolean isID(int featureIndex)
featureIndex
- feature indextrue
iff feature is an ID featurepublic boolean isActive(String featureName)
featureName
- feature nametrue
iff feature is active -- not an ID or ignoredpublic boolean isActive(int featureIndex)
featureIndex
- feature indextrue
iff feature is active -- not an ID or ignoredpublic boolean isNumeric(String featureName)
featureName
- feature nametrue
iff feature is numericpublic boolean isNumeric(int featureIndex)
featureIndex
- feature indextrue
iff feature is a numericpublic boolean isCategorical(String featureName)
featureName
- feature nametrue
iff feature is categoricalpublic boolean isCategorical(int featureIndex)
featureIndex
- feature indextrue
iff feature is a categoricalpublic boolean isTarget(String featureName)
featureName
- feature nametrue
iff the feature is the targetpublic boolean isTarget(int featureIndex)
featureIndex
- feature indextrue
iff the feature is the targetpublic String getTargetFeature()
IllegalStateException
- if there is no targetpublic int getTargetFeatureIndex()
IllegalStateException
- if there is no targetpublic boolean hasTarget()
true
iff schema defines a target featurepublic boolean isClassification()
true
iff the target feature is categoricalIllegalStateException
- if there is no targetpublic int featureToPredictorIndex(int featureIndex)
featureIndex
- index (0-based) among all featurespublic int predictorToFeatureIndex(int predictorIndex)
predictorIndex
- index (0-based) among only predictors (not ID, not ignored, not target)Copyright © 2014–2018. All rights reserved.