Field

abstract class Field extends HasDataType with HasOpType with Attribute

Abstract class for field in a PMML.

trait Attribute
trait HasLabels
trait HasOpType
trait Serializable
class Object
trait Matchable
class Any

Value members

Abstract methods

Field type.

Field type.

def get(series: Series): Any

Retrieve its value from the specified series, return null if missing

Retrieve its value from the specified series, return null if missing

def index_=(i: Int): Unit

Sets the index of this field.

Sets the index of this field.

def name: String

Name of the field.

Name of the field.

def referenced_=(r: Boolean): Unit

Sets the referenced flag of the field.

Sets the referenced flag of the field.

Concrete methods

override def attrType: AttributeType
Definition Classes

Attribute of the field.

Attribute of the field.

override def decode(index: Int): Any
Definition Classes
def displayName: Option[String]

Display name of the field. None if it is not set.

Display name of the field. None if it is not set.

def encode(series: Series): Double

Encodes the value of the field in the input series.

Encodes the value of the field in the input series.

override def encode(value: Any): Double
Definition Classes
def getDouble(series: Series): Double

Retrieve its value as double from the specified series, return Double.NaN if missing.

Retrieve its value as double from the specified series, return Double.NaN if missing.

override def getLabel(value: Any): Option[String]
Definition Classes
def index: Int

Index of the field in the input series.

Index of the field in the input series.

def indexDefined: Boolean

Tests if the index of this field is defined

Tests if the index of this field is defined

override def intervals: Array[Interval]
Definition Classes
override def invalidValues: Set[Any]
Definition Classes
override def isBinary: Boolean
Definition Classes
def isDataField: Boolean

Tests if the field is a data field.

Tests if the field is a data field.

override def isDate: Boolean
Definition Classes
def isDerivedField: Boolean

Tests if the field is a derived field.

Tests if the field is a derived field.

override def isDouble: Boolean
Definition Classes
override def isFloat: Boolean
Definition Classes
override def isInvalidValue(value: Any): Boolean
Definition Classes
def isMissing(series: Series): Boolean

Tests if its value is missing from the specified series.

Tests if its value is missing from the specified series.

override def isMissingValue(value: Any): Boolean
Definition Classes
override def isMutable: Boolean
Definition Classes
override def isNumeric: Boolean
Definition Classes
override def isString: Boolean
Definition Classes
override def isTime: Boolean
Definition Classes
override def isTimestamp: Boolean
Definition Classes
override def isValidValue(value: Any): Boolean
Definition Classes
override def labels: Map[Any, String]
Definition Classes
override def missingValues: Set[Any]
Definition Classes
override def numCategories: Int
Definition Classes
def referenced: Boolean

Tests if the field is referenced in the model element.

Tests if the field is referenced in the model element.

override def toAttribute: Attribute
Definition Classes

Converts to an immutable attribute if it's mutable.

Converts to an immutable attribute if it's mutable.

def toVal(s: String): Any

Converts a string to the corresponding value based on its data type.

Converts a string to the corresponding value based on its data type.

Throws:
java.lang.NumberFormatException
  • If the string does not contain a parsable number if dataType is numeric
def toValOption(s: String): Option[Any]

Converts a string to the corresponding value based on its data type.

Converts a string to the corresponding value based on its data type.

Returns:

None if any error occurs

override def validValues: Array[Any]
Definition Classes

Inherited methods

def accepts(other: DataType): Boolean

Returns true if other is an acceptable input type for a function that expects this.

Returns true if other is an acceptable input type for a function that expects this.

Inherited from:
DataTypeLike

Returns the data type of field.

Returns the data type of field.

Inherited from:
DataTypeLike
def isCategorical: Boolean

Tests whether this field is categorical (nominal or ordinal).

Tests whether this field is categorical (nominal or ordinal).

Inherited from:
HasOpType
def isContinuous: Boolean

Tests whether this field is continuous.

Tests whether this field is continuous.

Inherited from:
HasOpType
def isDateTime: Boolean
Inherited from:
DataTypeLike
def isIn(value: Any): Boolean
Inherited from:
HasIntervals
def isNominal: Boolean

Tests whether this field is nominal.

Tests whether this field is nominal.

Inherited from:
HasOpType
def isOrdinal: Boolean

Tests whether this field is ordinal.

Tests whether this field is ordinal.

Inherited from:
HasOpType
def isReal: Boolean
Inherited from:
DataTypeLike
def isSysMissing(value: Any): Boolean
Inherited from:
HasMissingValues

Operational type.

Operational type.

Inherited from:
HasOpType
def valuesAsString: String
Inherited from:
Attribute