class NominalAttribute extends Attribute
- Alphabetic
- By Inheritance
- NominalAttribute
- Attribute
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- def attrType: AttributeType
Attribute type.
Attribute type.
- Definition Classes
- NominalAttribute → Attribute
- def equals(other: Any): Boolean
- Definition Classes
- NominalAttribute → AnyRef → Any
- def getNumValues: Option[Int]
Get the number of values, either from
numValues
or fromvalues
.Get the number of values, either from
numValues
or fromvalues
. Return None if unknown. - def getValue(index: Int): String
Gets a value given its index.
- def hasValue(value: String): Boolean
Tests whether this attribute contains a specific value.
- def hashCode(): Int
- Definition Classes
- NominalAttribute → AnyRef → Any
- val index: Option[Int]
Index of the attribute.
Index of the attribute. None if it is not set.
- Definition Classes
- NominalAttribute → Attribute
- def indexOf(value: String): Int
Index of a specific value.
- def isNominal: Boolean
Tests whether this attribute is nominal, true for NominalAttribute and BinaryAttribute.
Tests whether this attribute is nominal, true for NominalAttribute and BinaryAttribute.
- Definition Classes
- NominalAttribute → Attribute
- def isNumeric: Boolean
Tests whether this attribute is numeric, true for NumericAttribute and BinaryAttribute.
Tests whether this attribute is numeric, true for NumericAttribute and BinaryAttribute.
- Definition Classes
- NominalAttribute → Attribute
- val isOrdinal: Option[Boolean]
- val name: Option[String]
Name of the attribute.
Name of the attribute. None if it is not set.
- Definition Classes
- NominalAttribute → Attribute
- val numValues: Option[Int]
- def toMetadata(): Metadata
Converts to ML metadata
Converts to ML metadata
- Definition Classes
- Attribute
- def toMetadata(existingMetadata: Metadata): Metadata
Converts to ML metadata with some existing metadata.
Converts to ML metadata with some existing metadata.
- Definition Classes
- Attribute
- def toString(): String
- Definition Classes
- Attribute → AnyRef → Any
- def toStructField(): StructField
Converts to a
StructField
.Converts to a
StructField
.- Definition Classes
- Attribute
- def toStructField(existingMetadata: Metadata): StructField
Converts to a
StructField
with some existing metadata.Converts to a
StructField
with some existing metadata.- existingMetadata
existing metadata to carry over
- Definition Classes
- Attribute
- val values: Option[Array[String]]
- def withIndex(index: Int): NominalAttribute
Copy with a new index.
Copy with a new index.
- Definition Classes
- NominalAttribute → Attribute
- def withName(name: String): NominalAttribute
Copy with a new name.
Copy with a new name.
- Definition Classes
- NominalAttribute → Attribute
- def withNumValues(numValues: Int): NominalAttribute
Copy with a new
numValues
and emptyvalues
. - def withValues(first: String, others: String*): NominalAttribute
Copy with new values and empty
numValues
.Copy with new values and empty
numValues
.- Annotations
- @varargs()
- def withValues(values: Array[String]): NominalAttribute
Copy with new values and empty
numValues
. - def withoutIndex: NominalAttribute
Copy without the index.
Copy without the index.
- Definition Classes
- NominalAttribute → Attribute
- def withoutName: NominalAttribute
Copy without the name.
Copy without the name.
- Definition Classes
- NominalAttribute → Attribute
- def withoutNumValues: NominalAttribute
Copy without the
numValues
. - def withoutValues: NominalAttribute
Copy without the values.