|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object org.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 Attribute
public scala.Option<Object> index()
Attribute
index
in class Attribute
public scala.Option<String[]> values()
public AttributeType attrType()
Attribute
attrType
in class Attribute
public boolean isNumeric()
Attribute
NumericAttribute
and BinaryAttribute
.
isNumeric
in class Attribute
public boolean isNominal()
Attribute
NominalAttribute
and BinaryAttribute
.
isNominal
in class Attribute
public BinaryAttribute withName(String name)
Attribute
withName
in class Attribute
public BinaryAttribute withoutName()
Attribute
withoutName
in class Attribute
public BinaryAttribute withIndex(int index)
Attribute
withIndex
in class Attribute
public 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 Object
public int hashCode()
hashCode
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |