本文整理了Java中weka.filters.unsupervised.attribute.Add.outputFormatPeek()
方法的一些代码示例,展示了Add.outputFormatPeek()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Add.outputFormatPeek()
方法的具体详情如下:
包路径:weka.filters.unsupervised.attribute.Add
类名称:Add
方法名:outputFormatPeek
暂无
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Input an instance for filtering. Ordinarily the instance is processed and
* made available for output immediately. Some filters require all instances
* be read before producing output.
*
* @param instance the input instance
* @return true if the filtered instance may now be collected with output().
* @throws IllegalStateException if no input format has been defined.
*/
@Override
public boolean input(Instance instance) {
if (getInputFormat() == null) {
throw new IllegalStateException("No input instance format defined");
}
if (m_NewBatch) {
resetQueue();
m_NewBatch = false;
}
Instance inst = (Instance) instance.copy();
// First copy string values from input to output
copyValues(inst, true, inst.dataset(), outputFormatPeek());
// Insert the new attribute and reassign to output
inst.setDataset(null);
inst.insertAttributeAt(m_Insert.getIndex());
push(inst); // No need to copy instance
return true;
}
代码示例来源:origin: Waikato/weka-trunk
/**
* Input an instance for filtering. Ordinarily the instance is processed and
* made available for output immediately. Some filters require all instances
* be read before producing output.
*
* @param instance the input instance
* @return true if the filtered instance may now be collected with output().
* @throws IllegalStateException if no input format has been defined.
*/
@Override
public boolean input(Instance instance) {
if (getInputFormat() == null) {
throw new IllegalStateException("No input instance format defined");
}
if (m_NewBatch) {
resetQueue();
m_NewBatch = false;
}
Instance inst = (Instance) instance.copy();
// First copy string values from input to output
copyValues(inst, true, inst.dataset(), outputFormatPeek());
// Insert the new attribute and reassign to output
inst.setDataset(null);
inst.insertAttributeAt(m_Insert.getIndex());
push(inst); // No need to copy instance
return true;
}
内容来源于网络,如有侵权,请联系作者删除!