Package weka.classifiers.pmml.consumer
Class PMMLClassifier
java.lang.Object
weka.classifiers.AbstractClassifier
weka.classifiers.pmml.consumer.PMMLClassifier
- All Implemented Interfaces:
Serializable
,Cloneable
,Classifier
,BatchPredictor
,CapabilitiesHandler
,CapabilitiesIgnorer
,CommandlineRunnable
,OptionHandler
,PMMLModel
,RevisionHandler
- Direct Known Subclasses:
GeneralRegression
,NeuralNetwork
,Regression
,RuleSetModel
,SupportVectorMachineModel
,TreeModel
Abstract base class for all PMML classifiers.
- Version:
- $Revision: 8034 $
- Author:
- Mark Hall (mhall{[at]}pentaho{[dot]}com)
- See Also:
-
Field Summary
Fields inherited from class weka.classifiers.AbstractClassifier
BATCH_SIZE_DEFAULT, NUM_DECIMAL_PLACES_DEFAULT
-
Method Summary
Modifier and TypeMethodDescriptionvoid
buildClassifier
(Instances data) Throw an exception - PMML models are pre-built.void
done()
Signal that a scoring run has been completed.Get the name of the application that created this modelGet the data dictionary.Get a textual description of the mapping between mining schema fields and incoming data fields.getLog()
Get the logger.Get the mining schema for this model.Get the PMML version used for this model.void
mapToMiningSchema
(Instances dataSet) Map mining schema to incoming instances.void
Set the name of the application (if specified) that created this modelvoid
Set a logger to use.void
setPMMLVersion
(Document doc) Set the version of PMML used for this model.Methods inherited from class weka.classifiers.AbstractClassifier
batchSizeTipText, classifyInstance, debugTipText, distributionForInstance, distributionsForInstances, doNotCheckCapabilitiesTipText, forName, getBatchSize, getCapabilities, getDebug, getDoNotCheckCapabilities, getNumDecimalPlaces, getOptions, getRevision, implementsMoreEfficientBatchPrediction, listOptions, makeCopies, makeCopy, numDecimalPlacesTipText, postExecution, preExecution, run, runClassifier, setBatchSize, setDebug, setDoNotCheckCapabilities, setNumDecimalPlaces, setOptions
-
Method Details
-
setPMMLVersion
Set the version of PMML used for this model.- Specified by:
setPMMLVersion
in interfacePMMLModel
- Parameters:
doc
- the Document encapsulating the pmml
-
setCreatorApplication
Set the name of the application (if specified) that created this model- Specified by:
setCreatorApplication
in interfacePMMLModel
- Parameters:
doc
- the Document encapsulating the pmml
-
getDataDictionary
Get the data dictionary.- Returns:
- the data dictionary
-
getMiningSchema
Get the mining schema for this model.- Specified by:
getMiningSchema
in interfacePMMLModel
- Returns:
- the mining schema
-
getPMMLVersion
Get the PMML version used for this model.- Specified by:
getPMMLVersion
in interfacePMMLModel
- Returns:
- the PMML version
-
getCreatorApplication
Get the name of the application that created this model- Specified by:
getCreatorApplication
in interfacePMMLModel
- Returns:
- the name of the creating application or null if not specified in the pmml.
-
setLog
Set a logger to use. -
getLog
Get the logger. -
buildClassifier
Throw an exception - PMML models are pre-built.- Specified by:
buildClassifier
in interfaceClassifier
- Parameters:
data
- the Instances to learn from- Throws:
Exception
- if something goes wrong
-
done
public void done()Signal that a scoring run has been completed. Resets the initialized state to false so that a subsequent scoring run will trigger the mapping of the mining schema to incoming instances. If not called after a scoring run, then the classifier will assume that the current mapping is still valid. -
mapToMiningSchema
Map mining schema to incoming instances.- Parameters:
dataSet
- the structure of the incoming Instances- Throws:
Exception
- if something goes wrong
-
getFieldsMappingString
Get a textual description of the mapping between mining schema fields and incoming data fields.- Returns:
- a description of the fields mapping as a String or null if no mapping has been constructed yet.
-