|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.classifiers.AbstractClassifier
weka.classifiers.SingleClassifierEnhancer
weka.classifiers.meta.WeightedInstancesHandlerWrapper
public class WeightedInstancesHandlerWrapper
A meta-classifier that implements the weka.core.WeightedInstancesHandler interface in order to enable all classifiers to be used in other meta-classifiers that require the base classifier to implem ent the WeightedInstancesHandler interface. This meta-classifier does nothing with the weights, it is just a dumb (but useful) wrapper.
Valid options are:-D If set, classifier is run in debug mode and may output additional info to the console
-W Full name of base classifier. (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
| Field Summary |
|---|
| Fields inherited from class weka.classifiers.SingleClassifierEnhancer |
|---|
m_Classifier |
| Fields inherited from class weka.classifiers.AbstractClassifier |
|---|
m_Debug |
| Constructor Summary | |
|---|---|
WeightedInstancesHandlerWrapper()
|
|
| Method Summary | |
|---|---|
void |
buildClassifier(weka.core.Instances data)
Generates a classifier. |
double |
classifyInstance(weka.core.Instance instance)
Classifies the given test instance. |
double[] |
distributionForInstance(weka.core.Instance instance)
Predicts the class memberships for a given instance. |
String |
globalInfo()
Returns a string describing the classifier. |
static void |
main(String[] args)
Main method for running this class. |
String |
toString()
Returns a string representation of the base classifier. |
| Methods inherited from class weka.classifiers.SingleClassifierEnhancer |
|---|
classifierTipText, defaultClassifierString, getCapabilities, getClassifier, getClassifierSpec, getOptions, listOptions, setClassifier, setOptions |
| Methods inherited from class weka.classifiers.AbstractClassifier |
|---|
debugTipText, forName, getDebug, getRevision, makeCopies, makeCopy, runClassifier, setDebug |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public WeightedInstancesHandlerWrapper()
| Method Detail |
|---|
public String globalInfo()
public void buildClassifier(weka.core.Instances data)
throws Exception
buildClassifier in interface weka.classifiers.Classifierdata - set of instances serving as training data
Exception - if the classifier has not been
generated successfully
public double classifyInstance(weka.core.Instance instance)
throws Exception
classifyInstance in interface weka.classifiers.ClassifierclassifyInstance in class weka.classifiers.AbstractClassifierinstance - the instance to be classified
Exception - if an error occurred during the prediction
public double[] distributionForInstance(weka.core.Instance instance)
throws Exception
distributionForInstance in interface weka.classifiers.ClassifierdistributionForInstance in class weka.classifiers.AbstractClassifierinstance - the instance to be classified
Exception - if distribution could not be
computed successfullypublic String toString()
toString in class Objectpublic static void main(String[] args)
args - the options
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||