|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.classifiers.Classifier
weka.classifiers.rules.NNge
public class NNge
NNge classifier. Nearest neighbor like algorithm using non-nested generalized exemplars. For more information, see
Brent Martin, (1995) "Instance-Based learning : Nearest Neighbor With Generalization", Master Thesis, University of Waikato, Hamilton, New Zealand
Sylvain Roy (2002) "Nearest Neighbor With Generalization", Unpublished, University of Canterbury, Christchurch, New Zealand
Valid options are:
-I num
Set the number of folder to use in the computing of the mutual information
(default 5)
-G num
Set the number of attempts of generalisation
(default 5)
| Constructor Summary | |
|---|---|
NNge()
|
|
| Method Summary | |
|---|---|
void |
buildClassifier(Instances data)
Generates a classifier. |
double |
classifyInstance(Instance instance)
Classifies a given instance. |
int |
getNumAttemptsOfGeneOption()
Gets the number of attempts for generalisation. |
int |
getNumFoldersMIOption()
Gets the number of folder for mutual information. |
java.lang.String[] |
getOptions()
Gets the current option settings for the OptionHandler. |
java.lang.String |
globalInfo()
Returns a string describing classifier |
java.util.Enumeration |
listOptions()
Returns an enumeration of all the available options.. |
static void |
main(java.lang.String[] argv)
Main method for testing this class. |
java.lang.String |
numAttemptsOfGeneOptionTipText()
Returns the tip text for this property |
java.lang.String |
numFoldersMIOptionTipText()
Returns the tip text for this property |
void |
setNumAttemptsOfGeneOption(int newIntParameter)
Sets the number of attempts for generalisation. |
void |
setNumFoldersMIOption(int newIntParameter)
Sets the number of folder for mutual information. |
void |
setOptions(java.lang.String[] options)
Sets the OptionHandler's options using the given list. |
java.lang.String |
toString()
Returns a description of this classifier. |
void |
updateClassifier(Instance instance)
Updates the classifier using the given instance. |
| Methods inherited from class weka.classifiers.Classifier |
|---|
debugTipText, distributionForInstance, forName, getDebug, makeCopies, makeCopy, setDebug |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NNge()
| Method Detail |
|---|
public java.lang.String globalInfo()
public void buildClassifier(Instances data)
throws java.lang.Exception
buildClassifier in class Classifierdata - set of instances serving as training data
java.lang.Exception - if the classifier has not been
generated successfully
public double classifyInstance(Instance instance)
throws java.lang.Exception
classifyInstance in class Classifierinstance - the instance to be classified
java.lang.Exception - if instance could not be classified
successfully
public void updateClassifier(Instance instance)
throws java.lang.Exception
updateClassifier in interface UpdateableClassifierinstance - the instance to include
java.lang.Exception - if instance could not be incorporated
successfullypublic java.lang.String toString()
toString in class java.lang.Objectpublic java.util.Enumeration listOptions()
listOptions in interface OptionHandlerlistOptions in class Classifier
public void setOptions(java.lang.String[] options)
throws java.lang.Exception
setOptions in interface OptionHandlersetOptions in class Classifieroptions - the list of options as an array of strings
java.lang.Exception - if an option is not supportedpublic java.lang.String[] getOptions()
getOptions in interface OptionHandlergetOptions in class Classifierpublic java.lang.String numAttemptsOfGeneOptionTipText()
public int getNumAttemptsOfGeneOption()
public void setNumAttemptsOfGeneOption(int newIntParameter)
newIntParameter - the new value.public java.lang.String numFoldersMIOptionTipText()
public int getNumFoldersMIOption()
public void setNumFoldersMIOption(int newIntParameter)
newIntParameter - the new value.public static void main(java.lang.String[] argv)
argv - should contain command line arguments for evaluation
(see Evaluation).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||