public class SerializedClassifier extends AbstractClassifier
-D If set, classifier is run in debug mode and may output additional info to the console
-model <filename> The file containing the serialized model. (required)
Constructor and Description |
---|
SerializedClassifier() |
Modifier and Type | Method and Description |
---|---|
void |
buildClassifier(Instances data)
loads only the serialized classifier
|
double[] |
distributionForInstance(Instance instance)
Calculates the class membership probabilities for the given test
instance.
|
Capabilities |
getCapabilities()
Returns default capabilities of the base classifier.
|
Classifier |
getCurrentModel()
Gets the currently loaded model (can be null).
|
File |
getModelFile()
Gets the file containing the serialized model.
|
String[] |
getOptions()
returns the options of the current setup
|
String |
getRevision()
Returns the revision string.
|
String |
globalInfo()
Returns a string describing classifier
|
Enumeration |
listOptions()
Gets an enumeration describing the available options.
|
static void |
main(String[] args)
Runs the classifier with the given options
|
String |
modelFileTipText()
Returns the tip text for this property
|
void |
setModel(Classifier value)
Sets the fully built model to use, if one doesn't want to load a model
from a file or already deserialized a model from somewhere else.
|
void |
setModelFile(File value)
Sets the file containing the serialized model.
|
void |
setOptions(String[] options)
Parses the options for this object.
|
String |
toString()
Returns a string representation of the classifier
|
classifyInstance, debugTipText, forName, getDebug, makeCopies, makeCopy, runClassifier, setDebug
public String globalInfo()
public Enumeration listOptions()
listOptions
in interface OptionHandler
listOptions
in class AbstractClassifier
public String[] getOptions()
getOptions
in interface OptionHandler
getOptions
in class AbstractClassifier
public void setOptions(String[] options) throws Exception
-D If set, classifier is run in debug mode and may output additional info to the console
-model <filename> The file containing the serialized model. (required)
setOptions
in interface OptionHandler
setOptions
in class AbstractClassifier
options
- the options to useException
- if setting of options failspublic String modelFileTipText()
public File getModelFile()
public void setModelFile(File value)
value
- the file.public void setModel(Classifier value)
value
- the built modelgetCurrentModel()
public Classifier getCurrentModel()
setModel(Classifier)
public Capabilities getCapabilities()
getCapabilities
in interface Classifier
getCapabilities
in interface CapabilitiesHandler
getCapabilities
in class AbstractClassifier
Capabilities
public double[] distributionForInstance(Instance instance) throws Exception
distributionForInstance
in interface Classifier
distributionForInstance
in class AbstractClassifier
instance
- the instance to be classifiedException
- if distribution can't be computed successfullypublic void buildClassifier(Instances data) throws Exception
data
- the training instancesException
- if something goes wrongpublic String toString()
public String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class AbstractClassifier
public static void main(String[] args)
args
- the commandline optionsCopyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.