本文整理了Java中weka.filters.Filter.copyValues()
方法的一些代码示例,展示了Filter.copyValues()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Filter.copyValues()
方法的具体详情如下:
包路径:weka.filters.Filter
类名称:Filter
方法名:copyValues
[英]Copies string/relational values contained in the instance copied to a new dataset. The Instance must already be assigned to a dataset. This dataset and the destination dataset must have the same structure.
[中]将实例中包含的字符串/关系值复制到新数据集。实例必须已分配给数据集。此数据集和目标数据集必须具有相同的结构。
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Adds the supplied input instance to the inputformat dataset for later
* processing. Use this method rather than getInputFormat().add(instance). Or
* else. Note that the provided instance gets copied when buffered.
*
* @param instance the <code>Instance</code> to buffer.
*/
protected void bufferInput(Instance instance) {
if (instance != null) {
instance = (Instance)instance.copy(); // The copyValues() method *does* modify the instance!
copyValues(instance, true);
m_InputFormat.add(instance);
}
}
代码示例来源:origin: Waikato/weka-trunk
/**
* Adds the supplied input instance to the inputformat dataset for later
* processing. Use this method rather than getInputFormat().add(instance). Or
* else. Note that the provided instance gets copied when buffered.
*
* @param instance the <code>Instance</code> to buffer.
*/
protected void bufferInput(Instance instance) {
if (instance != null) {
instance = (Instance)instance.copy(); // The copyValues() method *does* modify the instance!
copyValues(instance, true);
m_InputFormat.add(instance);
}
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Adds an output instance to the queue. The derived class should use this
* method for each output instance it makes available. Note that the instance
* is only copied before it is added to the output queue if copyInstance has
* value true and if the instance has a reference to a dataset.
*
* @param instance the instance to be added to the queue.
* @param copyInstance whether instance is to be copied
*/
protected void push(Instance instance, boolean copyInstance) {
if (instance != null) {
if (instance.dataset() != null) {
if (copyInstance) {
instance = (Instance) instance.copy();
}
copyValues(instance, false);
}
instance.setDataset(m_OutputFormat);
m_OutputQueue.push(instance);
}
}
代码示例来源:origin: Waikato/weka-trunk
/**
* Adds an output instance to the queue. The derived class should use this
* method for each output instance it makes available. Note that the instance
* is only copied before it is added to the output queue if copyInstance has
* value true and if the instance has a reference to a dataset.
*
* @param instance the instance to be added to the queue.
* @param copyInstance whether instance is to be copied
*/
protected void push(Instance instance, boolean copyInstance) {
if (instance != null) {
if (instance.dataset() != null) {
if (copyInstance) {
instance = (Instance) instance.copy();
}
copyValues(instance, false);
}
instance.setDataset(m_OutputFormat);
m_OutputQueue.push(instance);
}
}
内容来源于网络,如有侵权,请联系作者删除!