probabilityMachine.vpm
Class VPMBartsRMI

java.lang.Object
  |
  +--weka.classifiers.Classifier
        |
        +--probabilityMachine.VennProbabilityClassifier
              |
              +--probabilityMachine.vpm.VPMBartsRMI
All Implemented Interfaces:
java.lang.Cloneable, OptionHandler, java.io.Serializable

public class VPMBartsRMI
extends VennProbabilityClassifier
implements OptionHandler

The VPM version of the BartsRMI algorithm. (Only for use on Ovarian Cancer data)

Version:
$Revision: 1.0 $
Author:
David Lindsay (davidl@cs.rhul.ac.uk)
See Also:
Serialized Form

Constructor Summary
VPMBartsRMI()
          The amazing VPMBartsRMI classifier
VPMBartsRMI(double rmit, int vennt)
          The amazing VPMBartsRMI classifier, used to show how to adapt a classifer to the VPM meta learning framework!
 
Method Summary
 void buildClassifier(Instances instances)
          Generates the classifier.
 double calculateRMI(Instance instance)
          Calculates the Risk of Malignancy Index find ref ? (Jacobs et al)
 int getNumberVennTypes()
          Gets the number of Venn probability types used!
 java.lang.String[] getOptions()
          Gets the current settings of VPM.
 double getRMIThreshold()
          Gets the currently set RMI threshold
 java.util.Enumeration listOptions()
          Returns an enumeration describing the available options
static void main(java.lang.String[] argv)
          Main method for testing this class.
 void setNumberVennTypes(int vennt)
          Sets the number of Venn probability types used!
 void setOptions(java.lang.String[] options)
          Parses a given list of options.
 void setRMIThreshold(double rmit)
          Sets the RMI threshold
 java.lang.String toString()
          Returns a description of this classifier.
 Matrix vennProbsForInstance(Instance instance)
          Returns the Venn probability matrix for a given test instance.
 
Methods inherited from class probabilityMachine.VennProbabilityClassifier
classifyInstance, computeRowOfVPMMatrix, distributionForInstance, printArray, printArray, returnDistribution, returnUpperAndLowerProbability
 
Methods inherited from class weka.classifiers.Classifier
debugTipText, forName, getDebug, makeCopies, setDebug
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VPMBartsRMI

public VPMBartsRMI(double rmit,
                   int vennt)
The amazing VPMBartsRMI classifier, used to show how to adapt a classifer to the VPM meta learning framework!

The options for this wonderful algorithm are as follows:
-r threshold
Set the threshold for the RMI (default: 250)

-y num Venn types
Sets the number of types used for the VPM

Parameters:
rmit - the RMI threshold
vennt - the number of Venn probability types used

VPMBartsRMI

public VPMBartsRMI()
The amazing VPMBartsRMI classifier

Method Detail

setRMIThreshold

public void setRMIThreshold(double rmit)
Sets the RMI threshold


getRMIThreshold

public double getRMIThreshold()
Gets the currently set RMI threshold


setNumberVennTypes

public void setNumberVennTypes(int vennt)
Sets the number of Venn probability types used!


getNumberVennTypes

public int getNumberVennTypes()
Gets the number of Venn probability types used!


buildClassifier

public void buildClassifier(Instances instances)
                     throws java.lang.Exception
Generates the classifier.

Specified by:
buildClassifier in class Classifier
Parameters:
instances - set of instances serving as training data
Throws:
java.lang.Exception - if the classifier has not been generated successfully

listOptions

public java.util.Enumeration listOptions()
Returns an enumeration describing the available options

Specified by:
listOptions in interface OptionHandler
Overrides:
listOptions in class Classifier
Returns:
an enumeration of all the available options

setOptions

public void setOptions(java.lang.String[] options)
                throws java.lang.Exception
Parses a given list of options. Valid options are:

-R threshold
Set the threshold for the RMI (default: 250)

-V num Venn types
Sets the number of types used for the VPM

Specified by:
setOptions in interface OptionHandler
Overrides:
setOptions in class Classifier
Parameters:
options - the list of options as an array of strings
Throws:
java.lang.Exception - if an option is not supported

getOptions

public java.lang.String[] getOptions()
Gets the current settings of VPM.

Specified by:
getOptions in interface OptionHandler
Overrides:
getOptions in class Classifier
Returns:
an array of strings suitable for passing to setOptions()

calculateRMI

public double calculateRMI(Instance instance)
Calculates the Risk of Malignancy Index find ref ? (Jacobs et al)


vennProbsForInstance

public Matrix vennProbsForInstance(Instance instance)
                            throws java.lang.Exception
Returns the Venn probability matrix for a given test instance.

Specified by:
vennProbsForInstance in class VennProbabilityClassifier
Parameters:
instance - the instance to be classified
Returns:
the Venn probability matrix
Throws:
java.lang.Exception - no training instances

toString

public java.lang.String toString()
Returns a description of this classifier.

Overrides:
toString in class java.lang.Object
Returns:
a description of this classifier as a string.

main

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

Parameters:
argv - should contain command line arguments for evaluation (see Evaluation).


Copyright (c) 2003 David Lindsay, Computer Learning Research Centre, Dept. Computer Science, Royal Holloway, University of London