public class NominalAttribute extends Attribute
Attribute.Typedescription, name, type, weight| Constructor and Description |
|---|
NominalAttribute(String name)
Constructor.
|
NominalAttribute(String name,
double weight)
Constructor.
|
NominalAttribute(String name,
double weight,
String[] values)
Constructor.
|
NominalAttribute(String name,
String description)
Constructor.
|
NominalAttribute(String name,
String[] values)
Constructor.
|
NominalAttribute(String name,
String description,
double weight)
Constructor.
|
NominalAttribute(String name,
String description,
double weight,
String[] values)
Constructor.
|
NominalAttribute(String name,
String description,
String[] values)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isOpen()
Returns true if the string values of the nominal attribute is a open set.
|
void |
setOpen(boolean open)
Sets if the string values of the nominal attribute is a open set.
|
int |
size()
Returns the number of nominal values.
|
String |
toString(double x)
Returns the string representation of a double value of this attribute.
|
double |
valueOf(String s)
Returns the ordinal value of a string value.
|
String[] |
values()
Returns the string values of nominal attribute.
|
public NominalAttribute(String name)
name - the name of attribute.public NominalAttribute(String name, double weight)
name - the name of attribute.public NominalAttribute(String name, String description)
name - the name of attribute.description - the detailed description of attribute.public NominalAttribute(String name, String description, double weight)
name - the name of attribute.description - the detailed description of attribute.public NominalAttribute(String name, String[] values)
name - the name of attribute.values - the valid string values of nominal attribute.public NominalAttribute(String name, double weight, String[] values)
name - the name of attribute.values - the valid string values of nominal attribute.public NominalAttribute(String name, String description, String[] values)
name - the name of attribute.description - the detailed description of attribute.values - the valid string values of nominal attribute.public int size()
public boolean isOpen()
public void setOpen(boolean open)
open - true if the string values of the nominal attribute is a open set.public String[] values()
public double valueOf(String s) throws ParseException
valueOf in class Attributes - a string value of this attribute.ParseExceptionpublic String toString(double x)
AttributetoString in class Attributex - a double value of this attribute. NaN means missing value.Copyright © 2015. All rights reserved.