|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weka.datagenerators.Test
Class to represent a test.
The string representation of the test can be supplied in standard notation
or for a subset of types of attributes in Prolog notation.
Following examples for all possible tests that can be represented by
this class, given in standard notation.
Examples of tests for numeric attributes:
B >= 2.333
B < 4.56
Examples of tests for nominal attributes with more then 2 values:
A = rain
A != rain
Examples of tests for nominal attribute with exactly 2 values:
A = false
A = true
The Prolog notation is only supplied for numeric attributes and
for nominal attributes that have the values "true" and "false".
Following examples for the Prolog notation provided.
Examples of tests for numeric attributes:
The same as for standard notation above.
Examples of tests for nominal attributes with values "true"and "false":
A
not(A)
(Other nominal attributes are not supported by the Prolog notation.)
Method Summary | |
boolean |
equalTo(Test t)
Compares the test with the test that is given as parameter. |
Test |
getNot()
Negates the test. |
boolean |
passesTest(Instance inst)
Determines whether an instance passes the test. |
java.lang.String |
toPrologString()
Returns the test represented by a string in Prolog notation. |
java.lang.String |
toString()
Returns the test represented by a string. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public Test getNot()
public boolean passesTest(Instance inst) throws java.lang.Exception
inst
- the instance
java.lang.Exception
- if something goes wrongpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toPrologString()
public boolean equalTo(Test t)
t
- the test the object is compared to
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2003 David Lindsay, Computer Learning Research Centre, Dept. Computer Science, Royal Holloway, University of London