public class PMMLFactory
extends java.lang.Object
Constructor and Description |
---|
PMMLFactory() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
applyClassifier(PMMLModel model,
Instances test) |
static PMMLModel |
getPMMLModel(java.io.File file)
Read and return a PMML model.
|
static PMMLModel |
getPMMLModel(java.io.File file,
Logger log)
Read and return a PMML model.
|
static PMMLModel |
getPMMLModel(java.io.InputStream stream)
Read and return a PMML model.
|
static PMMLModel |
getPMMLModel(java.io.InputStream stream,
Logger log)
Read and return a PMML model.
|
static PMMLModel |
getPMMLModel(java.lang.String filename)
Read and return a PMML model.
|
static PMMLModel |
getPMMLModel(java.lang.String filename,
Logger log)
Read and return a PMML model.
|
static void |
main(java.lang.String[] args) |
static void |
serializePMMLModel(PMMLModel model,
java.io.File file)
Serialize a
PMMLModel object that encapsulates a PMML model |
static void |
serializePMMLModel(PMMLModel model,
java.io.OutputStream stream)
Serialize a
PMMLModel object that encapsulates a PMML model |
static void |
serializePMMLModel(PMMLModel model,
java.lang.String filename)
Serialize a
PMMLModel object that encapsulates a PMML model |
public static PMMLModel getPMMLModel(java.lang.String filename) throws java.lang.Exception
filename
- the name of the file to read fromjava.lang.Exception
- if there is a problem while reading the filepublic static PMMLModel getPMMLModel(java.io.File file) throws java.lang.Exception
file
- a File
to read fromjava.lang.Exception
- if there is a problem while reading the filepublic static PMMLModel getPMMLModel(java.io.InputStream stream) throws java.lang.Exception
stream
- the InputStream
to read fromjava.lang.Exception
- if there is a problem while reading from the streampublic static PMMLModel getPMMLModel(java.lang.String filename, Logger log) throws java.lang.Exception
filename
- the name of the file to read fromlog
- the logging object to use (or null if none is to be used)java.lang.Exception
- if there is a problem while reading the filepublic static PMMLModel getPMMLModel(java.io.File file, Logger log) throws java.lang.Exception
file
- a File
to read fromlog
- the logging object to use (or null if none is to be used)java.lang.Exception
- if there is a problem while reading the filepublic static PMMLModel getPMMLModel(java.io.InputStream stream, Logger log) throws java.lang.Exception
stream
- the InputStream
to read fromlog
- the logging object to use (or null if none is to be used)java.lang.Exception
- if there is a problem while reading from the streampublic static void serializePMMLModel(PMMLModel model, java.lang.String filename) throws java.lang.Exception
PMMLModel
object that encapsulates a PMML modelmodel
- the PMMLModel
to serializefilename
- the name of the file to save tojava.lang.Exception
- if something goes wrong during serializationpublic static void serializePMMLModel(PMMLModel model, java.io.File file) throws java.lang.Exception
PMMLModel
object that encapsulates a PMML modelmodel
- the PMMLModel
to serializefile
- the File
to save tojava.lang.Exception
- if something goes wrong during serializationpublic static void serializePMMLModel(PMMLModel model, java.io.OutputStream stream) throws java.lang.Exception
PMMLModel
object that encapsulates a PMML modelmodel
- the PMMLModel
to serializestream
- the OutputStream
to serialize tojava.lang.Exception
- if something goes wrong during serializationpublic static java.lang.String applyClassifier(PMMLModel model, Instances test) throws java.lang.Exception
java.lang.Exception
public static void main(java.lang.String[] args)