当前位置: 首页>>代码示例>>Java>>正文


Java DataDictionary.hasDataFields方法代码示例

本文整理汇总了Java中org.dmg.pmml.DataDictionary.hasDataFields方法的典型用法代码示例。如果您正苦于以下问题:Java DataDictionary.hasDataFields方法的具体用法?Java DataDictionary.hasDataFields怎么用?Java DataDictionary.hasDataFields使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.dmg.pmml.DataDictionary的用法示例。


在下文中一共展示了DataDictionary.hasDataFields方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: visit

import org.dmg.pmml.DataDictionary; //导入方法依赖的package包/类
@Override
public VisitorAction visit(PMML pmml){
	DataDictionary dataDictionary = pmml.getDataDictionary();
	if(dataDictionary != null && dataDictionary.hasDataFields()){
		declare(pmml, dataDictionary.getDataFields());
	}

	TransformationDictionary transformationDictionary = pmml.getTransformationDictionary();
	if(transformationDictionary != null && transformationDictionary.hasDerivedFields()){
		declare(pmml, transformationDictionary.getDerivedFields());
	}

	return super.visit(pmml);
}
 
开发者ID:jpmml,项目名称:jpmml-model,代码行数:15,代码来源:FieldResolver.java

示例2: visit

import org.dmg.pmml.DataDictionary; //导入方法依赖的package包/类
@Override
public VisitorAction visit(DataDictionary dataDictionary){

	if(dataDictionary.hasDataFields()){
		this.dataFields.addAll(dataDictionary.getDataFields());
	}

	return super.visit(dataDictionary);
}
 
开发者ID:jpmml,项目名称:jpmml-model,代码行数:10,代码来源:FieldDependencyResolver.java

示例3: visit

import org.dmg.pmml.DataDictionary; //导入方法依赖的package包/类
@Override
public VisitorAction visit(DataDictionary dataDictionary){

	if(dataDictionary.hasDataFields()){
		List<DataField> dataFields = dataDictionary.getDataFields();

		for(ListIterator<DataField> it = dataFields.listIterator(); it.hasNext(); ){
			it.set(new RichDataField(it.next()));
		}
	}

	return super.visit(dataDictionary);
}
 
开发者ID:jpmml,项目名称:jpmml-evaluator,代码行数:14,代码来源:FieldOptimizer.java

示例4: ModelEvaluator

import org.dmg.pmml.DataDictionary; //导入方法依赖的package包/类
protected ModelEvaluator(PMML pmml, M model){
	setPMML(Objects.requireNonNull(pmml));
	setModel(Objects.requireNonNull(model));

	DataDictionary dataDictionary = pmml.getDataDictionary();
	if(dataDictionary == null){
		throw new MissingElementException(pmml, PMMLElements.PMML_DATADICTIONARY);
	} // End if

	if(dataDictionary.hasDataFields()){
		this.dataFields = CacheUtil.getValue(dataDictionary, ModelEvaluator.dataFieldCache);
	}

	TransformationDictionary transformationDictionary = pmml.getTransformationDictionary();
	if(transformationDictionary != null && transformationDictionary.hasDerivedFields()){
		this.derivedFields = CacheUtil.getValue(transformationDictionary, ModelEvaluator.derivedFieldCache);
	} // End if

	if(transformationDictionary != null && transformationDictionary.hasDefineFunctions()){
		this.defineFunctions = CacheUtil.getValue(transformationDictionary, ModelEvaluator.defineFunctionCache);
	}

	MiningFunction miningFunction = model.getMiningFunction();
	if(miningFunction == null){
		throw new MissingAttributeException(MissingAttributeException.formatMessage(XPathUtil.formatElement(model.getClass()) + "@miningFunction"), model);
	}

	MiningSchema miningSchema = model.getMiningSchema();
	if(miningSchema == null){
		throw new MissingElementException(MissingElementException.formatMessage(XPathUtil.formatElement(model.getClass()) + "/" + XPathUtil.formatElement(MiningSchema.class)), model);
	} // End if

	if(miningSchema.hasMiningFields()){
		this.miningFields = CacheUtil.getValue(miningSchema, ModelEvaluator.miningFieldCache);
	}

	LocalTransformations localTransformations = model.getLocalTransformations();
	if(localTransformations != null && localTransformations.hasDerivedFields()){
		this.localDerivedFields = CacheUtil.getValue(localTransformations, ModelEvaluator.localDerivedFieldCache);
	}

	Targets targets = model.getTargets();
	if(targets != null && targets.hasTargets()){
		this.targets = CacheUtil.getValue(targets, ModelEvaluator.targetCache);
	}

	Output output = model.getOutput();
	if(output != null && output.hasOutputFields()){
		this.outputFields = CacheUtil.getValue(output, ModelEvaluator.outputFieldCache);
	}
}
 
开发者ID:jpmml,项目名称:jpmml-evaluator,代码行数:52,代码来源:ModelEvaluator.java

示例5: processDataDictionary

import org.dmg.pmml.DataDictionary; //导入方法依赖的package包/类
private void processDataDictionary(DataDictionary dataDictionary){

		if(dataDictionary.hasDataFields()){
			List<DataField> dataFields = dataDictionary.getDataFields();

			Set<DataField> usedDataFields = getUsedDataFields();

			dataFields.retainAll(usedDataFields);
		}
	}
 
开发者ID:jpmml,项目名称:jpmml-model,代码行数:11,代码来源:DataDictionaryCleaner.java


注:本文中的org.dmg.pmml.DataDictionary.hasDataFields方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。