weka.classifiers.lazy
Class LWLIntervalEstimator

java.lang.Object
  extended by weka.classifiers.AbstractClassifier
      extended by weka.classifiers.SingleClassifierEnhancer
          extended by weka.classifiers.lazy.LWL
              extended by weka.classifiers.lazy.LWLSynchro
                  extended by weka.classifiers.lazy.LWLIntervalEstimator
All Implemented Interfaces:
Serializable, Cloneable, weka.classifiers.Classifier, weka.classifiers.IntervalEstimator, weka.classifiers.UpdateableClassifier, weka.core.CapabilitiesHandler, 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: 4521 $
Author:
Len Trigg (trigg@cs.waikato.ac.nz), Eibe Frank (eibe@cs.waikato.ac.nz), 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
 
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
LWLIntervalEstimator()
           
 
Method Summary
 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, getClassifier, getClassifierSpec
 
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
 

Constructor Detail

LWLIntervalEstimator

public LWLIntervalEstimator()
Method Detail

setClassifier

public void setClassifier(weka.classifiers.Classifier value)
Set the base learner, which must implement IntervalEstimator.

Overrides:
setClassifier in class weka.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 interface weka.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 interface weka.core.RevisionHandler
Overrides:
getRevision in class LWLSynchro
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


Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.