public class PMMLFactory extends Object
| Constructor and Description |
|---|
PMMLFactory() |
| Modifier and Type | Method and Description |
|---|---|
static 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 |
main(String[] args) |
static void |
serializePMMLModel(PMMLModel model,
File file)
Serialize a
PMMLModel object that encapsulates a PMML model |
static void |
serializePMMLModel(PMMLModel model,
OutputStream stream)
Serialize a
PMMLModel object that encapsulates a PMML model |
static void |
serializePMMLModel(PMMLModel model,
String filename)
Serialize a
PMMLModel object that encapsulates a PMML model |
public static PMMLModel getPMMLModel(String filename) throws Exception
filename - the name of the file to read fromException - if there is a problem while reading the filepublic static PMMLModel getPMMLModel(File file) throws Exception
file - a File to read fromException - if there is a problem while reading the filepublic static PMMLModel getPMMLModel(InputStream stream) throws Exception
stream - the InputStream to read fromException - if there is a problem while reading from the streampublic static PMMLModel getPMMLModel(String filename, Logger log) throws Exception
filename - the name of the file to read fromlog - the logging object to use (or null if none is to be used)Exception - if there is a problem while reading the filepublic static PMMLModel getPMMLModel(File file, Logger log) throws Exception
file - a File to read fromlog - the logging object to use (or null if none is to be used)Exception - if there is a problem while reading the filepublic static PMMLModel getPMMLModel(InputStream stream, Logger log) throws Exception
stream - the InputStream to read fromlog - the logging object to use (or null if none is to be used)Exception - if there is a problem while reading from the streampublic static void serializePMMLModel(PMMLModel model, String filename) throws Exception
PMMLModel object that encapsulates a PMML modelmodel - the PMMLModel to serializefilename - the name of the file to save toException - if something goes wrong during serializationpublic static void serializePMMLModel(PMMLModel model, File file) throws Exception
PMMLModel object that encapsulates a PMML modelmodel - the PMMLModel to serializefile - the File to save toException - if something goes wrong during serializationpublic static void serializePMMLModel(PMMLModel model, OutputStream stream) throws Exception
PMMLModel object that encapsulates a PMML modelmodel - the PMMLModel to serializestream - the OutputStream to serialize toException - if something goes wrong during serializationpublic static String applyClassifier(PMMLModel model, Instances test) throws Exception
Exceptionpublic static void main(String[] args)
Copyright © 2014 University of Waikato, Hamilton, NZ. All Rights Reserved.