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
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
applyClassifier
(PMMLModel model, Instances test) static PMMLModel
getPMMLModel
(File file) Read and return a PMML model.static PMMLModel
getPMMLModel
(File file, Logger log) Read and return a PMML model.static PMMLModel
getPMMLModel
(InputStream stream) Read and return a PMML model.static PMMLModel
getPMMLModel
(InputStream stream, Logger log) Read and return a PMML model.static PMMLModel
getPMMLModel
(String filename) Read and return a PMML model.static PMMLModel
getPMMLModel
(String filename, Logger log) Read and return a PMML model.static void
static void
serializePMMLModel
(PMMLModel model, File file) Serialize aPMMLModel
object that encapsulates a PMML modelstatic void
serializePMMLModel
(PMMLModel model, OutputStream stream) Serialize aPMMLModel
object that encapsulates a PMML modelstatic void
serializePMMLModel
(PMMLModel model, String filename) Serialize aPMMLModel
object 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
- aFile
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:
stream
- theInputStream
to 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
- aFile
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:
stream
- theInputStream
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 from the stream
-
serializePMMLModel
Serialize aPMMLModel
object that encapsulates a PMML model- Parameters:
model
- thePMMLModel
to serializefilename
- the name of the file to save to- Throws:
Exception
- if something goes wrong during serialization
-
serializePMMLModel
Serialize aPMMLModel
object that encapsulates a PMML model- Parameters:
model
- thePMMLModel
to serializefile
- theFile
to save to- Throws:
Exception
- if something goes wrong during serialization
-
serializePMMLModel
Serialize aPMMLModel
object that encapsulates a PMML model- Parameters:
model
- thePMMLModel
to serializestream
- theOutputStream
to serialize to- Throws:
Exception
- if something goes wrong during serialization
-
applyClassifier
- Throws:
Exception
-
main
-