Class InputField
- java.lang.Object
-
- org.jpmml.evaluator.ModelField
-
- org.jpmml.evaluator.InputField
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ResidualField
public class InputField extends ModelField
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description InputField(org.dmg.pmml.Field<?> field, org.dmg.pmml.MiningField miningField)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.common.collect.RangeSet<Double>getContinuousDomain()Returns the domain of valid values for this continuous field.List<?>getDiscreteDomain()Returns the domain of valid values for this categorical or ordinal field.org.dmg.pmml.MiningFieldgetMiningField()org.dmg.pmml.OpTypegetOpType()FieldValueprepare(Object value)Prepares an input value for a field.Tableprepare(Table table)Prepares a column of input values for a field.-
Methods inherited from class org.jpmml.evaluator.ModelField
getDataType, getDisplayName, getField, getName, toString
-
-
-
-
Method Detail
-
getOpType
public org.dmg.pmml.OpType getOpType()
- Overrides:
getOpTypein classModelField
-
prepare
public FieldValue prepare(Object value)
Prepares an input value for a field.
First, the value is converted from the user-supplied representation to PMML representation. After that, the value is subjected to missing value treatment, invalid value treatment and outlier treatment.
- Parameters:
value- The input value in user-supplied representation. Usenullto represent a missing input value.- Throws:
EvaluationException- If the input value preparation fails.org.jpmml.model.MarkupException
-
prepare
@IgnoreJRERequirement public Table prepare(Table table)
Prepares a column of input values for a field.
The column is replaced with a new column holding preparation results as
FieldValueobjects. If the preparation of some input value fails, then the corresponding element is set tonull, and the exception is stored in table'sexceptions pseudo-column.- See Also:
Table.hasExceptions(),Table.clearExceptions()
-
getContinuousDomain
public com.google.common.collect.RangeSet<Double> getContinuousDomain()
Returns the domain of valid values for this continuous field. If specified, then all input values that are contained in this set shall be considered valid, and all others invalid. If not specified, then all input values shall be considered valid.
- Returns:
- A non-empty set, or
null. - See Also:
getOpType()
-
getDiscreteDomain
public List<?> getDiscreteDomain()
Returns the domain of valid values for this categorical or ordinal field. If specified, then all input values that are contained in this list shall be considered valid, and all others invalid. In not specified, then all input values shall be considered valid.
List elements are all valid values in PMML representation. For example, if the data type of this field is
DataType.INTEGER, then all list elements shall beInteger.- Returns:
- A non-empty list, or
null. - See Also:
ModelField.getDataType(),getOpType(),TypeUtil.format(Object),TypeUtil.parse(DataType, String),TypeUtil.parseOrCast(DataType, Object)
-
getMiningField
public org.dmg.pmml.MiningField getMiningField()
- Returns:
- The backing
MiningFieldelement.
-
-