weka.filters.Filter.initInputLocators()方法的使用及代码示例

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

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

Filter.initInputLocators介绍

[英]Initializes the input attribute locators. If indices is null then all attributes of the data will be considered, otherwise only the ones that were provided.
[中]初始化输入属性定位器。如果索引为空,则将考虑数据的所有属性,否则仅考虑提供的属性。

代码示例

代码示例来源: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;
}

相关文章