weka.core.Instances.renameAttributeValue()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(115)

本文整理了Java中weka.core.Instances.renameAttributeValue()方法的一些代码示例,展示了Instances.renameAttributeValue()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Instances.renameAttributeValue()方法的具体详情如下:
包路径:weka.core.Instances
类名称:Instances
方法名:renameAttributeValue

Instances.renameAttributeValue介绍

[英]Renames the value of a nominal (or string) attribute value. This change only affects this dataset.
[中]重命名标称(或字符串)属性值的值。此更改仅影响此数据集。

代码示例

代码示例来源:origin: com.googlecode.obvious/obviousx-weka

@Override
public void renameAttributeValue(Attribute att, String val, String name) {
 super.renameAttributeValue(att, val, name);
}

代码示例来源:origin: com.googlecode.obvious/obviousx-weka

@Override
public void renameAttributeValue(int arg0, int arg1, String arg2) {
 super.renameAttributeValue(arg0, arg1, arg2);
}

代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Renames the value of a nominal (or string) attribute value. This change
 * only affects this dataset.
 * 
 * @param att the attribute
 * @param val the value
 * @param name the new name
 */
public void renameAttributeValue(Attribute att, String val, String name) {
 int v = att.indexOfValue(val);
 if (v == -1) {
  throw new IllegalArgumentException(val + " not found");
 }
 renameAttributeValue(att.index(), v, name);
}

代码示例来源:origin: Waikato/weka-trunk

/**
 * Renames the value of a nominal (or string) attribute value. This change
 * only affects this dataset.
 * 
 * @param att the attribute
 * @param val the value
 * @param name the new name
 */
public void renameAttributeValue(Attribute att, String val, String name) {
 int v = att.indexOfValue(val);
 if (v == -1) {
  throw new IllegalArgumentException(val + " not found");
 }
 renameAttributeValue(att.index(), v, name);
}

代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable

Instances copy = new Instances(empty, 0);
copy.renameAttribute(copy.classAttribute(), "new_name");
copy.renameAttributeValue(copy.classAttribute(), copy.classAttribute()
 .value(0), "new_val_name");
System.out.println("\nDataset with names changed:\n" + copy);

代码示例来源:origin: Waikato/weka-trunk

Instances copy = new Instances(empty, 0);
copy.renameAttribute(copy.classAttribute(), "new_name");
copy.renameAttributeValue(copy.classAttribute(), copy.classAttribute()
 .value(0), "new_val_name");
System.out.println("\nDataset with names changed:\n" + copy);

相关文章

Instances类方法