Package weka.classifiers.lazy
Class LWLIntervalEstimator
- java.lang.Object
-
- weka.classifiers.AbstractClassifier
-
- weka.classifiers.SingleClassifierEnhancer
-
- weka.classifiers.lazy.LWL
-
- weka.classifiers.lazy.LWLSynchro
-
- weka.classifiers.lazy.LWLIntervalEstimator
-
- All Implemented Interfaces:
Serializable
,Cloneable
,weka.classifiers.Classifier
,weka.classifiers.IntervalEstimator
,ThreadSafeClassifier
,weka.classifiers.UpdateableClassifier
,weka.core.BatchPredictor
,weka.core.CapabilitiesHandler
,weka.core.CapabilitiesIgnorer
,weka.core.CommandlineRunnable
,weka.core.OptionHandler
,weka.core.RevisionHandler
,weka.core.TechnicalInformationHandler
,weka.core.WeightedInstancesHandler
public class LWLIntervalEstimator extends LWLSynchro implements weka.classifiers.IntervalEstimator
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..
BibTeX:@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:
-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.trees.DecisionStump)
Options specific to classifier weka.classifiers.trees.DecisionStump:
-D If set, classifier is run in debug mode and may output additional info to the console
- Version:
- $Revision$
- Author:
- Len Trigg ([email protected]), Eibe Frank ([email protected]), Ashraf M. Kibriya (amk14[at-the-rate]cs[dot]waikato[dot]ac[dot]nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class weka.classifiers.lazy.LWLSynchro
m_NoUpdate
-
-
Constructor Summary
Constructors Constructor Description LWLIntervalEstimator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getRevision()
Returns the revision string.static void
main(String[] args)
Main method for executing this classifier.double[][]
predictIntervals(weka.core.Instance inst, double confidenceLevel)
Returns an N * 2 array, where N is the number of prediction intervals.void
setClassifier(weka.classifiers.Classifier value)
Set the base learner, which must implement IntervalEstimator.-
Methods inherited from class weka.classifiers.lazy.LWLSynchro
build, defaultClassifierString, distributionForInstance, getNoUpdate, getOptions, listOptions, noUpdateTipText, setNoUpdate, setOptions, toString
-
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, defaultClassifierOptions, getClassifier, getClassifierSpec, postExecution, preExecution
-
Methods inherited from class weka.classifiers.AbstractClassifier
batchSizeTipText, classifyInstance, debugTipText, distributionsForInstances, doNotCheckCapabilitiesTipText, forName, getBatchSize, getDebug, getDoNotCheckCapabilities, getNumDecimalPlaces, implementsMoreEfficientBatchPrediction, makeCopies, makeCopy, numDecimalPlacesTipText, run, runClassifier, setBatchSize, setDebug, setDoNotCheckCapabilities, setNumDecimalPlaces
-
-
-
-
Method Detail
-
setClassifier
public void setClassifier(weka.classifiers.Classifier value)
Set the base learner, which must implement IntervalEstimator.- Overrides:
setClassifier
in classweka.classifiers.SingleClassifierEnhancer
- Parameters:
value
- the classifier to use.- See Also:
IntervalEstimator
-
predictIntervals
public double[][] predictIntervals(weka.core.Instance inst, double confidenceLevel) throws Exception
Returns an N * 2 array, where N is the number of prediction intervals. In each row, the first element contains the lower boundary of the corresponding prediction interval and the second element the upper boundary.- Specified by:
predictIntervals
in interfaceweka.classifiers.IntervalEstimator
- Parameters:
inst
- the instance to make the prediction for.confidenceLevel
- the percentage of cases that the interval should cover.- Returns:
- an array of prediction intervals
- Throws:
Exception
- if the intervals can't be computed
-
getRevision
public String getRevision()
Returns the revision string.- Specified by:
getRevision
in interfaceweka.core.RevisionHandler
- Overrides:
getRevision
in classLWLSynchro
- Returns:
- the revision
-
main
public static void main(String[] args)
Main method for executing this classifier.- Parameters:
args
- the options, use -h to display all
-
-