|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcosc575.p1.Attribute
cosc575.p1.NumericAttribute
public class NumericAttribute
Stores the attribute information for data sets for machine learning. An attribute has a name, type, and domain. Types can be discrete, numeric, or nominal.
| Field Summary |
|---|
| Fields inherited from class cosc575.p1.Attribute |
|---|
name |
| Constructor Summary | |
|---|---|
NumericAttribute()
|
|
NumericAttribute(java.util.Scanner scanner)
Explicit constructor. |
|
NumericAttribute(java.lang.String name)
Explicit constructor. |
|
| Method Summary | |
|---|---|
static void |
main(java.lang.String[] args)
|
boolean |
parse(java.util.Scanner scanner)
Processes a single attribute declaration, consisting of the keyword, attribute name, and attribute type. |
java.lang.String |
toString()
Returns a string representation of this attribute. |
boolean |
validValue(java.lang.Double value)
Returns whether the value is valid for a numeric attribute |
| Methods inherited from class cosc575.p1.Attribute |
|---|
getName, getSize, setName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NumericAttribute()
public NumericAttribute(java.lang.String name)
throws java.lang.Exception
name - the name of this data set
java.lang.Exception
public NumericAttribute(java.util.Scanner scanner)
throws java.lang.Exception
scanner - a Scanner containing the data set's tokens
java.lang.Exception - if an exception occurs| Method Detail |
|---|
public boolean parse(java.util.Scanner scanner)
throws java.lang.Exception
scanner - a Scanner containing the data set's tokens
java.lang.Exception - if an exception occurspublic java.lang.String toString()
toString in class Attribute
public boolean validValue(java.lang.Double value)
throws java.lang.Exception
value - the value for testing
java.lang.Exception - if an exception occurspublic static void main(java.lang.String[] args)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||