|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weka.classifiers.Classifier | +--probabilityMachine.VennProbabilityClassifier | +--probabilityMachine.VPMMDLEntropyTypeDistMetaLearner
The first implementation of a VPM Distribution Classifier Meta Learner. Uses Gaussians to model types!
Constructor Summary | |
VPMMDLEntropyTypeDistMetaLearner()
The amazing VPMBartsRMI classifier |
|
VPMMDLEntropyTypeDistMetaLearner(int vennt)
The amazing VPMMDLEntropyTypeDistMetaLearner classifier, used to show how to adapt a classifer to the VPM meta learning framework! |
Method Summary | |
void |
buildClassifier(Instances instances)
Generates the classifier. |
java.lang.String[] |
calculateTypesForExamples(Instances train,
Instances classPreds)
This function will calculate the types for each example using the Gaussians calculated above. |
java.lang.String |
createTypeDetailString(int[] closestGaussianVennType,
int[] typeDetails,
int classAssigned)
Output type membership details |
boolean |
getBetterMDL()
Returns if better MDL is used. |
boolean |
getKononekoMDL()
Returns if Kononeko MDL is used. |
java.lang.String[] |
getOptions()
Gets the current settings of VPM. |
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options |
static void |
main(java.lang.String[] argv)
Main method for testing this class. |
java.lang.String |
printArray(int[] array)
Debugging function |
java.lang.String |
printArray(java.lang.String[] array)
Debugging function |
void |
setBetterMDL(boolean better)
Set better MDL to be used. |
void |
setKononekoMDL(boolean kon)
Set Kononeko MDL to be used. |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
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, 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 |
public VPMMDLEntropyTypeDistMetaLearner(int vennt)
The options for this wonderful algorithm are as follows:
-E use better MDL
Uses better MDL criterion to find splits.
-W classifier name
Specify the name of the distribution classifier name that you wish to specify
-K Konenkos MDL criterion is used
vennt
- the number of Venn probability types usedpublic VPMMDLEntropyTypeDistMetaLearner()
Method Detail |
public void setBetterMDL(boolean better)
public boolean getBetterMDL()
public void setKononekoMDL(boolean kon)
public boolean getKononekoMDL()
public void buildClassifier(Instances instances) throws java.lang.Exception
buildClassifier
in class Classifier
instances
- set of instances serving as training data
java.lang.Exception
- if the classifier has not been generated successfullypublic java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
listOptions
in class Classifier
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-y num Venn types
Sets the number of types used for the VPM
-E use better MDL
Uses better MDL criterion to find splits.
-W classifier name
Specify the name of the distribution classifier name that you wish to specify
-K Konenkos MDL criterion is used
setOptions
in interface OptionHandler
setOptions
in class Classifier
options
- the list of options as an array of strings
java.lang.Exception
- if an option is not supportedpublic java.lang.String[] getOptions()
getOptions
in interface OptionHandler
getOptions
in class Classifier
public java.lang.String[] calculateTypesForExamples(Instances train, Instances classPreds) throws java.lang.Exception
train
- this is the training data
java.lang.Exception
public Matrix vennProbsForInstance(Instance instance) throws java.lang.Exception
vennProbsForInstance
in class VennProbabilityClassifier
instance
- the instance to be classified
java.lang.Exception
- no training instancespublic java.lang.String printArray(java.lang.String[] array)
public java.lang.String printArray(int[] array)
printArray
in class VennProbabilityClassifier
public java.lang.String createTypeDetailString(int[] closestGaussianVennType, int[] typeDetails, int classAssigned)
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] argv)
argv
- should contain command line arguments for evaluation
(see Evaluation).
|
|||||||||
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