weka.classifiers.meta
Class PeakTransformed

java.lang.Object
  extended by weka.classifiers.AbstractClassifier
      extended by weka.classifiers.SingleClassifierEnhancer
          extended by weka.classifiers.meta.PeakTransformed
All Implemented Interfaces:
Serializable, Cloneable, weka.classifiers.Classifier, weka.core.CapabilitiesHandler, weka.core.OptionHandler, weka.core.RevisionHandler, weka.core.WeightedInstancesHandler

public class PeakTransformed
extends weka.classifiers.SingleClassifierEnhancer
implements weka.core.WeightedInstancesHandler

Uses the maximum peak in the instances.

Valid options are:

 -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.rules.ZeroR)
 Options specific to classifier weka.classifiers.rules.ZeroR:
 
 -D
  If set, classifier is run in debug mode and
  may output additional info to the console

Version:
$Revision: 4584 $
Author:
Dale
See Also:
Serialized Form

Field Summary
protected  weka.core.Instances m_Header
          the header information of the transformed data.
 
Fields inherited from class weka.classifiers.SingleClassifierEnhancer
m_Classifier
 
Fields inherited from class weka.classifiers.AbstractClassifier
m_Debug
 
Constructor Summary
PeakTransformed()
           
 
Method Summary
 void buildClassifier(weka.core.Instances ins)
          Builds the classifier.
 double classifyInstance(weka.core.Instance inst)
          Returns the prediction.
 String getRevision()
           
 String globalInfo()
          Returns a string describing classifier.
static void main(String[] argv)
          Main method for running this class.
 String toString()
          Returns description of classifier.
protected  weka.core.Instance transformInstance(weka.core.Instance in)
          Just finds the maximum peak.
 
Methods inherited from class weka.classifiers.SingleClassifierEnhancer
classifierTipText, defaultClassifierString, getCapabilities, getClassifier, getClassifierSpec, getOptions, listOptions, setClassifier, setOptions
 
Methods inherited from class weka.classifiers.AbstractClassifier
debugTipText, distributionForInstance, 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

m_Header

protected weka.core.Instances m_Header
the header information of the transformed data.

Constructor Detail

PeakTransformed

public PeakTransformed()
Method Detail

globalInfo

public String globalInfo()
Returns a string describing classifier.

Returns:
a description suitable for displaying in the explorer/experimenter gui

transformInstance

protected weka.core.Instance transformInstance(weka.core.Instance in)
Just finds the maximum peak.

Parameters:
in - the instance to analyze
Returns:
the new instance

buildClassifier

public void buildClassifier(weka.core.Instances ins)
                     throws Exception
Builds the classifier.

Specified by:
buildClassifier in interface weka.classifiers.Classifier
Parameters:
ins - the training data
Throws:
Exception - if training fails

classifyInstance

public double classifyInstance(weka.core.Instance inst)
                        throws Exception
Returns the prediction.

Specified by:
classifyInstance in interface weka.classifiers.Classifier
Overrides:
classifyInstance in class weka.classifiers.AbstractClassifier
Parameters:
inst - the instance to predict
Returns:
the prediction
Throws:
Exception - if prediction fails

toString

public String toString()
Returns description of classifier.

Overrides:
toString in class Object
Returns:
the model

getRevision

public String getRevision()
Specified by:
getRevision in interface weka.core.RevisionHandler
Overrides:
getRevision in class weka.classifiers.AbstractClassifier

main

public static void main(String[] argv)
Main method for running this class.

Parameters:
argv - the options


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