當前位置: 首頁>>代碼示例>>Java>>正文


Java PMMLUtil類代碼示例

本文整理匯總了Java中org.jpmml.model.PMMLUtil的典型用法代碼示例。如果您正苦於以下問題:Java PMMLUtil類的具體用法?Java PMMLUtil怎麽用?Java PMMLUtil使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


PMMLUtil類屬於org.jpmml.model包,在下文中一共展示了PMMLUtil類的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: write

import org.jpmml.model.PMMLUtil; //導入依賴的package包/類
/**
 * @param pmml {@link PMML} model to write
 * @param out stream to write the model to
 * @throws IOException if an error occurs while writing the model to storage
 */
public static void write(PMML pmml, OutputStream out) throws IOException {
  try {
    PMMLUtil.marshal(pmml, out);
  } catch (JAXBException e) {
    throw new IOException(e);
  }
}
 
開發者ID:oncewang,項目名稱:oryx2,代碼行數:13,代碼來源:PMMLUtils.java

示例2: read

import org.jpmml.model.PMMLUtil; //導入依賴的package包/類
/**
 * @param in stream to read PMML from
 * @return {@link PMML} model file from stream
 * @throws IOException if an error occurs while reading the model from the stream
 */
public static PMML read(InputStream in) throws IOException {
  try {
    return PMMLUtil.unmarshal(in);
  } catch (JAXBException | SAXException e) {
    throw new IOException(e);
  }
}
 
開發者ID:oncewang,項目名稱:oryx2,代碼行數:13,代碼來源:PMMLUtils.java

示例3: run

import org.jpmml.model.PMMLUtil; //導入依賴的package包/類
private void run() throws Exception {
	PMML pmml;

	try(InputStream is = new FileInputStream(this.input)){
		pmml = PMMLUtil.unmarshal(is);
	}

	pmml = enhance(pmml);

	try(OutputStream os = new FileOutputStream(this.output)){
		MetroJAXBUtil.marshalPMML(pmml, os);
	}
}
 
開發者ID:vruusmann,項目名稱:qsar.io,代碼行數:14,代碼來源:ModelEnhancer.java

示例4: createModelEvaluator

import org.jpmml.model.PMMLUtil; //導入依賴的package包/類
static
public ModelEvaluator<?> createModelEvaluator(InputStream is, ModelEvaluatorFactory modelEvaluatorFactory) throws Exception {
	PMML pmml = PMMLUtil.unmarshal(is);

	assertNull(pmml.getLocator());

	return modelEvaluatorFactory.newModelEvaluator(pmml);
}
 
開發者ID:jpmml,項目名稱:jpmml-evaluator,代碼行數:9,代碼來源:ModelEvaluatorTest.java

示例5: readPMML

import org.jpmml.model.PMMLUtil; //導入依賴的package包/類
static
public PMML readPMML(File file) throws Exception {

	try(InputStream is = new FileInputStream(file)){
		return PMMLUtil.unmarshal(is);
	}
}
 
開發者ID:jpmml,項目名稱:jpmml-evaluator,代碼行數:8,代碼來源:Example.java

示例6: writePMML

import org.jpmml.model.PMMLUtil; //導入依賴的package包/類
static
public void writePMML(PMML pmml, File file) throws Exception {

	try(OutputStream os = new FileOutputStream(file)){
		PMMLUtil.marshal(pmml, os);
	}
}
 
開發者ID:jpmml,項目名稱:jpmml-evaluator,代碼行數:8,代碼來源:Example.java

示例7: loadPMML

import org.jpmml.model.PMMLUtil; //導入依賴的package包/類
protected PMML loadPMML(String path) throws Exception {

		try(InputStream is = open(path)){
			return PMMLUtil.unmarshal(is);
		}
	}
 
開發者ID:jpmml,項目名稱:jpmml-evaluator,代碼行數:7,代碼來源:ArchiveBatch.java


注:本文中的org.jpmml.model.PMMLUtil類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。