本文整理了Java中weka.filters.Filter.testInputFormat()
方法的一些代码示例,展示了Filter.testInputFormat()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Filter.testInputFormat()
方法的具体详情如下:
包路径:weka.filters.Filter
类名称:Filter
方法名:testInputFormat
[英]tests the data whether the filter can actually handle it
[中]测试数据过滤器是否能够实际处理它
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Sets the format of the input instances. If the filter is able to determine
* the output format before seeing any input instances, it does so here. This
* default implementation clears the output format and output queue, and the
* new batch flag is set. Overriders should call
* <code>super.setInputFormat(Instances)</code>
*
* @param instanceInfo an Instances object containing the input instance
* structure (any instances contained in the object are ignored -
* only the structure is required).
* @return true if the outputFormat may be collected immediately
* @throws Exception if the inputFormat can't be set successfully
*/
public boolean setInputFormat(Instances instanceInfo) throws Exception {
testInputFormat(instanceInfo);
m_InputFormat = instanceInfo.stringFreeStructure();
m_OutputFormat = null;
m_OutputQueue = new Queue();
m_NewBatch = true;
m_FirstBatchDone = false;
initInputLocators(m_InputFormat, null);
return false;
}
代码示例来源:origin: Waikato/weka-trunk
/**
* Sets the format of the input instances. If the filter is able to determine
* the output format before seeing any input instances, it does so here. This
* default implementation clears the output format and output queue, and the
* new batch flag is set. Overriders should call
* <code>super.setInputFormat(Instances)</code>
*
* @param instanceInfo an Instances object containing the input instance
* structure (any instances contained in the object are ignored -
* only the structure is required).
* @return true if the outputFormat may be collected immediately
* @throws Exception if the inputFormat can't be set successfully
*/
public boolean setInputFormat(Instances instanceInfo) throws Exception {
testInputFormat(instanceInfo);
m_InputFormat = instanceInfo.stringFreeStructure();
m_OutputFormat = null;
m_OutputQueue = new Queue();
m_NewBatch = true;
m_FirstBatchDone = false;
initInputLocators(m_InputFormat, null);
return false;
}
内容来源于网络,如有侵权,请联系作者删除!