|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weka.classifiers.Classifier
Abstract classifier. All schemes for numeric or nominal prediction in Weka extend this class.
Constructor Summary | |
Classifier()
|
Method Summary | |
abstract void |
buildClassifier(Instances data)
Generates a classifier. |
abstract double |
classifyInstance(Instance instance)
Classifies a given instance. |
static Classifier |
forName(String classifierName,
String[] options)
Creates a new instance of a classifier given it's class name and (optional) arguments to pass to it's setOptions method. |
static Classifier[] |
makeCopies(Classifier model,
int num)
Creates copies of the current classifier, which can then be used for boosting etc. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Classifier()
Method Detail |
public abstract void buildClassifier(Instances data) throws Exception
data
- set of instances serving as training data
Exception
- if the classifier has not been
generated successfullypublic abstract double classifyInstance(Instance instance) throws Exception
instance
- the instance to be classified
Exception
- if instance could not be classified
successfullypublic static Classifier forName(String classifierName, String[] options) throws Exception
classifierName
- the fully qualified class name of the classifieroptions
- an array of options suitable for passing to setOptions. May
be null.
Exception
- if the classifier name is invalid, or the options
supplied are not acceptable to the classifierpublic static Classifier[] makeCopies(Classifier model, int num) throws Exception
model
- an example classifier to copynum
- the number of classifiers copies to create.
Exception
- if an error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |