本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
}
示例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);
}
}