类 LeastMedSq
java.lang.Object
weka.classifiers.Classifier
weka.classifiers.functions.LeastMedSq
- 所有已实现的接口:
Serializable
,Cloneable
,CapabilitiesHandler
,OptionHandler
,RevisionHandler
,TechnicalInformationHandler
Implements a least median sqaured linear regression utilising the existing weka LinearRegression class to form predictions.
Least squared regression functions are generated from random subsamples of the data. The least squared regression with the lowest meadian squared error is chosen as the final model.
The basis of the algorithm is
Peter J. Rousseeuw, Annick M. Leroy (1987). Robust regression and outlier detection. . BibTeX:
Least squared regression functions are generated from random subsamples of the data. The least squared regression with the lowest meadian squared error is chosen as the final model.
The basis of the algorithm is
Peter J. Rousseeuw, Annick M. Leroy (1987). Robust regression and outlier detection. . BibTeX:
@book{Rousseeuw1987, author = {Peter J. Rousseeuw and Annick M. Leroy}, title = {Robust regression and outlier detection}, year = {1987} }Valid options are:
-S <sample size> Set sample size (default: 4)
-G <seed> Set the seed used to generate samples (default: 0)
-D Produce debugging output (default no debugging output)
- 版本:
- $Revision: 5523 $
- 作者:
- Tony Voyle (tv6@waikato.ac.nz)
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
buildClassifier
(Instances data) Build lms regressiondouble
classifyInstance
(Instance instance) Classify a given instance using the best generated LinearRegression Classifier.static int
combinations
(int n, int r) Produces the combination nCrReturns default capabilities of the classifier.boolean
getDebug()
Returns whether or not debugging output shouild be printedString[]
Gets the current option settings for the OptionHandler.long
get the seed for the random number generatorReturns the revision string.int
gets number of samplesReturns 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 of all the available options..static void
generate a Linear regression predictor for testingReturns the tip text for this propertyReturns the tip text for this propertyvoid
setDebug
(boolean debug) sets whether or not debugging output shouild be printedvoid
setOptions
(String[] options) Sets the OptionHandler's options using the given list.void
setRandomSeed
(long randomseed) Set the seed for the random number generatorvoid
setSampleSize
(int samplesize) sets number of samplestoString()
Returns a string representing the best LinearRegression classifier found.从类继承的方法 weka.classifiers.Classifier
debugTipText, distributionForInstance, forName, makeCopies, makeCopy
-
构造器详细资料
-
LeastMedSq
public LeastMedSq()
-
-
方法详细资料
-
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
-
getCapabilities
Returns default capabilities of the classifier.- 指定者:
getCapabilities
在接口中CapabilitiesHandler
- 覆盖:
getCapabilities
在类中Classifier
- 返回:
- the capabilities of this classifier
- 另请参阅:
-
buildClassifier
Build lms regression- 指定者:
buildClassifier
在类中Classifier
- 参数:
data
- training data- 抛出:
Exception
- if an error occurs
-
classifyInstance
Classify a given instance using the best generated LinearRegression Classifier.- 覆盖:
classifyInstance
在类中Classifier
- 参数:
instance
- instance to be classified- 返回:
- class value
- 抛出:
Exception
- if an error occurs
-
toString
Returns a string representing the best LinearRegression classifier found. -
sampleSizeTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setSampleSize
public void setSampleSize(int samplesize) sets number of samples- 参数:
samplesize
- value
-
getSampleSize
public int getSampleSize()gets number of samples- 返回:
- value
-
randomSeedTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setRandomSeed
public void setRandomSeed(long randomseed) Set the seed for the random number generator- 参数:
randomseed
- the seed
-
getRandomSeed
public long getRandomSeed()get the seed for the random number generator- 返回:
- the seed value
-
setDebug
public void setDebug(boolean debug) sets whether or not debugging output shouild be printed- 覆盖:
setDebug
在类中Classifier
- 参数:
debug
- true if debugging output selected
-
getDebug
public boolean getDebug()Returns whether or not debugging output shouild be printed- 覆盖:
getDebug
在类中Classifier
- 返回:
- true if debuging output selected
-
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:-S <sample size> Set sample size (default: 4)
-G <seed> Set the seed used to generate samples (default: 0)
-D Produce debugging output (default no debugging output)
- 指定者:
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
-
combinations
Produces the combination nCr- 参数:
n
-r
-- 返回:
- the combination
- 抛出:
Exception
- if r is greater than n
-
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 覆盖:
getRevision
在类中Classifier
- 返回:
- the revision
-
main
generate a Linear regression predictor for testing- 参数:
argv
- options
-