当前位置: 首页>>代码示例>>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;未经允许,请勿转载。