|
||||||||||
| 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
Nearest-neighbor-like algorithm using non-nested generalized exemplars (which are hyperrectangles that can be viewed as if-then rules). For more information, see
Brent Martin (1995). Instance-Based learning: Nearest Neighbor With Generalization. Hamilton, New Zealand.
Sylvain Roy (2002). Nearest Neighbor With Generalization. Christchurch, New Zealand.
@mastersthesis{Martin1995,
address = {Hamilton, New Zealand},
author = {Brent Martin},
school = {University of Waikato},
title = {Instance-Based learning: Nearest Neighbor With Generalization},
year = {1995}
}
@unpublished{Roy2002,
address = {Christchurch, New Zealand},
author = {Sylvain Roy},
school = {University of Canterbury},
title = {Nearest Neighbor With Generalization},
year = {2002}
}
Valid options are:
-G <value> Number of attempts of generalisation.
-I <value> Number of folder for computing the mutual information.
| Constructor Summary | |
|---|---|
NNge()
|
|
| Method Summary | |
|---|---|
void |
buildClassifier(Instances data)
Generates a classifier. |
double |
classifyInstance(Instance instance)
Classifies a given instance. |
Capabilities |
getCapabilities()
Returns default capabilities of the classifier. |
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 |
getRevision()
Returns the revision string. |
TechnicalInformation |
getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on. |
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 TechnicalInformation getTechnicalInformation()
getTechnicalInformation in interface TechnicalInformationHandlerpublic Capabilities getCapabilities()
getCapabilities in interface CapabilitiesHandlergetCapabilities in class ClassifierCapabilities
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
-G <value> Number of attempts of generalisation.
-I <value> Number of folder for computing the mutual information.
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 java.lang.String getRevision()
getRevision in interface RevisionHandlergetRevision in class Classifierpublic 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 | |||||||||