类 Test
java.lang.Object
weka.datagenerators.Test
- 所有已实现的接口:
Serializable
,RevisionHandler
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.)
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.)
- 版本:
- $Revision: 1.5 $
- 作者:
- Gabi Schmidberger (gabi@cs.waikato.ac.nz)
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明boolean
Compares the test with the test that is given as parameter.getNot()
Negates the test.Returns the revision string.boolean
passesTest
(Instance inst) Determines whether an instance passes the test.Returns the test represented by a string in Prolog notation.toString()
Returns the test represented by a string.
-
构造器详细资料
-
Test
Constructor- 参数:
i
- the attribute indexs
- the splitdataset
- the dataset
-
Test
Constructor- 参数:
i
- the attribute indexs
- the splitdataset
- the datasetn
- whether to negate the test
-
-
方法详细资料
-
getNot
Negates the test.- 返回:
- the test itself negated
-
passesTest
Determines whether an instance passes the test.- 参数:
inst
- the instance- 返回:
- true if the instance satisfies the test, false otherwise
- 抛出:
Exception
- if something goes wrong
-
toString
Returns the test represented by a string. -
toPrologString
Returns the test represented by a string in Prolog notation.- 返回:
- a string representing the test in Prolog notation
-
equalTo
Compares the test with the test that is given as parameter.- 参数:
t
- the test the object is compared to- 返回:
- true if the two Tests are equal
-
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 返回:
- the revision
-