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