Package weka.core.pmml
Class PMMLFactory
java.lang.Object
weka.core.pmml.PMMLFactory
This class is a factory class for reading/writing PMML models
- Version:
- $Revision: 10203 $
- Author:
- Mark Hall (mhall{[at]}pentaho{[dot]}com)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringapplyClassifier(PMMLModel model, Instances test) static PMMLModelgetPMMLModel(File file) Read and return a PMML model.static PMMLModelgetPMMLModel(File file, Logger log) Read and return a PMML model.static PMMLModelgetPMMLModel(InputStream stream) Read and return a PMML model.static PMMLModelgetPMMLModel(InputStream stream, Logger log) Read and return a PMML model.static PMMLModelgetPMMLModel(String filename) Read and return a PMML model.static PMMLModelgetPMMLModel(String filename, Logger log) Read and return a PMML model.static voidstatic voidserializePMMLModel(PMMLModel model, File file) Serialize aPMMLModelobject that encapsulates a PMML modelstatic voidserializePMMLModel(PMMLModel model, OutputStream stream) Serialize aPMMLModelobject that encapsulates a PMML modelstatic voidserializePMMLModel(PMMLModel model, String filename) Serialize aPMMLModelobject that encapsulates a PMML model
-
Constructor Details
-
PMMLFactory
public PMMLFactory()
-
-
Method Details
-
getPMMLModel
Read and return a PMML model.- Parameters:
filename- the name of the file to read from- Returns:
- a PMML model
- Throws:
Exception- if there is a problem while reading the file
-
getPMMLModel
Read and return a PMML model.- Parameters:
file- aFileto read from- Returns:
- a PMML model
- Throws:
Exception- if there is a problem while reading the file
-
getPMMLModel
Read and return a PMML model.- Parameters:
stream- theInputStreamto read from- Returns:
- a PMML model
- Throws:
Exception- if there is a problem while reading from the stream
-
getPMMLModel
Read and return a PMML model.- Parameters:
filename- the name of the file to read fromlog- the logging object to use (or null if none is to be used)- Returns:
- a PMML model
- Throws:
Exception- if there is a problem while reading the file
-
getPMMLModel
Read and return a PMML model.- Parameters:
file- aFileto read fromlog- the logging object to use (or null if none is to be used)- Returns:
- a PMML model
- Throws:
Exception- if there is a problem while reading the file
-
getPMMLModel
Read and return a PMML model.- Parameters:
stream- theInputStreamto read fromlog- the logging object to use (or null if none is to be used)- Returns:
- a PMML model
- Throws:
Exception- if there is a problem while reading from the stream
-
serializePMMLModel
Serialize aPMMLModelobject that encapsulates a PMML model- Parameters:
model- thePMMLModelto serializefilename- the name of the file to save to- Throws:
Exception- if something goes wrong during serialization
-
serializePMMLModel
Serialize aPMMLModelobject that encapsulates a PMML model- Parameters:
model- thePMMLModelto serializefile- theFileto save to- Throws:
Exception- if something goes wrong during serialization
-
serializePMMLModel
Serialize aPMMLModelobject that encapsulates a PMML model- Parameters:
model- thePMMLModelto serializestream- theOutputStreamto serialize to- Throws:
Exception- if something goes wrong during serialization
-
applyClassifier
- Throws:
Exception
-
main
-