public class NNge
extends weka.classifiers.AbstractClassifier
implements weka.classifiers.UpdateableClassifier, weka.core.OptionHandler, weka.core.TechnicalInformationHandler
@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 and Description |
---|
NNge() |
Modifier and Type | Method and Description |
---|---|
void |
buildClassifier(weka.core.Instances data)
Generates a classifier.
|
double |
classifyInstance(weka.core.Instance instance)
Classifies a given instance.
|
weka.core.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.
|
weka.core.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(weka.core.Instance instance)
Updates the classifier using the given instance.
|
batchSizeTipText, debugTipText, distributionForInstance, distributionsForInstances, doNotCheckCapabilitiesTipText, forName, getBatchSize, getDebug, getDoNotCheckCapabilities, getNumDecimalPlaces, implementsMoreEfficientBatchPrediction, makeCopies, makeCopy, numDecimalPlacesTipText, postExecution, preExecution, run, runClassifier, setBatchSize, setDebug, setDoNotCheckCapabilities, setNumDecimalPlaces
public java.lang.String globalInfo()
public weka.core.TechnicalInformation getTechnicalInformation()
getTechnicalInformation
in interface weka.core.TechnicalInformationHandler
public weka.core.Capabilities getCapabilities()
getCapabilities
in interface weka.classifiers.Classifier
getCapabilities
in interface weka.core.CapabilitiesHandler
getCapabilities
in class weka.classifiers.AbstractClassifier
public void buildClassifier(weka.core.Instances data) throws java.lang.Exception
buildClassifier
in interface weka.classifiers.Classifier
data
- set of instances serving as training datajava.lang.Exception
- if the classifier has not been
generated successfullypublic double classifyInstance(weka.core.Instance instance) throws java.lang.Exception
classifyInstance
in interface weka.classifiers.Classifier
classifyInstance
in class weka.classifiers.AbstractClassifier
instance
- the instance to be classifiedjava.lang.Exception
- if instance could not be classified
successfullypublic void updateClassifier(weka.core.Instance instance) throws java.lang.Exception
updateClassifier
in interface weka.classifiers.UpdateableClassifier
instance
- the instance to includejava.lang.Exception
- if instance could not be incorporated
successfullypublic java.lang.String toString()
toString
in class java.lang.Object
public java.util.Enumeration listOptions()
listOptions
in interface weka.core.OptionHandler
listOptions
in class weka.classifiers.AbstractClassifier
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 weka.core.OptionHandler
setOptions
in class weka.classifiers.AbstractClassifier
options
- the list of options as an array of stringsjava.lang.Exception
- if an option is not supportedpublic java.lang.String[] getOptions()
getOptions
in interface weka.core.OptionHandler
getOptions
in class weka.classifiers.AbstractClassifier
public 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 weka.core.RevisionHandler
getRevision
in class weka.classifiers.AbstractClassifier
public static void main(java.lang.String[] argv)
argv
- should contain command line arguments for evaluation
(see Evaluation).