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, setDebugpublic String globalInfo()
public Enumeration listOptions()
listOptions in interface OptionHandlerlistOptions in class AbstractClassifierpublic String[] getOptions()
getOptions in interface OptionHandlergetOptions in class AbstractClassifierpublic 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 OptionHandlersetOptions in class AbstractClassifieroptions - 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 ClassifiergetCapabilities in interface CapabilitiesHandlergetCapabilities in class AbstractClassifierCapabilitiespublic double[] distributionForInstance(Instance instance) throws Exception
distributionForInstance in interface ClassifierdistributionForInstance in class AbstractClassifierinstance - 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 RevisionHandlergetRevision in class AbstractClassifierpublic static void main(String[] args)
args - the commandline optionsCopyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.