| weka.core.CheckScheme weka.classifiers.CheckClassifier
CheckClassifier | public class CheckClassifier extends CheckScheme (Code) | | Class for examining the capabilities and finding problems with
classifiers. If you implement a classifier using the WEKA.libraries,
you should run the checks on it to ensure robustness and correct
operation. Passing all the tests of this object does not mean
bugs in the classifier don't exist, but this will help find some
common ones.
Typical usage:
java weka.classifiers.CheckClassifier -W classifier_name
classifier_options
CheckClassifier reports on the following:
- Classifier abilities
- Possible command line options to the classifier
- Whether the classifier can predict nominal, numeric, string,
date or relational class attributes. Warnings will be displayed if
performance is worse than ZeroR
- Whether the classifier can be trained incrementally
- Whether the classifier can handle numeric predictor attributes
- Whether the classifier can handle nominal predictor attributes
- Whether the classifier can handle string predictor attributes
- Whether the classifier can handle date predictor attributes
- Whether the classifier can handle relational predictor attributes
- Whether the classifier can handle multi-instance data
- Whether the classifier can handle missing predictor values
- Whether the classifier can handle missing class values
- Whether a nominal classifier only handles 2 class problems
- Whether the classifier can handle instance weights
- Correct functioning
- Correct initialisation during buildClassifier (i.e. no result
changes when buildClassifier called repeatedly)
- Whether incremental training produces the same results
as during non-incremental training (which may or may not
be OK)
- Whether the classifier alters the data pased to it
(number of instances, instance order, instance weights, etc)
- Whether the toString() method works correctly before the
classifier has been built.
- Degenerate cases
- building classifier with zero training instances
- all but one predictor attribute values missing
- all predictor attribute values missing
- all but one class values missing
- all class values missing
Running CheckClassifier with the debug option set will output the
training and test datasets for any failed tests.
The weka.classifiers.AbstractClassifierTest uses this
class to test all the classifiers. Any changes here, have to be
checked in that abstract test class, too.
Valid options are:
-D
Turn on debugging output.
-S
Silent mode - prints nothing to stdout.
-N <num>
The number of instances in the datasets (default 20).
-nominal <num>
The number of nominal attributes (default 2).
-nominal-values <num>
The number of values for nominal attributes (default 1).
-numeric <num>
The number of numeric attributes (default 1).
-string <num>
The number of string attributes (default 1).
-date <num>
The number of date attributes (default 1).
-relational <num>
The number of relational attributes (default 1).
-num-instances-relational <num>
The number of instances in relational/bag attributes (default 10).
-words <comma-separated-list>
The words to use in string attributes.
-word-separators <chars>
The word separators to use in string attributes.
-W
Full name of the classifier analysed.
eg: weka.classifiers.bayes.NaiveBayes
(default weka.classifiers.rules.ZeroR)
Options specific to classifier weka.classifiers.rules.ZeroR:
-D
If set, classifier is run in debug mode and
may output additional info to the console
Options after -- are passed to the designated classifier.
author: Len Trigg (trigg@cs.waikato.ac.nz) author: FracPete (fracpete at waikato dot ac dot nz) version: $Revision: 1.32 $ See Also: TestInstances |
Method Summary | |
protected boolean[] | canHandleClassAsNthAttribute(boolean nominalPredictor, boolean numericPredictor, boolean stringPredictor, boolean datePredictor, boolean relationalPredictor, boolean multiInstance, int classType, int classIndex) Checks whether the scheme can handle class attributes as Nth attribute. | protected boolean[] | canHandleMissing(boolean nominalPredictor, boolean numericPredictor, boolean stringPredictor, boolean datePredictor, boolean relationalPredictor, boolean multiInstance, int classType, boolean predictorMissing, boolean classMissing, int missingLevel) Checks basic missing value handling of the scheme. | protected boolean[] | canHandleNClasses(boolean nominalPredictor, boolean numericPredictor, boolean stringPredictor, boolean datePredictor, boolean relationalPredictor, boolean multiInstance, int numClasses) Checks whether nominal schemes can handle more than two classes. | protected boolean[] | canHandleOnlyClass(boolean nominalPredictor, boolean numericPredictor, boolean stringPredictor, boolean datePredictor, boolean relationalPredictor, int classType) Checks whether the scheme can handle data that contains only the class
attribute. | protected boolean[] | canHandleZeroTraining(boolean nominalPredictor, boolean numericPredictor, boolean stringPredictor, boolean datePredictor, boolean relationalPredictor, boolean multiInstance, int classType) Checks whether the scheme can handle zero training instances. | protected boolean[] | canPredict(boolean nominalPredictor, boolean numericPredictor, boolean stringPredictor, boolean datePredictor, boolean relationalPredictor, boolean multiInstance, int classType) Checks basic prediction of the scheme, for simple non-troublesome
datasets. | protected boolean[] | canTakeOptions() Checks whether the scheme can take command line options. | protected boolean[] | correctBuildInitialisation(boolean nominalPredictor, boolean numericPredictor, boolean stringPredictor, boolean datePredictor, boolean relationalPredictor, boolean multiInstance, int classType) Checks whether the scheme correctly initialises models when
buildClassifier is called. | protected boolean[] | datasetIntegrity(boolean nominalPredictor, boolean numericPredictor, boolean stringPredictor, boolean datePredictor, boolean relationalPredictor, boolean multiInstance, int classType, boolean predictorMissing, boolean classMissing) Checks whether the scheme alters the training dataset during
training. | protected boolean[] | declaresSerialVersionUID() tests for a serialVersionUID. | public void | doTests() | protected boolean[] | doesntUseTestClassVal(boolean nominalPredictor, boolean numericPredictor, boolean stringPredictor, boolean datePredictor, boolean relationalPredictor, boolean multiInstance, int classType) Checks whether the classifier erroneously uses the class
value of test instances (if provided). | public Classifier | getClassifier() | public String[] | getOptions() Gets the current settings of the CheckClassifier. | protected boolean[] | instanceWeights(boolean nominalPredictor, boolean numericPredictor, boolean stringPredictor, boolean datePredictor, boolean relationalPredictor, boolean multiInstance, int classType) Checks whether the classifier can handle instance weights.
This test compares the classifier performance on two datasets
that are identical except for the training weights. | public Enumeration | listOptions() Returns an enumeration describing the available options. | public static void | main(String[] args) | protected Instances | makeTestDataset(int seed, int numInstances, int numNominal, int numNumeric, int numString, int numDate, int numRelational, int numClasses, int classType, boolean multiInstance) Make a simple set of instances, which can later be modified
for use in specific tests. | protected Instances | makeTestDataset(int seed, int numInstances, int numNominal, int numNumeric, int numString, int numDate, int numRelational, int numClasses, int classType, int classIndex, boolean multiInstance) Make a simple set of instances with variable position of the class
attribute, which can later be modified for use in specific tests. | protected boolean[] | multiInstanceHandler() Checks whether the scheme handles multi-instance data. | protected void | printAttributeSummary(boolean nominalPredictor, boolean numericPredictor, boolean stringPredictor, boolean datePredictor, boolean relationalPredictor, boolean multiInstance, int classType) | protected boolean[] | runBasicTest(boolean nominalPredictor, boolean numericPredictor, boolean stringPredictor, boolean datePredictor, boolean relationalPredictor, boolean multiInstance, int classType, int missingLevel, boolean predictorMissing, boolean classMissing, int numTrain, int numTest, int numClasses, FastVector accepts) Runs a text on the datasets with the given characteristics. | protected boolean[] | runBasicTest(boolean nominalPredictor, boolean numericPredictor, boolean stringPredictor, boolean datePredictor, boolean relationalPredictor, boolean multiInstance, int classType, int classIndex, int missingLevel, boolean predictorMissing, boolean classMissing, int numTrain, int numTest, int numClasses, FastVector accepts) Runs a text on the datasets with the given characteristics. | public void | setClassifier(Classifier newClassifier) Set the classifier for boosting. | public void | setOptions(String[] options) Parses a given list of options. | protected boolean[] | testToString() Checks whether the scheme's toString() method works even though the
classifies hasn't been built yet. | protected boolean[] | testWRTZeroR(Classifier classifier, Evaluation evaluation, Instances train, Instances test) | protected void | testsPerClassType(int classType, boolean updateable, boolean weighted, boolean multiInstance) | protected boolean[] | updateableClassifier() Checks whether the scheme can build models incrementally. | protected boolean[] | updatingEquality(boolean nominalPredictor, boolean numericPredictor, boolean stringPredictor, boolean datePredictor, boolean relationalPredictor, boolean multiInstance, int classType) Checks whether an updateable scheme produces the same model when
trained incrementally as when batch trained. | protected boolean[] | weightedInstancesHandler() Checks whether the scheme says it can handle instance weights. |
m_Classifier | protected Classifier m_Classifier(Code) | | The classifier to be examined
|
canHandleClassAsNthAttribute | protected boolean[] canHandleClassAsNthAttribute(boolean nominalPredictor, boolean numericPredictor, boolean stringPredictor, boolean datePredictor, boolean relationalPredictor, boolean multiInstance, int classType, int classIndex)(Code) | | Checks whether the scheme can handle class attributes as Nth attribute.
Parameters: nominalPredictor - if true use nominal predictor attributes Parameters: numericPredictor - if true use numeric predictor attributes Parameters: stringPredictor - if true use string predictor attributes Parameters: datePredictor - if true use date predictor attributes Parameters: relationalPredictor - if true use relational predictor attributes Parameters: multiInstance - whether multi-instance is needed Parameters: classType - the class type (NUMERIC, NOMINAL, etc.) Parameters: classIndex - the index of the class attribute (0-based, -1 means last attribute) index 0 is true if the test was passed, index 1 is true if test was acceptable See Also: TestInstances.CLASS_IS_LAST |
canHandleMissing | protected boolean[] canHandleMissing(boolean nominalPredictor, boolean numericPredictor, boolean stringPredictor, boolean datePredictor, boolean relationalPredictor, boolean multiInstance, int classType, boolean predictorMissing, boolean classMissing, int missingLevel)(Code) | | Checks basic missing value handling of the scheme. If the missing
values cause an exception to be thrown by the scheme, this will be
recorded.
Parameters: nominalPredictor - if true use nominal predictor attributes Parameters: numericPredictor - if true use numeric predictor attributes Parameters: stringPredictor - if true use string predictor attributes Parameters: datePredictor - if true use date predictor attributes Parameters: relationalPredictor - if true use relational predictor attributes Parameters: multiInstance - whether multi-instance is needed Parameters: classType - the class type (NUMERIC, NOMINAL, etc.) Parameters: predictorMissing - true if the missing values may be in the predictors Parameters: classMissing - true if the missing values may be in the class Parameters: missingLevel - the percentage of missing values index 0 is true if the test was passed, index 1 is true if test was acceptable |
canHandleNClasses | protected boolean[] canHandleNClasses(boolean nominalPredictor, boolean numericPredictor, boolean stringPredictor, boolean datePredictor, boolean relationalPredictor, boolean multiInstance, int numClasses)(Code) | | Checks whether nominal schemes can handle more than two classes.
If a scheme is only designed for two-class problems it should
throw an appropriate exception for multi-class problems.
Parameters: nominalPredictor - if true use nominal predictor attributes Parameters: numericPredictor - if true use numeric predictor attributes Parameters: stringPredictor - if true use string predictor attributes Parameters: datePredictor - if true use date predictor attributes Parameters: relationalPredictor - if true use relational predictor attributes Parameters: multiInstance - whether multi-instance is needed Parameters: numClasses - the number of classes to test index 0 is true if the test was passed, index 1 is true if test was acceptable |
canHandleOnlyClass | protected boolean[] canHandleOnlyClass(boolean nominalPredictor, boolean numericPredictor, boolean stringPredictor, boolean datePredictor, boolean relationalPredictor, int classType)(Code) | | Checks whether the scheme can handle data that contains only the class
attribute. If a scheme cannot build a proper model with that data, it
should default back to a ZeroR model.
Parameters: nominalPredictor - if true use nominal predictor attributes Parameters: numericPredictor - if true use numeric predictor attributes Parameters: stringPredictor - if true use string predictor attributes Parameters: datePredictor - if true use date predictor attributes Parameters: relationalPredictor - if true use relational predictor attributes Parameters: classType - the class type (NOMINAL, NUMERIC, etc.) index 0 is true if the test was passed, index 1 is true if test was acceptable |
canHandleZeroTraining | protected boolean[] canHandleZeroTraining(boolean nominalPredictor, boolean numericPredictor, boolean stringPredictor, boolean datePredictor, boolean relationalPredictor, boolean multiInstance, int classType)(Code) | | Checks whether the scheme can handle zero training instances.
Parameters: nominalPredictor - if true use nominal predictor attributes Parameters: numericPredictor - if true use numeric predictor attributes Parameters: stringPredictor - if true use string predictor attributes Parameters: datePredictor - if true use date predictor attributes Parameters: relationalPredictor - if true use relational predictor attributes Parameters: multiInstance - whether multi-instance is needed Parameters: classType - the class type (NUMERIC, NOMINAL, etc.) index 0 is true if the test was passed, index 1 is true if test was acceptable |
canPredict | protected boolean[] canPredict(boolean nominalPredictor, boolean numericPredictor, boolean stringPredictor, boolean datePredictor, boolean relationalPredictor, boolean multiInstance, int classType)(Code) | | Checks basic prediction of the scheme, for simple non-troublesome
datasets.
Parameters: nominalPredictor - if true use nominal predictor attributes Parameters: numericPredictor - if true use numeric predictor attributes Parameters: stringPredictor - if true use string predictor attributes Parameters: datePredictor - if true use date predictor attributes Parameters: relationalPredictor - if true use relational predictor attributes Parameters: multiInstance - whether multi-instance is needed Parameters: classType - the class type (NOMINAL, NUMERIC, etc.) index 0 is true if the test was passed, index 1 is true if test was acceptable |
canTakeOptions | protected boolean[] canTakeOptions()(Code) | | Checks whether the scheme can take command line options.
index 0 is true if the classifier can take options |
correctBuildInitialisation | protected boolean[] correctBuildInitialisation(boolean nominalPredictor, boolean numericPredictor, boolean stringPredictor, boolean datePredictor, boolean relationalPredictor, boolean multiInstance, int classType)(Code) | | Checks whether the scheme correctly initialises models when
buildClassifier is called. This test calls buildClassifier with
one training dataset and records performance on a test set.
buildClassifier is then called on a training set with different
structure, and then again with the original training set. The
performance on the test set is compared with the original results
and any performance difference noted as incorrect build initialisation.
Parameters: nominalPredictor - if true use nominal predictor attributes Parameters: numericPredictor - if true use numeric predictor attributes Parameters: stringPredictor - if true use string predictor attributes Parameters: datePredictor - if true use date predictor attributes Parameters: relationalPredictor - if true use relational predictor attributes Parameters: multiInstance - whether multi-instance is needed Parameters: classType - the class type (NUMERIC, NOMINAL, etc.) index 0 is true if the test was passed, index 1 is true if thescheme performs worse than ZeroR, but without error (index 0 isfalse) |
datasetIntegrity | protected boolean[] datasetIntegrity(boolean nominalPredictor, boolean numericPredictor, boolean stringPredictor, boolean datePredictor, boolean relationalPredictor, boolean multiInstance, int classType, boolean predictorMissing, boolean classMissing)(Code) | | Checks whether the scheme alters the training dataset during
training. If the scheme needs to modify the training
data it should take a copy of the training data. Currently checks
for changes to header structure, number of instances, order of
instances, instance weights.
Parameters: nominalPredictor - if true use nominal predictor attributes Parameters: numericPredictor - if true use numeric predictor attributes Parameters: stringPredictor - if true use string predictor attributes Parameters: datePredictor - if true use date predictor attributes Parameters: relationalPredictor - if true use relational predictor attributes Parameters: multiInstance - whether multi-instance is needed Parameters: classType - the class type (NUMERIC, NOMINAL, etc.) Parameters: predictorMissing - true if we know the classifier can handle(at least) moderate missing predictor values Parameters: classMissing - true if we know the classifier can handle(at least) moderate missing class values index 0 is true if the test was passed |
declaresSerialVersionUID | protected boolean[] declaresSerialVersionUID()(Code) | | tests for a serialVersionUID. Fails in case the scheme doesn't declare
a UID.
index 0 is true if the scheme declares a UID |
doTests | public void doTests()(Code) | | Begin the tests, reporting results to System.out
|
doesntUseTestClassVal | protected boolean[] doesntUseTestClassVal(boolean nominalPredictor, boolean numericPredictor, boolean stringPredictor, boolean datePredictor, boolean relationalPredictor, boolean multiInstance, int classType)(Code) | | Checks whether the classifier erroneously uses the class
value of test instances (if provided). Runs the classifier with
test instance class values set to missing and compares with results
when test instance class values are left intact.
Parameters: nominalPredictor - if true use nominal predictor attributes Parameters: numericPredictor - if true use numeric predictor attributes Parameters: stringPredictor - if true use string predictor attributes Parameters: datePredictor - if true use date predictor attributes Parameters: relationalPredictor - if true use relational predictor attributes Parameters: multiInstance - whether multi-instance is needed Parameters: classType - the class type (NUMERIC, NOMINAL, etc.) index 0 is true if the test was passed |
getClassifier | public Classifier getClassifier()(Code) | | Get the classifier used as the classifier
the classifier used as the classifier |
getOptions | public String[] getOptions()(Code) | | Gets the current settings of the CheckClassifier.
an array of strings suitable for passing to setOptions |
instanceWeights | protected boolean[] instanceWeights(boolean nominalPredictor, boolean numericPredictor, boolean stringPredictor, boolean datePredictor, boolean relationalPredictor, boolean multiInstance, int classType)(Code) | | Checks whether the classifier can handle instance weights.
This test compares the classifier performance on two datasets
that are identical except for the training weights. If the
results change, then the classifier must be using the weights. It
may be possible to get a false positive from this test if the
weight changes aren't significant enough to induce a change
in classifier performance (but the weights are chosen to minimize
the likelihood of this).
Parameters: nominalPredictor - if true use nominal predictor attributes Parameters: numericPredictor - if true use numeric predictor attributes Parameters: stringPredictor - if true use string predictor attributes Parameters: datePredictor - if true use date predictor attributes Parameters: relationalPredictor - if true use relational predictor attributes Parameters: multiInstance - whether multi-instance is needed Parameters: classType - the class type (NUMERIC, NOMINAL, etc.) index 0 true if the test was passed |
listOptions | public Enumeration listOptions()(Code) | | Returns an enumeration describing the available options.
an enumeration of all the available options. |
main | public static void main(String[] args)(Code) | | Test method for this class
Parameters: args - the commandline parameters |
makeTestDataset | protected Instances makeTestDataset(int seed, int numInstances, int numNominal, int numNumeric, int numString, int numDate, int numRelational, int numClasses, int classType, boolean multiInstance) throws Exception(Code) | | Make a simple set of instances, which can later be modified
for use in specific tests.
Parameters: seed - the random number seed Parameters: numInstances - the number of instances to generate Parameters: numNominal - the number of nominal attributes Parameters: numNumeric - the number of numeric attributes Parameters: numString - the number of string attributes Parameters: numDate - the number of date attributes Parameters: numRelational - the number of relational attributes Parameters: numClasses - the number of classes (if nominal class) Parameters: classType - the class type (NUMERIC, NOMINAL, etc.) Parameters: multiInstance - whether the dataset should a multi-instance dataset the test dataset throws: Exception - if the dataset couldn't be generated See Also: CheckClassifier.process(Instances) |
makeTestDataset | protected Instances makeTestDataset(int seed, int numInstances, int numNominal, int numNumeric, int numString, int numDate, int numRelational, int numClasses, int classType, int classIndex, boolean multiInstance) throws Exception(Code) | | Make a simple set of instances with variable position of the class
attribute, which can later be modified for use in specific tests.
Parameters: seed - the random number seed Parameters: numInstances - the number of instances to generate Parameters: numNominal - the number of nominal attributes Parameters: numNumeric - the number of numeric attributes Parameters: numString - the number of string attributes Parameters: numDate - the number of date attributes Parameters: numRelational - the number of relational attributes Parameters: numClasses - the number of classes (if nominal class) Parameters: classType - the class type (NUMERIC, NOMINAL, etc.) Parameters: classIndex - the index of the class (0-based, -1 as last) Parameters: multiInstance - whether the dataset should a multi-instance dataset the test dataset throws: Exception - if the dataset couldn't be generated See Also: TestInstances.CLASS_IS_LAST See Also: CheckClassifier.process(Instances) |
multiInstanceHandler | protected boolean[] multiInstanceHandler()(Code) | | Checks whether the scheme handles multi-instance data.
true if the classifier handles multi-instance data |
printAttributeSummary | protected void printAttributeSummary(boolean nominalPredictor, boolean numericPredictor, boolean stringPredictor, boolean datePredictor, boolean relationalPredictor, boolean multiInstance, int classType)(Code) | | Print out a short summary string for the dataset characteristics
Parameters: nominalPredictor - true if nominal predictor attributes are present Parameters: numericPredictor - true if numeric predictor attributes are present Parameters: stringPredictor - true if string predictor attributes are present Parameters: datePredictor - true if date predictor attributes are present Parameters: relationalPredictor - true if relational predictor attributes are present Parameters: multiInstance - whether multi-instance is needed Parameters: classType - the class type (NUMERIC, NOMINAL, etc.) |
runBasicTest | protected boolean[] runBasicTest(boolean nominalPredictor, boolean numericPredictor, boolean stringPredictor, boolean datePredictor, boolean relationalPredictor, boolean multiInstance, int classType, int missingLevel, boolean predictorMissing, boolean classMissing, int numTrain, int numTest, int numClasses, FastVector accepts)(Code) | | Runs a text on the datasets with the given characteristics.
Parameters: nominalPredictor - if true use nominal predictor attributes Parameters: numericPredictor - if true use numeric predictor attributes Parameters: stringPredictor - if true use string predictor attributes Parameters: datePredictor - if true use date predictor attributes Parameters: relationalPredictor - if true use relational predictor attributes Parameters: multiInstance - whether multi-instance is needed Parameters: classType - the class type (NUMERIC, NOMINAL, etc.) Parameters: missingLevel - the percentage of missing values Parameters: predictorMissing - true if the missing values may be in the predictors Parameters: classMissing - true if the missing values may be in the class Parameters: numTrain - the number of instances in the training set Parameters: numTest - the number of instaces in the test set Parameters: numClasses - the number of classes Parameters: accepts - the acceptable string in an exception index 0 is true if the test was passed, index 1 is true if test was acceptable |
runBasicTest | protected boolean[] runBasicTest(boolean nominalPredictor, boolean numericPredictor, boolean stringPredictor, boolean datePredictor, boolean relationalPredictor, boolean multiInstance, int classType, int classIndex, int missingLevel, boolean predictorMissing, boolean classMissing, int numTrain, int numTest, int numClasses, FastVector accepts)(Code) | | Runs a text on the datasets with the given characteristics.
Parameters: nominalPredictor - if true use nominal predictor attributes Parameters: numericPredictor - if true use numeric predictor attributes Parameters: stringPredictor - if true use string predictor attributes Parameters: datePredictor - if true use date predictor attributes Parameters: relationalPredictor - if true use relational predictor attributes Parameters: multiInstance - whether multi-instance is needed Parameters: classType - the class type (NUMERIC, NOMINAL, etc.) Parameters: classIndex - the attribute index of the class Parameters: missingLevel - the percentage of missing values Parameters: predictorMissing - true if the missing values may be in the predictors Parameters: classMissing - true if the missing values may be in the class Parameters: numTrain - the number of instances in the training set Parameters: numTest - the number of instaces in the test set Parameters: numClasses - the number of classes Parameters: accepts - the acceptable string in an exception index 0 is true if the test was passed, index 1 is true if test was acceptable |
setClassifier | public void setClassifier(Classifier newClassifier)(Code) | | Set the classifier for boosting.
Parameters: newClassifier - the Classifier to use. |
setOptions | public void setOptions(String[] options) throws Exception(Code) | | Parses a given list of options.
Valid options are:
-D
Turn on debugging output.
-S
Silent mode - prints nothing to stdout.
-N <num>
The number of instances in the datasets (default 20).
-nominal <num>
The number of nominal attributes (default 2).
-nominal-values <num>
The number of values for nominal attributes (default 1).
-numeric <num>
The number of numeric attributes (default 1).
-string <num>
The number of string attributes (default 1).
-date <num>
The number of date attributes (default 1).
-relational <num>
The number of relational attributes (default 1).
-num-instances-relational <num>
The number of instances in relational/bag attributes (default 10).
-words <comma-separated-list>
The words to use in string attributes.
-word-separators <chars>
The word separators to use in string attributes.
-W
Full name of the classifier analysed.
eg: weka.classifiers.bayes.NaiveBayes
(default weka.classifiers.rules.ZeroR)
Options specific to classifier weka.classifiers.rules.ZeroR:
-D
If set, classifier is run in debug mode and
may output additional info to the console
Parameters: options - the list of options as an array of strings throws: Exception - if an option is not supported |
testToString | protected boolean[] testToString()(Code) | | Checks whether the scheme's toString() method works even though the
classifies hasn't been built yet.
index 0 is true if the toString() method works fine |
testWRTZeroR | protected boolean[] testWRTZeroR(Classifier classifier, Evaluation evaluation, Instances train, Instances test) throws Exception(Code) | | Determine whether the scheme performs worse than ZeroR during testing
Parameters: classifier - the pre-trained classifier Parameters: evaluation - the classifier evaluation object Parameters: train - the training data Parameters: test - the test data index 0 is true if the scheme performs better than ZeroR throws: Exception - if there was a problem during the scheme's testing |
testsPerClassType | protected void testsPerClassType(int classType, boolean updateable, boolean weighted, boolean multiInstance)(Code) | | Run a battery of tests for a given class attribute type
Parameters: classType - true if the class attribute should be numeric Parameters: updateable - true if the classifier is updateable Parameters: weighted - true if the classifier says it handles weights Parameters: multiInstance - true if the classifier is a multi-instance classifier |
updateableClassifier | protected boolean[] updateableClassifier()(Code) | | Checks whether the scheme can build models incrementally.
index 0 is true if the classifier can train incrementally |
updatingEquality | protected boolean[] updatingEquality(boolean nominalPredictor, boolean numericPredictor, boolean stringPredictor, boolean datePredictor, boolean relationalPredictor, boolean multiInstance, int classType)(Code) | | Checks whether an updateable scheme produces the same model when
trained incrementally as when batch trained. The model itself
cannot be compared, so we compare the evaluation on test data
for both models. It is possible to get a false positive on this
test (likelihood depends on the classifier).
Parameters: nominalPredictor - if true use nominal predictor attributes Parameters: numericPredictor - if true use numeric predictor attributes Parameters: stringPredictor - if true use string predictor attributes Parameters: datePredictor - if true use date predictor attributes Parameters: relationalPredictor - if true use relational predictor attributes Parameters: multiInstance - whether multi-instance is needed Parameters: classType - the class type (NUMERIC, NOMINAL, etc.) index 0 is true if the test was passed |
weightedInstancesHandler | protected boolean[] weightedInstancesHandler()(Code) | | Checks whether the scheme says it can handle instance weights.
true if the classifier handles instance weights |
|
|