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


Java FieldName.getValue方法代码示例

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


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

示例1: formatNameList

import org.dmg.pmml.FieldName; //导入方法依赖的package包/类
static
public String formatNameList(List<FieldName> names){
	Function<FieldName, String> function = new Function<FieldName, String>(){

		@Override
		public String apply(FieldName name){
			return name.getValue();
		}
	};

	List<String> values;

	if(names.size() <= 5){
		values = Lists.transform(names, function);
	} else

	{
		values = new ArrayList<>();

		values.addAll(Lists.transform(names.subList(0, 2), function));
		values.add("..");
		values.addAll(Lists.transform(names.subList(names.size() - 2, names.size()), function));
	}

	return JOINER.join(values);
}
 
开发者ID:jpmml,项目名称:jpmml-converter,代码行数:27,代码来源:FeatureUtil.java

示例2: toContinuous

import org.dmg.pmml.FieldName; //导入方法依赖的package包/类
public TypeDefinitionField toContinuous(FieldName name){
	TypeDefinitionField field = getField(name);

	DataType dataType = field.getDataType();
	switch(dataType){
		case INTEGER:
		case FLOAT:
		case DOUBLE:
			break;
		default:
			throw new IllegalArgumentException("Field " + name.getValue() + " has data type " + dataType);
	}

	field.setOpType(OpType.CONTINUOUS);

	return field;
}
 
开发者ID:jpmml,项目名称:jpmml-converter,代码行数:18,代码来源:PMMLEncoder.java

示例3: removeDataField

import org.dmg.pmml.FieldName; //导入方法依赖的package包/类
public void removeDataField(FieldName name){
	Map<FieldName, DataField> dataFields = getDataFields();

	DataField dataField = dataFields.remove(name);
	if(dataField == null){
		throw new IllegalArgumentException(name.getValue());
	}
}
 
开发者ID:jpmml,项目名称:jpmml-sparkml,代码行数:9,代码来源:SparkMLEncoder.java

示例4: getField

import org.dmg.pmml.FieldName; //导入方法依赖的package包/类
public TypeDefinitionField getField(FieldName name){
	DataField dataField = getDataField(name);
	DerivedField derivedField = getDerivedField(name);

	if(dataField != null && derivedField == null){
		return dataField;
	} else

	if(dataField == null && derivedField != null){
		return derivedField;
	}

	throw new IllegalArgumentException(name.getValue());
}
 
开发者ID:jpmml,项目名称:jpmml-converter,代码行数:15,代码来源:PMMLEncoder.java

示例5: checkName

import org.dmg.pmml.FieldName; //导入方法依赖的package包/类
private void checkName(FieldName name){

		if(name == null){
			throw new NullPointerException();
		} // End if

		if(this.dataFields.containsKey(name) || this.derivedFields.containsKey(name)){
			throw new IllegalArgumentException(name.getValue());
		}
	}
 
开发者ID:jpmml,项目名称:jpmml-converter,代码行数:11,代码来源:PMMLEncoder.java

示例6: putPmmlScoresInEvent

import org.dmg.pmml.FieldName; //导入方法依赖的package包/类
private void putPmmlScoresInEvent(Map<FieldName, ?> predScores, Set<String> inserted,
        StreamlineEventImpl.Builder eventBuilder, List<FieldName> predOrOutFields, String msg) {

    for (FieldName predOrOutField : predOrOutFields) {
        final Object targetValue = predScores.get(predOrOutField);
        final String fieldName = predOrOutField.getValue();
        final Object predValue = EvaluatorUtil.decode(targetValue);
        eventBuilder.put(fieldName, predValue);
        LOG.debug(msg, fieldName, predValue);
        inserted.add(fieldName);
    }
}
 
开发者ID:hortonworks,项目名称:streamline,代码行数:13,代码来源:StreamlineJPMMLModelRunner.java

示例7: updateType

import org.dmg.pmml.FieldName; //导入方法依赖的package包/类
public void updateType(FieldName name, OpType opType, DataType dataType){
	DataField dataField = getDataField(name);

	if(dataField == null){
		throw new IllegalArgumentException(name.getValue());
	}

	dataField.setOpType(opType);
	dataField.setDataType(dataType);
}
 
开发者ID:jpmml,项目名称:jpmml-sklearn,代码行数:11,代码来源:SkLearnEncoder.java

示例8: resolveFeature

import org.dmg.pmml.FieldName; //导入方法依赖的package包/类
public Feature resolveFeature(FieldName name){
	Feature feature = getFeature(name);

	if(feature == null){
		throw new IllegalArgumentException(name.getValue());
	}

	return feature;
}
 
开发者ID:jpmml,项目名称:jpmml-r,代码行数:10,代码来源:Formula.java

示例9: withPrefix

import org.dmg.pmml.FieldName; //导入方法依赖的package包/类
static
protected FieldName withPrefix(FieldName name, String prefix){
	String value = name.getValue();

	return FieldName.create(prefix + (value.substring(0, 1)).toUpperCase() + value.substring(1));
}
 
开发者ID:jpmml,项目名称:jpmml-converter,代码行数:7,代码来源:AbstractTransformation.java


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