|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.classifiers.Classifier
weka.classifiers.mi.CitationKNN
public class CitationKNN
Modified version of the Citation kNN multi instance classifier.
For more information see:
Jun Wang, Zucker, Jean-Daniel: Solving Multiple-Instance Problem: A Lazy Learning Approach. In: 17th International Conference on Machine Learning, 1119-1125, 2000.
@inproceedings{Wang2000,
author = {Jun Wang and Zucker and Jean-Daniel},
booktitle = {17th International Conference on Machine Learning},
editor = {Pat Langley},
pages = {1119-1125},
title = {Solving Multiple-Instance Problem: A Lazy Learning Approach},
year = {2000}
}
Valid options are:
-R <number of references> Number of Nearest References (default 1)
-C <number of citers> Number of Nearest Citers (default 1)
-H <rank> Rank of the Hausdorff Distance (default 1)
| Constructor Summary | |
|---|---|
CitationKNN()
|
|
| Method Summary | |
|---|---|
void |
buildClassifier(Instances train)
Builds the classifier |
void |
buildCNN()
generates all the variables associated to the citation classifier |
void |
countBagCiters(Instance bag)
calculates the citers associated to a bag |
void |
countBagReferences(Instance bag)
Calculates the references of the exemplar bag |
double |
distance(Instance first,
Instance second)
distance between two instances |
double |
distanceSet(Instance first,
Instance second)
Calculates the distance between two instances |
double[] |
distributionForInstance(Instance bag)
Computes the distribution for a given exemplar |
boolean |
equalExemplars(Instance exemplar1,
Instance exemplar2)
Wether the instances of two exemplars are or are not equal |
Capabilities |
getCapabilities()
Returns default capabilities of the classifier. |
int |
getHDRank()
Returns the rank associated to the Hausdorff distance |
Capabilities |
getMultiInstanceCapabilities()
Returns the capabilities of this multi-instance classifier for the relational data. |
int |
getNumCiters()
Returns the number of citers considered to estimate the class prediction of tests bags |
int |
getNumReferences()
Returns the number of references considered to estimate the class prediction of tests bags |
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 this filter |
java.lang.String |
HDRankTipText()
Returns the tip text for this property |
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 |
numCitersTipText()
Returns the tip text for this property |
java.lang.String |
numReferencesTipText()
Returns the tip text for this property |
void |
preprocessData()
Calculates the normalization of each attribute. |
void |
setHDRank(int hDRank)
Sets the rank associated to the Hausdorff distance |
void |
setNumCiters(int numCiters)
Sets the number of citers considered to estimate the class prediction of tests bags |
void |
setNumReferences(int numReferences)
Sets the number of references considered to estimate the class prediction of tests bags |
void |
setOptions(java.lang.String[] options)
Sets the OptionHandler's options using the given list. |
java.lang.String |
toString()
returns a string representation of the classifier |
void |
updateNormalization(Instance bag)
Updates the normalization of each attribute. |
| Methods inherited from class weka.classifiers.Classifier |
|---|
classifyInstance, debugTipText, forName, getDebug, makeCopies, makeCopy, setDebug |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CitationKNN()
| Method Detail |
|---|
public java.lang.String globalInfo()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation in interface TechnicalInformationHandlerpublic void preprocessData()
public java.lang.String HDRankTipText()
public void setHDRank(int hDRank)
hDRank - the rank of the Hausdorff distancepublic int getHDRank()
public java.lang.String numReferencesTipText()
public void setNumReferences(int numReferences)
numReferences - the number of referencespublic int getNumReferences()
public java.lang.String numCitersTipText()
public void setNumCiters(int numCiters)
numCiters - the number of citerspublic int getNumCiters()
public Capabilities getCapabilities()
getCapabilities in interface CapabilitiesHandlergetCapabilities in class ClassifierCapabilitiespublic Capabilities getMultiInstanceCapabilities()
getMultiInstanceCapabilities in interface MultiInstanceCapabilitiesHandlerCapabilities
public void buildClassifier(Instances train)
throws java.lang.Exception
buildClassifier in class Classifiertrain - the training data to be used for generating the
boosted classifier.
java.lang.Exception - if the classifier could not be built successfully
public void buildCNN()
throws java.lang.Exception
java.lang.Exception - if generation failspublic void countBagCiters(Instance bag)
bag - the bag citedpublic void countBagReferences(Instance bag)
bag - the exemplar to which the nearest references
will be calculated
public double distanceSet(Instance first,
Instance second)
first - instancesecond - instance
public double distance(Instance first,
Instance second)
first - the first instancesecond - the other instance
public double[] distributionForInstance(Instance bag)
throws java.lang.Exception
distributionForInstance in class Classifierbag - the exemplar for which distribution is computed
java.lang.Exception - if the distribution can't be computed successfullypublic void updateNormalization(Instance bag)
bag - the exemplar to update the normalization for
public boolean equalExemplars(Instance exemplar1,
Instance exemplar2)
exemplar1 - first exemplarexemplar2 - second exemplar
public java.util.Enumeration listOptions()
listOptions in interface OptionHandlerlistOptions in class Classifier
public void setOptions(java.lang.String[] options)
throws java.lang.Exception
-R <number of references> Number of Nearest References (default 1)
-C <number of citers> Number of Nearest Citers (default 1)
-H <rank> Rank of the Hausdorff Distance (default 1)
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 toString()
toString in class java.lang.Objectpublic java.lang.String getRevision()
getRevision in interface RevisionHandlergetRevision in class Classifierpublic static void main(java.lang.String[] argv)
argv - should contain the command line arguments to the
scheme (see Evaluation)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||