类 CitationKNN
java.lang.Object
weka.classifiers.Classifier
weka.classifiers.mi.CitationKNN
- 所有已实现的接口:
Serializable
,Cloneable
,CapabilitiesHandler
,MultiInstanceCapabilitiesHandler
,OptionHandler
,RevisionHandler
,TechnicalInformationHandler
public class CitationKNN
extends Classifier
implements OptionHandler, MultiInstanceCapabilitiesHandler, TechnicalInformationHandler
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. BibTeX:
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. BibTeX:
@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)
- 版本:
- $Revision: 9146 $
- 作者:
- Miguel Garcia Torres (mgarciat@ull.es)
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
buildClassifier
(Instances train) Builds the classifiervoid
buildCNN()
generates all the variables associated to the citation classifiervoid
countBagCiters
(Instance bag) calculates the citers associated to a bagvoid
Calculates the references of the exemplar bagdouble
distance between two instancesdouble
distanceSet
(Instance first, Instance second) Calculates the distance between two instancesdouble[]
Computes the distribution for a given exemplarboolean
equalExemplars
(Instance exemplar1, Instance exemplar2) Wether the instances of two exemplars are or are not equalReturns default capabilities of the classifier.int
Returns the rank associated to the Hausdorff distanceReturns the capabilities of this multi-instance classifier for the relational data.int
Returns the number of citers considered to estimate the class prediction of tests bagsint
Returns the number of references considered to estimate the class prediction of tests bagsString[]
Gets the current option settings for the OptionHandler.Returns the revision string.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.Returns a string describing this filterReturns the tip text for this propertyReturns an enumeration of all the available options..static void
Main method for testing this class.Returns the tip text for this propertyReturns the tip text for this propertyvoid
Calculates the normalization of each attribute.void
setHDRank
(int hDRank) Sets the rank associated to the Hausdorff distancevoid
setNumCiters
(int numCiters) Sets the number of citers considered to estimate the class prediction of tests bagsvoid
setNumReferences
(int numReferences) Sets the number of references considered to estimate the class prediction of tests bagsvoid
setOptions
(String[] options) Sets the OptionHandler's options using the given list.toString()
returns a string representation of the classifiervoid
Updates the normalization of each attribute.从类继承的方法 weka.classifiers.Classifier
classifyInstance, debugTipText, forName, getDebug, makeCopies, makeCopy, setDebug
-
构造器详细资料
-
CitationKNN
public CitationKNN()
-
-
方法详细资料
-
globalInfo
Returns a string describing this filter- 返回:
- a description of the filter suitable for displaying in the explorer/experimenter gui
-
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.- 指定者:
getTechnicalInformation
在接口中TechnicalInformationHandler
- 返回:
- the technical information about this class
-
preprocessData
public void preprocessData()Calculates the normalization of each attribute. -
HDRankTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setHDRank
public void setHDRank(int hDRank) Sets the rank associated to the Hausdorff distance- 参数:
hDRank
- the rank of the Hausdorff distance
-
getHDRank
public int getHDRank()Returns the rank associated to the Hausdorff distance- 返回:
- the rank number
-
numReferencesTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setNumReferences
public void setNumReferences(int numReferences) Sets the number of references considered to estimate the class prediction of tests bags- 参数:
numReferences
- the number of references
-
getNumReferences
public int getNumReferences()Returns the number of references considered to estimate the class prediction of tests bags- 返回:
- the number of references
-
numCitersTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setNumCiters
public void setNumCiters(int numCiters) Sets the number of citers considered to estimate the class prediction of tests bags- 参数:
numCiters
- the number of citers
-
getNumCiters
public int getNumCiters()Returns the number of citers considered to estimate the class prediction of tests bags- 返回:
- the number of citers
-
getCapabilities
Returns default capabilities of the classifier.- 指定者:
getCapabilities
在接口中CapabilitiesHandler
- 覆盖:
getCapabilities
在类中Classifier
- 返回:
- the capabilities of this classifier
- 另请参阅:
-
getMultiInstanceCapabilities
Returns the capabilities of this multi-instance classifier for the relational data.- 指定者:
getMultiInstanceCapabilities
在接口中MultiInstanceCapabilitiesHandler
- 返回:
- the capabilities of this object
- 另请参阅:
-
buildClassifier
Builds the classifier- 指定者:
buildClassifier
在类中Classifier
- 参数:
train
- the training data to be used for generating the boosted classifier.- 抛出:
Exception
- if the classifier could not be built successfully
-
buildCNN
generates all the variables associated to the citation classifier- 抛出:
Exception
- if generation fails
-
countBagCiters
calculates the citers associated to a bag- 参数:
bag
- the bag cited
-
countBagReferences
Calculates the references of the exemplar bag- 参数:
bag
- the exemplar to which the nearest references will be calculated
-
distanceSet
Calculates the distance between two instances- 参数:
first
- instancesecond
- instance- 返回:
- the distance value
-
distance
distance between two instances- 参数:
first
- the first instancesecond
- the other instance- 返回:
- the distance in double precision
-
distributionForInstance
Computes the distribution for a given exemplar- 覆盖:
distributionForInstance
在类中Classifier
- 参数:
bag
- the exemplar for which distribution is computed- 返回:
- the distribution
- 抛出:
Exception
- if the distribution can't be computed successfully
-
updateNormalization
Updates the normalization of each attribute.- 参数:
bag
- the exemplar to update the normalization for
-
equalExemplars
Wether the instances of two exemplars are or are not equal- 参数:
exemplar1
- first exemplarexemplar2
- second exemplar- 返回:
- if the instances of the exemplars are equal or not
-
listOptions
Returns an enumeration of all the available options..- 指定者:
listOptions
在接口中OptionHandler
- 覆盖:
listOptions
在类中Classifier
- 返回:
- an enumeration of all available options.
-
setOptions
Sets the OptionHandler's options using the given list. All options will be set (or reset) during this call (i.e. incremental setting of options is not possible). 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)
- 指定者:
setOptions
在接口中OptionHandler
- 覆盖:
setOptions
在类中Classifier
- 参数:
options
- the list of options as an array of strings- 抛出:
Exception
- if an option is not supported
-
getOptions
Gets the current option settings for the OptionHandler.- 指定者:
getOptions
在接口中OptionHandler
- 覆盖:
getOptions
在类中Classifier
- 返回:
- the list of current option settings as an array of strings
-
toString
returns a string representation of the classifier -
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 覆盖:
getRevision
在类中Classifier
- 返回:
- the revision
-
main
Main method for testing this class.- 参数:
argv
- should contain the command line arguments to the scheme (see Evaluation)
-