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

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

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

Filter.initOutputLocators介绍

[英]Initializes the output 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 output instances. The derived class should use this
 * method once it has determined the outputformat. The output queue is
 * cleared.
 *
 * @param outputFormat the new output format
 */
protected void setOutputFormat(Instances outputFormat) {
 if (outputFormat != null) {
  m_OutputFormat = outputFormat.stringFreeStructure();
  initOutputLocators(m_OutputFormat, null);
  // Rename the relation
  String relationName =
   outputFormat.relationName() + "-" + this.getClass().getName();
  if (this instanceof OptionHandler) {
   String[] options = ((OptionHandler) this).getOptions();
   for (String option : options) {
    relationName += option.trim();
   }
  }
  m_OutputFormat.setRelationName(relationName);
 } else {
  m_OutputFormat = null;
 }
 m_OutputQueue = new Queue();
}

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

/**
 * Sets the format of output instances. The derived class should use this
 * method once it has determined the outputformat. The output queue is
 * cleared.
 *
 * @param outputFormat the new output format
 */
protected void setOutputFormat(Instances outputFormat) {
 if (outputFormat != null) {
  m_OutputFormat = outputFormat.stringFreeStructure();
  initOutputLocators(m_OutputFormat, null);
  // Rename the relation
  String relationName =
   outputFormat.relationName() + "-" + this.getClass().getName();
  if (this instanceof OptionHandler) {
   String[] options = ((OptionHandler) this).getOptions();
   for (String option : options) {
    relationName += option.trim();
   }
  }
  m_OutputFormat.setRelationName(relationName);
 } else {
  m_OutputFormat = null;
 }
 m_OutputQueue = new Queue();
}

相关文章