|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Objectorg.apache.spark.ml.attribute.Attribute
org.apache.spark.ml.attribute.BinaryAttribute
public class BinaryAttribute
:: DeveloperApi :: A binary attribute. param: name optional name param: index optional index param: values optionla values. If set, its size must be 2.
| Method Summary | |
|---|---|
AttributeType |
attrType()
Attribute type. |
static BinaryAttribute |
defaultAttr()
The default binary attribute. |
boolean |
equals(Object other)
|
int |
hashCode()
|
scala.Option<Object> |
index()
Index of the attribute. |
boolean |
isNominal()
Tests whether this attribute is nominal, true for NominalAttribute and BinaryAttribute. |
boolean |
isNumeric()
Tests whether this attribute is numeric, true for NumericAttribute and BinaryAttribute. |
scala.Option<String> |
name()
Name of the attribute. |
scala.Option<String[]> |
values()
|
BinaryAttribute |
withIndex(int index)
Copy with a new index. |
BinaryAttribute |
withName(String name)
Copy with a new name. |
BinaryAttribute |
withoutIndex()
Copy without the index. |
BinaryAttribute |
withoutName()
Copy without the name. |
BinaryAttribute |
withoutValues()
Copy without the values. |
BinaryAttribute |
withValues(String negative,
String positive)
Copy with new values. |
| Methods inherited from class org.apache.spark.ml.attribute.Attribute |
|---|
toMetadata, toMetadata, toString, toStructField, toStructField |
| Methods inherited from class Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static final BinaryAttribute defaultAttr()
public scala.Option<String> name()
Attribute
name in class Attributepublic scala.Option<Object> index()
Attribute
index in class Attributepublic scala.Option<String[]> values()
public AttributeType attrType()
Attribute
attrType in class Attributepublic boolean isNumeric()
AttributeNumericAttribute and BinaryAttribute.
isNumeric in class Attributepublic boolean isNominal()
AttributeNominalAttribute and BinaryAttribute.
isNominal in class Attributepublic BinaryAttribute withName(String name)
Attribute
withName in class Attributepublic BinaryAttribute withoutName()
Attribute
withoutName in class Attributepublic BinaryAttribute withIndex(int index)
Attribute
withIndex in class Attributepublic BinaryAttribute withoutIndex()
Attribute
withoutIndex in class Attribute
public BinaryAttribute withValues(String negative,
String positive)
negative - name for negativepositive - name for positive
public BinaryAttribute withoutValues()
public boolean equals(Object other)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||