|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weka.classifiers.Classifier | +--confidenceMachine.ConfidenceClassifier
Abstract classification model that produces (for each test instance) a valid confidence estimation of the membership in each class (ie. Used in Transductive/Inductive/Mondrian Confidence Machines).
Constructor Summary | |
ConfidenceClassifier()
|
Method Summary | |
static double[] |
calculateConfidenceAndCredibility(double[] pValues)
Calculates the pseudo-probabilistic measures using the p-values calculated for an instance like so: 'Confidence' = 1-2nd largest p-value (percentage) 'Credibility' = = Largest p-value (percentage) |
static double |
calculatePValue(double[] alphaValues,
double alphaNew)
Calculate the p-value using the formula described by Vovk et al. |
static double |
calculatePValue(double[] alphaValues,
double alphaNew,
double seed)
Calculate the randomised p-value using the formula manipulating the strangeness values for training and test example described by Vovk et al. |
double |
classifyInstance(Instance instance)
Classifies the given test instance. |
abstract double[] |
pValuesForInstance(Instance instance)
Predicts the confidence p-values for class memberships a given instance. |
static int[] |
returnRegionPrediction(double[] pValues,
double sigLevel)
Returns a region prediction (subset of possible classes) that are valid at a given significance level. |
Methods inherited from class weka.classifiers.Classifier |
buildClassifier, debugTipText, distributionForInstance, forName, getDebug, getOptions, listOptions, makeCopies, setDebug, setOptions |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ConfidenceClassifier()
Method Detail |
public abstract double[] pValuesForInstance(Instance instance) throws java.lang.Exception
instance
- the instance to be classified
java.lang.Exception
- if distribution could not be
computed successfullypublic double classifyInstance(Instance instance) throws java.lang.Exception
classifyInstance
in class Classifier
instance
- the instance to be classified
java.lang.Exception
- if an error occurred during the predictionpublic static double[] calculateConfidenceAndCredibility(double[] pValues)
pValues
- the p-values of an instance to be classified
public static int[] returnRegionPrediction(double[] pValues, double sigLevel)
pValues
- the p-values of an instance to be classifiedsigLevel
- the significance level to construct the region prediction
public static double calculatePValue(double[] alphaValues, double alphaNew)
alphaValues
- the alpha 'strangeness' values of the training examplesalphaNew
- the alpha 'strangeness' value of new test example
public static double calculatePValue(double[] alphaValues, double alphaNew, double seed)
alphaValues
- the alpha 'strangeness' values of the training examplesalphaNew
- the alpha 'strangeness' value of new test exampleseed
- the random number used to break ties in equal alpha values
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2003 David Lindsay, Computer Learning Research Centre, Dept. Computer Science, Royal Holloway, University of London