Package classifier
Class AbstractWekaClassifier
java.lang.Object
classifier.Classifier
classifier.AbstractWekaClassifier
- Direct Known Subclasses:
 WekaClassifier,WekaRandomForest,WekaRegressionTree
- 
Nested Class Summary
Nested classes/interfaces inherited from class classifier.Classifier
Classifier.ProbabilityType - 
Field Summary
Fields inherited from class classifier.Classifier
minimumProbability - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionWill get called AFTER classifier training to get classifier specific parameters.Jama.MatrixGet a matrix of log likelihoods from the most recent call to RunClassification(Matrix )Jama.MatrixGet a matrix of probabilities from the most recent call to RunClassification(Matrix )Get the type of probability returned by a classifier.weka.classifiers.AbstractClassifierbooleanintrunClassification(double[] params) Run the classification on single parameter value.int[]runClassification(double[][] params) Run classification on multiple parameter values.int[]runClassification(Jama.Matrix data) booleansetClassifierParams(ClassifierParams classifierParams) Will be called to load stored parameters into a classifier.voidsetWekaClassifier(weka.classifiers.AbstractClassifier wekaClassifier) booleanshowParamsDialog(Window parent) trainClassification(Jama.Matrix matrix, int[] group) /** Train the classifier.Methods inherited from class classifier.Classifier
getClassifierName, getLogLikelihoods1, getLogLikelihoods2, getMinimumProbability, getProbabilities1, getProbabilities2, setMinimumProbability, toString, trainClassification 
- 
Constructor Details
- 
AbstractWekaClassifier
public AbstractWekaClassifier() 
 - 
 - 
Method Details
- 
getWekaClassifier
public weka.classifiers.AbstractClassifier getWekaClassifier()- Returns:
 - the wekaClassifier
 
 - 
setWekaClassifier
public void setWekaClassifier(weka.classifiers.AbstractClassifier wekaClassifier) - Parameters:
 wekaClassifier- the wekaClassifier to set
 - 
getLogLikelihoodsM
public Jama.Matrix getLogLikelihoodsM()Description copied from class:ClassifierGet a matrix of log likelihoods from the most recent call to RunClassification(Matrix )This version will return a matrix of data, which should be from a set of classifications.
- Specified by:
 getLogLikelihoodsMin classClassifier- Returns:
 - log likelihoods matrix.
 
 - 
getProbabilitiesM
public Jama.Matrix getProbabilitiesM()Description copied from class:ClassifierGet a matrix of probabilities from the most recent call to RunClassification(Matrix )This version will return a matrix of data, which should be from a set of classifications.
- Specified by:
 getProbabilitiesMin classClassifier- Returns:
 - probabilities matrix.
 
 - 
getProbabilityType
Description copied from class:ClassifierGet the type of probability returned by a classifier. this will either be NORMALISED, ABSOLUTE or UNAVAILABLE in which case the classifier should still return data (to stop things crashing) but should return arrays / Matrixes with zeros in all columns except the selected item, which should be 1.- Specified by:
 getProbabilityTypein classClassifier- Returns:
 - type of probability returned.
 
 - 
runClassification
public int[] runClassification(Jama.Matrix data) - Specified by:
 runClassificationin classClassifier
 - 
runClassification
public int runClassification(double[] params) Description copied from class:ClassifierRun the classification on single parameter value.Return true if the classification completed OK, false otherwise. The classification results can be obtained through calls to getClassLikelyhoods() and getBestSpeciesBet();
- Overrides:
 runClassificationin classClassifier- Parameters:
 params- array of input parameters- Returns:
 - true if classification completed successfully.
 
 - 
runClassification
public int[] runClassification(double[][] params) Description copied from class:ClassifierRun classification on multiple parameter values.- Overrides:
 runClassificationin classClassifier- Parameters:
 params- array of input parameters- Returns:
 - true if completed successfully
 
 - 
getClassifierParams
Description copied from class:ClassifierWill get called AFTER classifier training to get classifier specific parameters.- Specified by:
 getClassifierParamsin classClassifier- Returns:
 - classifier specific parameters.
 
 - 
setClassifierParams
Description copied from class:ClassifierWill be called to load stored parameters into a classifier.- Specified by:
 setClassifierParamsin classClassifier- Parameters:
 classifierParams- classifier parameters.- Returns:
 - Return true if parameters loaded OK. Reasons for not loading include the classifier being incompatible with the classifier parameters or the parameters not being present (e.t. null matrixes)
 
 - 
trainClassification
Description copied from class:Classifier/** Train the classifier.- Specified by:
 trainClassificationin classClassifier- Parameters:
 matrix- matrix of training data (each row one training point, each col one parametergroup- truth- Returns:
 - null if OK or error string
 
 - 
hasParamsDialog
public boolean hasParamsDialog()- Overrides:
 hasParamsDialogin classClassifier
 - 
showParamsDialog
- Overrides:
 showParamsDialogin classClassifier
 
 -