类 VotedPerceptron
java.lang.Object
weka.classifiers.Classifier
weka.classifiers.functions.VotedPerceptron
- 所有已实现的接口:
Serializable
,Cloneable
,CapabilitiesHandler
,OptionHandler
,RevisionHandler
,TechnicalInformationHandler
public class VotedPerceptron
extends Classifier
implements OptionHandler, TechnicalInformationHandler
Implementation of the voted perceptron algorithm by Freund and Schapire. Globally replaces all missing values, and transforms nominal attributes into binary ones.
For more information, see:
Y. Freund, R. E. Schapire: Large margin classification using the perceptron algorithm. In: 11th Annual Conference on Computational Learning Theory, New York, NY, 209-217, 1998. BibTeX:
For more information, see:
Y. Freund, R. E. Schapire: Large margin classification using the perceptron algorithm. In: 11th Annual Conference on Computational Learning Theory, New York, NY, 209-217, 1998. BibTeX:
@inproceedings{Freund1998, address = {New York, NY}, author = {Y. Freund and R. E. Schapire}, booktitle = {11th Annual Conference on Computational Learning Theory}, pages = {209-217}, publisher = {ACM Press}, title = {Large margin classification using the perceptron algorithm}, year = {1998} }Valid options are:
-I <int> The number of iterations to be performed. (default 1)
-E <double> The exponent for the polynomial kernel. (default 1)
-S <int> The seed for the random number generation. (default 1)
-M <int> The maximum number of alterations allowed. (default 10000)
- 版本:
- $Revision: 5523 $
- 作者:
- Eibe Frank (eibe@cs.waikato.ac.nz)
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
buildClassifier
(Instances insts) Builds the ensemble of perceptrons.double[]
Outputs the distribution for the given output.Returns the tip text for this propertyReturns default capabilities of the classifier.double
Get the value of exponent.int
getMaxK()
Get the value of maxK.int
Get the value of NumIterations.String[]
Gets the current settings of the classifier.Returns the revision string.int
getSeed()
Get the value of Seed.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 classifierReturns an enumeration describing the available options.static void
Main method.Returns the tip text for this propertyReturns the tip text for this propertyReturns the tip text for this propertyvoid
setExponent
(double v) Set the value of exponent.void
setMaxK
(int v) Set the value of maxK.void
setNumIterations
(int v) Set the value of NumIterations.void
setOptions
(String[] options) Parses a given list of options.void
setSeed
(int v) Set the value of Seed.toString()
Returns textual description of classifier.从类继承的方法 weka.classifiers.Classifier
classifyInstance, debugTipText, forName, getDebug, makeCopies, makeCopy, setDebug
-
构造器详细资料
-
VotedPerceptron
public VotedPerceptron()
-
-
方法详细资料
-
globalInfo
Returns a string describing this classifier- 返回:
- a description of the classifier 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
-
listOptions
Returns an enumeration describing the available options.- 指定者:
listOptions
在接口中OptionHandler
- 覆盖:
listOptions
在类中Classifier
- 返回:
- an enumeration of all the available options.
-
setOptions
Parses a given list of options. Valid options are:-I <int> The number of iterations to be performed. (default 1)
-E <double> The exponent for the polynomial kernel. (default 1)
-S <int> The seed for the random number generation. (default 1)
-M <int> The maximum number of alterations allowed. (default 10000)
- 指定者:
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 settings of the classifier.- 指定者:
getOptions
在接口中OptionHandler
- 覆盖:
getOptions
在类中Classifier
- 返回:
- an array of strings suitable for passing to setOptions
-
getCapabilities
Returns default capabilities of the classifier.- 指定者:
getCapabilities
在接口中CapabilitiesHandler
- 覆盖:
getCapabilities
在类中Classifier
- 返回:
- the capabilities of this classifier
- 另请参阅:
-
buildClassifier
Builds the ensemble of perceptrons.- 指定者:
buildClassifier
在类中Classifier
- 参数:
insts
- the data to train the classifier with- 抛出:
Exception
- if something goes wrong during building
-
distributionForInstance
Outputs the distribution for the given output. Pipes output of SVM through sigmoid function.- 覆盖:
distributionForInstance
在类中Classifier
- 参数:
inst
- the instance for which distribution is to be computed- 返回:
- the distribution
- 抛出:
Exception
- if something goes wrong
-
toString
Returns textual description of classifier. -
maxKTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getMaxK
public int getMaxK()Get the value of maxK.- 返回:
- Value of maxK.
-
setMaxK
public void setMaxK(int v) Set the value of maxK.- 参数:
v
- Value to assign to maxK.
-
numIterationsTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getNumIterations
public int getNumIterations()Get the value of NumIterations.- 返回:
- Value of NumIterations.
-
setNumIterations
public void setNumIterations(int v) Set the value of NumIterations.- 参数:
v
- Value to assign to NumIterations.
-
exponentTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getExponent
public double getExponent()Get the value of exponent.- 返回:
- Value of exponent.
-
setExponent
public void setExponent(double v) Set the value of exponent.- 参数:
v
- Value to assign to exponent.
-
seedTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getSeed
public int getSeed()Get the value of Seed.- 返回:
- Value of Seed.
-
setSeed
public void setSeed(int v) Set the value of Seed.- 参数:
v
- Value to assign to Seed.
-
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 覆盖:
getRevision
在类中Classifier
- 返回:
- the revision
-
main
Main method.- 参数:
argv
- the commandline options
-