DataField

class DataField(val name: String, val displayName: Option[String], val dataType: DataType, val opType: OpType, val intervals: Array[Interval], val values: Array[Value], val taxonomy: Option[String], val isCyclic: Boolean) extends AbstractField with PmmlElement

Defines a field as used in mining models. It specifies the types and value ranges.

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

Value members

Constructors

def this(name: String, displayName: Option[String], dataType: DataType, opType: OpType, values: Array[Value])
def this(name: String, displayName: Option[String], dataType: DataType, opType: OpType, interval: Interval)
def this(name: String, displayName: Option[String], dataType: DataType, opType: OpType, interval: Interval, values: Array[Value])
def this(name: String)

Concrete methods

override def fieldType: FieldType

Field type.

Field type.

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
override def attrType: AttributeType
Definition Classes
Inherited from:
Field
override def attribute: Attribute

Attribute of the field.

Attribute of the field.

Definition Classes
Inherited from:
AbstractField
override def decode(index: Int): Any
Definition Classes
Inherited from:
Field
override def encode(value: Any): Double
Definition Classes
Inherited from:
Field
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.

Inherited from:
Field
Inherited from:
HasExtensions
override 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

Definition Classes
Inherited from:
AbstractField
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.

Inherited from:
Field
override def getLabel(value: Any): Option[String]
Definition Classes
Inherited from:
Field
def hasExtensions: Boolean
Inherited from:
HasExtensions
override def index: Int

Index of the field in the input series.

Index of the field in the input series.

Definition Classes
Inherited from:
AbstractField
def indexDefined: Boolean

Tests if the index of this field is defined

Tests if the index of this field is defined

Inherited from:
Field
override def index_=(i: Int): Unit

Sets the index of this field.

Sets the index of this field.

Definition Classes
Inherited from:
AbstractField
override def invalidValues: Set[Any]
Definition Classes
Inherited from:
Field
override def isBinary: Boolean
Definition Classes
Inherited from:
Field
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 isDataField: Boolean

Tests if the field is a data field.

Tests if the field is a data field.

Inherited from:
Field
override def isDate: Boolean
Definition Classes
Inherited from:
Field
def isDateTime: Boolean
Inherited from:
DataTypeLike
def isDerivedField: Boolean

Tests if the field is a derived field.

Tests if the field is a derived field.

Inherited from:
Field
override def isDouble: Boolean
Definition Classes
Inherited from:
Field
override def isFloat: Boolean
Definition Classes
Inherited from:
Field
def isIn(value: Any): Boolean
Inherited from:
HasIntervals
override def isInvalidValue(value: Any): Boolean
Definition Classes
Inherited from:
Field
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.

Inherited from:
Field
override def isMissingValue(value: Any): Boolean
Definition Classes
Inherited from:
Field
override def isMutable: Boolean
Definition Classes
Inherited from:
Field
def isNominal: Boolean

Tests whether this field is nominal.

Tests whether this field is nominal.

Inherited from:
HasOpType
override def isNumeric: Boolean
Definition Classes
Inherited from:
Field
def isOrdinal: Boolean

Tests whether this field is ordinal.

Tests whether this field is ordinal.

Inherited from:
HasOpType
def isReal: Boolean
Inherited from:
DataTypeLike
override def isString: Boolean
Definition Classes
Inherited from:
Field
def isSysMissing(value: Any): Boolean
Inherited from:
HasMissingValues
override def isTime: Boolean
Definition Classes
Inherited from:
Field
override def isTimestamp: Boolean
Definition Classes
Inherited from:
Field
override def isValidValue(value: Any): Boolean
Definition Classes
Inherited from:
Field
override def labels: Map[Any, String]
Definition Classes
Inherited from:
Field
override def missingValues: Set[Any]
Definition Classes
Inherited from:
Field
override def numCategories: Int
Definition Classes
Inherited from:
Field
override def referenced: Boolean

Tests if the field is referenced in the model element.

Tests if the field is referenced in the model element.

Definition Classes
Inherited from:
AbstractField
override def referenced_=(r: Boolean): Unit

Sets the referenced flag of the field.

Sets the referenced flag of the field.

Definition Classes
Inherited from:
AbstractField
override def toAttribute: Attribute
Definition Classes
Inherited from:
Field
override def toImmutable(): DataField

Converts to an immutable attribute if it's mutable.

Converts to an immutable attribute if it's mutable.

Definition Classes
Inherited from:
AbstractField
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
Inherited from:
Field
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

Inherited from:
Field
override def validValues: Array[Any]
Definition Classes
Inherited from:
Field
def valuesAsString: String
Inherited from:
Attribute

Concrete fields

override val dataType: DataType
override val displayName: Option[String]
override val intervals: Array[Interval]
val isCyclic: Boolean
override val name: String
override val opType: OpType
val taxonomy: Option[String]
val values: Array[Value]

Inherited fields

protected var _attribute: Attribute

An internal attribute could be changed.

An internal attribute could be changed.

Inherited from:
AbstractField
protected var _index: Int

Index of the field in the input series.

Index of the field in the input series.

Inherited from:
AbstractField
protected var _referenced: Boolean

A flag if the field is referenced in the model.

A flag if the field is referenced in the model.

Inherited from:
AbstractField