public class TLDSimple extends RandomizableClassifier implements OptionHandler, MultiInstanceCapabilitiesHandler, TechnicalInformationHandler
@mastersthesis{Xu2003, address = {Hamilton, NZ}, author = {Xin Xu}, note = {0657.594}, school = {University of Waikato}, title = {Statistical learning in multiple instance problem}, year = {2003} }Valid options are:
-C Set whether or not use empirical log-odds cut-off instead of 0
-R <numOfRuns> Set the number of multiple runs needed for searching the MLE.
-S <num> Random number seed. (default 1)
-D If set, classifier is run in debug mode and may output additional info to the console
Modifier and Type | Field and Description |
---|---|
static double |
ZERO
The very small number representing zero
|
Constructor and Description |
---|
TLDSimple() |
Modifier and Type | Method and Description |
---|---|
void |
buildClassifier(Instances exs)
Generates a classifier.
|
double |
classifyInstance(Instance ex)
Classifies the given test instance.
|
double[] |
distributionForInstance(Instance ex)
Computes the distribution for a given exemplar
|
Capabilities |
getCapabilities()
Returns default capabilities of the classifier.
|
Capabilities |
getMultiInstanceCapabilities()
Returns the capabilities of this multi-instance classifier for the
relational data.
|
int |
getNumRuns()
Returns the number of runs to perform.
|
java.lang.String[] |
getOptions()
Gets the current settings of the Classifier.
|
java.lang.String |
getRevision()
Returns the revision string.
|
TechnicalInformation |
getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing
detailed information about the technical background of this class,
e.g., paper reference or book this class is based on.
|
boolean |
getUsingCutOff()
Returns whether an empirical cutoff is used
|
java.lang.String |
globalInfo()
Returns a string describing this filter
|
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options
|
static void |
main(java.lang.String[] args)
Main method for testing.
|
java.lang.String |
numRunsTipText()
Returns the tip text for this property
|
void |
setNumRuns(int numRuns)
Sets the number of runs to perform.
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
void |
setUsingCutOff(boolean cutOff)
Sets whether to use an empirical cutoff.
|
java.lang.String |
toString()
Gets a string describing the classifier.
|
java.lang.String |
usingCutOffTipText()
Returns the tip text for this property
|
getSeed, seedTipText, setSeed
debugTipText, forName, getDebug, makeCopies, makeCopy, setDebug
public java.lang.String globalInfo()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation
in interface TechnicalInformationHandler
public Capabilities getCapabilities()
getCapabilities
in interface CapabilitiesHandler
getCapabilities
in class Classifier
Capabilities
public Capabilities getMultiInstanceCapabilities()
getMultiInstanceCapabilities
in interface MultiInstanceCapabilitiesHandler
Capabilities
public void buildClassifier(Instances exs) throws java.lang.Exception
Classifier
buildClassifier
in class Classifier
exs
- the training exemplarsjava.lang.Exception
- if the model cannot be built properlypublic double classifyInstance(Instance ex) throws java.lang.Exception
Classifier
classifyInstance
in class Classifier
ex
- the given test exemplarjava.lang.Exception
- if the exemplar could not be classified
successfullypublic double[] distributionForInstance(Instance ex) throws java.lang.Exception
distributionForInstance
in class Classifier
ex
- the exemplar for which distribution is computedjava.lang.Exception
- if the distribution can't be computed successfullypublic java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
listOptions
in class RandomizableClassifier
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-C Set whether or not use empirical log-odds cut-off instead of 0
-R <numOfRuns> Set the number of multiple runs needed for searching the MLE.
-S <num> Random number seed. (default 1)
-D If set, classifier is run in debug mode and may output additional info to the console
setOptions
in interface OptionHandler
setOptions
in class RandomizableClassifier
options
- the list of options as an array of stringsjava.lang.Exception
- if an option is not supportedpublic java.lang.String[] getOptions()
getOptions
in interface OptionHandler
getOptions
in class RandomizableClassifier
public java.lang.String numRunsTipText()
public void setNumRuns(int numRuns)
numRuns
- the number of runs to performpublic int getNumRuns()
public java.lang.String usingCutOffTipText()
public void setUsingCutOff(boolean cutOff)
cutOff
- whether to use an empirical cutoffpublic boolean getUsingCutOff()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class Classifier
public static void main(java.lang.String[] args)
args
- the options for the classifier