class AttributeGroup extends Serializable
- Alphabetic
- By Inheritance
- AttributeGroup
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
AttributeGroup(name: String, attrs: Array[Attribute])
Creates an attribute group with attributes.
Creates an attribute group with attributes.
- name
name of the attribute group
- attrs
array of attributes. Attributes will be copied with their corresponding indices in the array.
-
new
AttributeGroup(name: String, numAttributes: Int)
Creates an attribute group knowing only the number of attributes.
Creates an attribute group knowing only the number of attributes.
- name
name of the attribute group
- numAttributes
number of attributes
-
new
AttributeGroup(name: String)
Creates an attribute group without attribute info.
Creates an attribute group without attribute info.
- name
name of the attribute group
Value Members
-
def
apply(attrIndex: Int): Attribute
Gets an attribute by its index.
-
def
apply(attrName: String): Attribute
Gets an attribute by its name.
-
val
attributes: Option[Array[Attribute]]
Optional array of attributes.
Optional array of attributes. At most one of
numAttributes
andattributes
can be defined. -
def
equals(other: Any): Boolean
- Definition Classes
- AttributeGroup → AnyRef → Any
-
def
getAttr(attrIndex: Int): Attribute
Gets an attribute by its index.
-
def
getAttr(attrName: String): Attribute
Gets an attribute by its name.
-
def
hasAttr(attrName: String): Boolean
Test whether this attribute group contains a specific attribute.
-
def
hashCode(): Int
- Definition Classes
- AttributeGroup → AnyRef → Any
-
def
indexOf(attrName: String): Int
Index of an attribute specified by name.
- val name: String
- val numAttributes: Option[Int]
-
def
size: Int
Size of the attribute group.
Size of the attribute group. Returns -1 if the size is unknown.
-
def
toMetadata(): Metadata
Converts to ML metadata
-
def
toMetadata(existingMetadata: Metadata): Metadata
Converts to ML metadata with some existing metadata.
-
def
toString(): String
- Definition Classes
- AttributeGroup → AnyRef → Any
-
def
toStructField(): StructField
Converts to a StructField.
-
def
toStructField(existingMetadata: Metadata): StructField
Converts to a StructField with some existing metadata.