confidenceMachine.tcm
Class TCMBartsRMI

java.lang.Object
  |
  +--weka.classifiers.Classifier
        |
        +--confidenceMachine.ConfidenceClassifier
              |
              +--confidenceMachine.tcm.TCMBartsRMI
All Implemented Interfaces:
java.lang.Cloneable, OptionHandler, java.io.Serializable

public class TCMBartsRMI
extends ConfidenceClassifier
implements OptionHandler

The TCM Barts RMI algorithm

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

Constructor Summary
TCMBartsRMI()
          The amazing TCM Barts RMI classifier
TCMBartsRMI(double rmit)
          The amazing TCM Barts RMI classifier
 
Method Summary
 void buildClassifier(Instances instances)
          Generates the classifier.
 double calculateRMI(Instance instance)
          Calculates the Risk of Malignancy Index find ref ? (Jacobs et al)
 java.lang.String[] getOptions()
          Gets the current settings of TCM.
 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.
 double[] pValuesForInstance(Instance instance)
          Returns the p-values for a given test instance.
 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.
 
Methods inherited from class confidenceMachine.ConfidenceClassifier
calculateConfidenceAndCredibility, calculatePValue, calculatePValue, classifyInstance, returnRegionPrediction
 
Methods inherited from class weka.classifiers.Classifier
debugTipText, distributionForInstance, forName, getDebug, makeCopies, setDebug
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TCMBartsRMI

public TCMBartsRMI(double rmit)
The amazing TCM Barts RMI classifier

Parameters:
rmit - the RMI threshold used

TCMBartsRMI

public TCMBartsRMI()
The amazing TCM Barts RMI classifier

Method Detail

setRMIThreshold

public void setRMIThreshold(double rmit)
Sets the RMI threshold


getRMIThreshold

public double getRMIThreshold()
Gets the currently set RMI threshold


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)

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 TCM.

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)


pValuesForInstance

public double[] pValuesForInstance(Instance instance)
                            throws java.lang.Exception
Returns the p-values for a given test instance.

Specified by:
pValuesForInstance in class ConfidenceClassifier
Parameters:
instance - the instance to be classified
Returns:
the p-values for each class
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