类 SerializedClassifier
java.lang.Object
weka.classifiers.Classifier
weka.classifiers.misc.SerializedClassifier
- 所有已实现的接口:
Serializable
,Cloneable
,CapabilitiesHandler
,OptionHandler
,RevisionHandler
A wrapper around a serialized classifier model. This classifier loads a serialized models and uses it to make predictions.
Warning: since the serialized model doesn't get changed, cross-validation cannot bet used with this classifier. Valid options are:
Warning: since the serialized model doesn't get changed, cross-validation cannot bet used with this classifier. Valid options are:
-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)
- 版本:
- $Revision: 7560 $
- 作者:
- fracpete (fracpete at waikato dot ac dot nz)
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
buildClassifier
(Instances data) loads only the serialized classifierdouble[]
distributionForInstance
(Instance instance) Calculates the class membership probabilities for the given test instance.Returns default capabilities of the base classifier.Gets the currently loaded model (can be null).Gets the file containing the serialized model.String[]
returns the options of the current setupReturns the revision string.Returns a string describing classifierGets an enumeration describing the available options.static void
Runs the classifier with the given optionsReturns the tip text for this propertyvoid
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.toString()
Returns a string representation of the classifier从类继承的方法 weka.classifiers.Classifier
classifyInstance, debugTipText, forName, getDebug, makeCopies, makeCopy, setDebug
-
构造器详细资料
-
SerializedClassifier
public SerializedClassifier()
-
-
方法详细资料
-
globalInfo
Returns a string describing classifier- 返回:
- a description suitable for displaying in the explorer/experimenter gui
-
listOptions
Gets an enumeration describing the available options.- 指定者:
listOptions
在接口中OptionHandler
- 覆盖:
listOptions
在类中Classifier
- 返回:
- an enumeration of all the available options.
-
getOptions
returns the options of the current setup- 指定者:
getOptions
在接口中OptionHandler
- 覆盖:
getOptions
在类中Classifier
- 返回:
- the current options
-
setOptions
Parses the options for this object. Valid options are:-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
在接口中OptionHandler
- 覆盖:
setOptions
在类中Classifier
- 参数:
options
- the options to use- 抛出:
Exception
- if setting of options fails
-
modelFileTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getModelFile
Gets the file containing the serialized model.- 返回:
- the file.
-
setModelFile
Sets the file containing the serialized model.- 参数:
value
- the file.
-
setModel
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.- 参数:
value
- the built model- 另请参阅:
-
getCurrentModel
Gets the currently loaded model (can be null). Call buildClassifier method to load model from file.- 返回:
- the current model
- 另请参阅:
-
getCapabilities
Returns default capabilities of the base classifier.- 指定者:
getCapabilities
在接口中CapabilitiesHandler
- 覆盖:
getCapabilities
在类中Classifier
- 返回:
- the capabilities of the base classifier
- 另请参阅:
-
distributionForInstance
Calculates the class membership probabilities for the given test instance.- 覆盖:
distributionForInstance
在类中Classifier
- 参数:
instance
- the instance to be classified- 返回:
- preedicted class probability distribution
- 抛出:
Exception
- if distribution can't be computed successfully
-
buildClassifier
loads only the serialized classifier- 指定者:
buildClassifier
在类中Classifier
- 参数:
data
- the training instances- 抛出:
Exception
- if something goes wrong
-
toString
Returns a string representation of the classifier -
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 覆盖:
getRevision
在类中Classifier
- 返回:
- the revision
-
main
Runs the classifier with the given options- 参数:
args
- the commandline options
-