/** * Read and return a PMML model. * * @param stream the <code>InputStream</code> to read from * @return a PMML model * @throws Exception if there is a problem while reading from the stream */ public static PMMLModel getPMMLModel(InputStream stream) throws Exception { return getPMMLModel(stream, null); }
/** * Read and return a PMML model. * * @param file a <code>File</code> to read from * @return a PMML model * @throws Exception if there is a problem while reading the file */ public static PMMLModel getPMMLModel(File file) throws Exception { return getPMMLModel(file, null); }
/** * Read and return a PMML model. * * @param filename the name of the file to read from * @return a PMML model * @throws Exception if there is a problem while reading the file */ public static PMMLModel getPMMLModel(String filename) throws Exception { return getPMMLModel(filename, null); }
/** * Read and return a PMML model. * * @param filename the name of the file to read from * @return a PMML model * @throws Exception if there is a problem while reading the file */ public static PMMLModel getPMMLModel(String filename) throws Exception { return getPMMLModel(filename, null); }
/** * Read and return a PMML model. * * @param file a <code>File</code> to read from * @return a PMML model * @throws Exception if there is a problem while reading the file */ public static PMMLModel getPMMLModel(File file) throws Exception { return getPMMLModel(file, null); }
/** * Read and return a PMML model. * * @param stream the <code>InputStream</code> to read from * @return a PMML model * @throws Exception if there is a problem while reading from the stream */ public static PMMLModel getPMMLModel(InputStream stream) throws Exception { return getPMMLModel(stream, null); }
/** * Read and return a PMML model. * * @param filename the name of the file to read from * @param log the logging object to use (or null if none is to be used) * @return a PMML model * @throws Exception if there is a problem while reading the file */ public static PMMLModel getPMMLModel(String filename, Logger log) throws Exception { return getPMMLModel(new File(filename), log); }
/** * Read and return a PMML model. * * @param filename the name of the file to read from * @param log the logging object to use (or null if none is to be used) * @return a PMML model * @throws Exception if there is a problem while reading the file */ public static PMMLModel getPMMLModel(String filename, Logger log) throws Exception { return getPMMLModel(new File(filename), log); }
/** * Read and return a PMML model. * * @param file a <code>File</code> to read from * @param log the logging object to use (or null if none is to be used) * @return a PMML model * @throws Exception if there is a problem while reading the file */ public static PMMLModel getPMMLModel(File file, Logger log) throws Exception { return getPMMLModel(new BufferedInputStream(new FileInputStream(file)), log); }
/** * Read and return a PMML model. * * @param file a <code>File</code> to read from * @param log the logging object to use (or null if none is to be used) * @return a PMML model * @throws Exception if there is a problem while reading the file */ public static PMMLModel getPMMLModel(File file, Logger log) throws Exception { return getPMMLModel(new BufferedInputStream(new FileInputStream(file)), log); }
public PMMLClassifier getClassifier(String name) { PMMLClassifier regression = null; try { PMMLModel model = PMMLFactory.getPMMLModel(new BufferedInputStream( ClassLoader.getSystemResourceAsStream("weka/classifiers/pmml/data/" + name))); regression = (PMMLClassifier) model; } catch (Exception ex) { ex.printStackTrace(); } return regression; }
public PMMLClassifier getClassifier(String name) { PMMLClassifier regression = null; try { PMMLModel model = PMMLFactory.getPMMLModel(new BufferedInputStream( ClassLoader.getSystemResourceAsStream("weka/classifiers/pmml/data/" + name))); regression = (PMMLClassifier) model; } catch (Exception ex) { ex.printStackTrace(); } return regression; }
} catch (IOException e) { try { this.setClassifier((Classifier) PMMLFactory.getPMMLModel(location, null));
getPMMLModel(pmmlFile, null);
getPMMLModel(pmmlFile, null);
PMMLModel pmmlModel = PMMLFactory.getPMMLModel(modelFileName); if (pmmlModel instanceof PMMLClassifier) { classifier = ((PMMLClassifier) pmmlModel);
PMMLModel pmmlModel = PMMLFactory.getPMMLModel(modelFileName); if (pmmlModel instanceof PMMLClassifier) { classifier = ((PMMLClassifier) pmmlModel);
InputStream is = new FileInputStream(selected); if (selected.getName().endsWith(PMML_FILE_EXTENSION)) { PMMLModel model = PMMLFactory.getPMMLModel(is, m_Log); if (model instanceof PMMLClassifier) { classifier = (PMMLClassifier) model;
InputStream is = new FileInputStream(selected); if (selected.getName().endsWith(PMML_FILE_EXTENSION)) { PMMLModel model = PMMLFactory.getPMMLModel(is, m_Log); if (model instanceof PMMLClassifier) { classifier = (PMMLClassifier) model;
if (selected.getName().endsWith(ClassifierPanel.PMML_FILE_EXTENSION)) PMMLModel model = PMMLFactory.getPMMLModel(is, null); if (model instanceof PMMLClassifier) newClassifier = (PMMLClassifier)model;