|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Objectorg.apache.spark.ml.attribute.Attribute
public abstract class Attribute
:: DeveloperApi :: Abstract class for ML attributes.
| Constructor Summary | |
|---|---|
Attribute()
|
|
| Method Summary | |
|---|---|
abstract AttributeType |
attrType()
Attribute type. |
abstract scala.Option<Object> |
index()
Index of the attribute. |
abstract boolean |
isNominal()
Tests whether this attribute is nominal, true for NominalAttribute and BinaryAttribute. |
abstract boolean |
isNumeric()
Tests whether this attribute is numeric, true for NumericAttribute and BinaryAttribute. |
abstract scala.Option<String> |
name()
Name of the attribute. |
Metadata |
toMetadata()
Converts to ML metadata |
Metadata |
toMetadata(Metadata existingMetadata)
Converts to ML metadata with some existing metadata. |
String |
toString()
|
StructField |
toStructField()
Converts to a StructField. |
StructField |
toStructField(Metadata existingMetadata)
Converts to a StructField with some existing metadata. |
abstract Attribute |
withIndex(int index)
Copy with a new index. |
abstract Attribute |
withName(String name)
Copy with a new name. |
abstract Attribute |
withoutIndex()
Copy without the index. |
abstract Attribute |
withoutName()
Copy without the name. |
| Methods inherited from class Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Attribute()
| Method Detail |
|---|
public abstract AttributeType attrType()
public abstract scala.Option<String> name()
public abstract Attribute withName(String name)
public abstract Attribute withoutName()
public abstract scala.Option<Object> index()
public abstract Attribute withIndex(int index)
public abstract Attribute withoutIndex()
public abstract boolean isNumeric()
NumericAttribute and BinaryAttribute.
public abstract boolean isNominal()
NominalAttribute and BinaryAttribute.
public Metadata toMetadata(Metadata existingMetadata)
public Metadata toMetadata()
public StructField toStructField(Metadata existingMetadata)
StructField with some existing metadata.
existingMetadata - existing metadata to carry over
public StructField toStructField()
StructField.
public String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||