|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.classifiers.AbstractClassifier
weka.classifiers.SingleClassifierEnhancer
weka.classifiers.lazy.LWL
weka.classifiers.lazy.LWLSynchro
public class LWLSynchro
Locally weighted learning. Uses an instance-based algorithm to assign instance weights which are then used by a specified WeightedInstancesHandler.
Can do classification (e.g. using naive Bayes) or regression (e.g. using linear regression).
For more info, see
Eibe Frank, Mark Hall, Bernhard Pfahringer: Locally Weighted Naive Bayes. In: 19th Conference in Uncertainty in Artificial Intelligence, 249-256, 2003.
C. Atkeson, A. Moore, S. Schaal (1996). Locally weighted learning. AI Review..
@inproceedings{Frank2003,
author = {Eibe Frank and Mark Hall and Bernhard Pfahringer},
booktitle = {19th Conference in Uncertainty in Artificial Intelligence},
pages = {249-256},
publisher = {Morgan Kaufmann},
title = {Locally Weighted Naive Bayes},
year = {2003}
}
@article{Atkeson1996,
author = {C. Atkeson and A. Moore and S. Schaal},
journal = {AI Review},
title = {Locally weighted learning},
year = {1996}
}
Valid options are:
-no-update Suppresses the update of the nearest neighbor search (nns) algorithm with the data that is to be classified. (default: nns gets updated).
-A The nearest neighbour search algorithm to use (default: weka.core.neighboursearch.LinearNNSearch).
-K <number of neighbours> Set the number of neighbours used to set the kernel bandwidth. (default all)
-U <number of weighting method> Set the weighting kernel shape to use. 0=Linear, 1=Epanechnikov, 2=Tricube, 3=Inverse, 4=Gaussian. (default 0 = Linear)
-D If set, classifier is run in debug mode and may output additional info to the console
-W Full name of base classifier. (default: weka.classifiers.functions.GaussianProcesses)
Options specific to classifier weka.classifiers.functions.GaussianProcesses:
-D If set, classifier is run in debug mode and may output additional info to the console
-L <double> Level of Gaussian Noise wrt transformed target. (default 1)
-N Whether to 0=normalize/1=standardize/2=neither. (default 0=normalize)
-K <classname and parameters> The Kernel to use. (default: weka.classifiers.functions.supportVector.PolyKernel)
Options specific to kernel weka.classifiers.functions.supportVector.PolyKernel:
-D Enables debugging output (if available) to be printed. (default: off)
-no-checks Turns off all checks - use with caution! (default: checks on)
-C <num> The size of the cache (a prime number), 0 for full cache and -1 to turn it off. (default: 250007)
-E <num> The Exponent to use. (default: 1.0)
-L Use lower-order terms. (default: no)Note: the
build(Instance) needs manual syncing with the
original WEKA classifier (distributionForInstance(Instance)
method).
LWL.distributionForInstance(Instance),
Serialized Form| Field Summary | |
|---|---|
protected boolean |
m_NoUpdate
whether to suppress the update of the nearest-neighbor search algorithm when making predictions. |
| Fields inherited from class weka.classifiers.lazy.LWL |
|---|
CONSTANT, EPANECHNIKOV, GAUSS, INVERSE, LINEAR, m_kNN, m_NNSearch, m_Train, m_UseAllK, m_WeightKernel, m_ZeroR, TRICUBE |
| Fields inherited from class weka.classifiers.SingleClassifierEnhancer |
|---|
m_Classifier |
| Fields inherited from class weka.classifiers.AbstractClassifier |
|---|
m_Debug |
| Constructor Summary | |
|---|---|
LWLSynchro()
Initializes the classifier. |
|
| Method Summary | |
|---|---|
protected void |
build(weka.core.Instance instance)
Builds the classifier. |
protected String |
defaultClassifierString()
Default classifier classname. |
double[] |
distributionForInstance(weka.core.Instance instance)
Calculates the class membership probabilities for the given test instance. |
boolean |
getNoUpdate()
Returns whether to suppress the update of the nearest-neighbor search algorithm when making predictions. |
String[] |
getOptions()
Gets the current settings of the classifier. |
String |
getRevision()
Returns the revision string. |
Enumeration |
listOptions()
Returns an enumeration describing the available options. |
static void |
main(String[] argv)
Main method for testing this class. |
String |
noUpdateTipText()
Returns the tip text for this property. |
void |
setNoUpdate(boolean value)
Sets whether to suppress updating the nearest-neighbor search algorithm when making predictions. |
void |
setOptions(String[] options)
Parses a given list of options. |
String |
toString()
Returns a description of this classifier. |
| Methods inherited from class weka.classifiers.lazy.LWL |
|---|
buildClassifier, enumerateMeasures, getCapabilities, getKNN, getMeasure, getNearestNeighbourSearchAlgorithm, getTechnicalInformation, getWeightingKernel, globalInfo, KNNTipText, nearestNeighbourSearchAlgorithmTipText, setKNN, setNearestNeighbourSearchAlgorithm, setWeightingKernel, updateClassifier, weightingKernelTipText |
| Methods inherited from class weka.classifiers.SingleClassifierEnhancer |
|---|
classifierTipText, getClassifier, getClassifierSpec, setClassifier |
| Methods inherited from class weka.classifiers.AbstractClassifier |
|---|
classifyInstance, debugTipText, forName, getDebug, makeCopies, makeCopy, runClassifier, setDebug |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected boolean m_NoUpdate
| Constructor Detail |
|---|
public LWLSynchro()
| Method Detail |
|---|
protected String defaultClassifierString()
defaultClassifierString in class weka.classifiers.lazy.LWLpublic Enumeration listOptions()
listOptions in interface weka.core.OptionHandlerlistOptions in class weka.classifiers.lazy.LWL
public void setOptions(String[] options)
throws Exception
-no-update Suppresses the update of the nearest neighbor search (nns) algorithm with the data that is to be classified. (default: nns gets updated).
-A The nearest neighbour search algorithm to use (default: weka.core.neighboursearch.LinearNNSearch).
-K <number of neighbours> Set the number of neighbours used to set the kernel bandwidth. (default all)
-U <number of weighting method> Set the weighting kernel shape to use. 0=Linear, 1=Epanechnikov, 2=Tricube, 3=Inverse, 4=Gaussian. (default 0 = Linear)
-D If set, classifier is run in debug mode and may output additional info to the console
-W Full name of base classifier. (default: weka.classifiers.functions.GaussianProcesses)
Options specific to classifier weka.classifiers.functions.GaussianProcesses:
-D If set, classifier is run in debug mode and may output additional info to the console
-L <double> Level of Gaussian Noise wrt transformed target. (default 1)
-N Whether to 0=normalize/1=standardize/2=neither. (default 0=normalize)
-K <classname and parameters> The Kernel to use. (default: weka.classifiers.functions.supportVector.PolyKernel)
Options specific to kernel weka.classifiers.functions.supportVector.PolyKernel:
-D Enables debugging output (if available) to be printed. (default: off)
-no-checks Turns off all checks - use with caution! (default: checks on)
-C <num> The size of the cache (a prime number), 0 for full cache and -1 to turn it off. (default: 250007)
-E <num> The Exponent to use. (default: 1.0)
-L Use lower-order terms. (default: no)
setOptions in interface weka.core.OptionHandlersetOptions in class weka.classifiers.lazy.LWLoptions - the list of options as an array of strings
Exception - if an option is not supportedpublic String[] getOptions()
getOptions in interface weka.core.OptionHandlergetOptions in class weka.classifiers.lazy.LWLpublic String noUpdateTipText()
public void setNoUpdate(boolean value)
value - if true then no update happens.public boolean getNoUpdate()
protected void build(weka.core.Instance instance)
throws Exception
instance - the instance to make prediction for
Exception - if build failsLWL.distributionForInstance(Instance)
public double[] distributionForInstance(weka.core.Instance instance)
throws Exception
distributionForInstance in interface weka.classifiers.ClassifierdistributionForInstance in class weka.classifiers.lazy.LWLinstance - the instance to be classified
Exception - if distribution can't be computed successfullypublic String toString()
toString in class weka.classifiers.lazy.LWLpublic String getRevision()
getRevision in interface weka.core.RevisionHandlergetRevision in class weka.classifiers.lazy.LWLpublic static void main(String[] argv)
argv - the options
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||