weka.core.Instances.deleteAttributeType()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(95)

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

Instances.deleteAttributeType介绍

[英]Deletes all attributes of the given type in the dataset. A deep copy of the attribute information is performed before an attribute is deleted.
[中]删除数据集中给定类型的所有属性。在删除属性之前,将执行属性信息的深度复制。

代码示例

代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Deletes all string attributes in the dataset. A deep copy of the attribute
 * information is performed before an attribute is deleted.
 * 
 * @throws IllegalArgumentException if string attribute couldn't be
 *           successfully deleted (probably because it is the class
 *           attribute).
 * @see #deleteAttributeType(int)
 */
public void deleteStringAttributes() {
 deleteAttributeType(Attribute.STRING);
}

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

/**
 * Deletes all string attributes in the dataset. A deep copy of the attribute
 * information is performed before an attribute is deleted.
 * 
 * @throws IllegalArgumentException if string attribute couldn't be
 *           successfully deleted (probably because it is the class
 *           attribute).
 * @see #deleteAttributeType(int)
 */
public void deleteStringAttributes() {
 deleteAttributeType(Attribute.STRING);
}

代码示例来源:origin: com.googlecode.obvious/obviousx-weka

@Override
public void deleteAttributeType(int attType) {
 super.deleteAttributeType(attType);
}

代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Called by JUnit before each test method. This implementation creates
 * the default filter to test and loads a test set of Instances.
 *
 * @throws Exception if an error occurs reading the example instances.
 */
protected void setUp() throws Exception {
 super.setUp();
 
 m_Instances.deleteAttributeType(Attribute.STRING);
 m_Instances.deleteAttributeType(Attribute.RELATIONAL);
}

代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Called by JUnit before each test method. This implementation creates
 * the default filter to test and loads a test set of Instances.
 *
 * @throws Exception if an error occurs reading the example instances.
 */
protected void setUp() throws Exception {
 super.setUp();
 
 m_Instances.deleteAttributeType(Attribute.STRING);
 m_Instances.deleteAttributeType(Attribute.RELATIONAL);
}

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

/**
 * Called by JUnit before each test method. This implementation creates
 * the default filter to test and loads a test set of Instances.
 *
 * @throws Exception if an error occurs reading the example instances.
 */
protected void setUp() throws Exception {
 super.setUp();
 
 m_Instances.deleteAttributeType(Attribute.STRING);
 m_Instances.deleteAttributeType(Attribute.RELATIONAL);
}

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

/**
 * Called by JUnit before each test method. This implementation creates
 * the default filter to test and loads a test set of Instances.
 *
 * @throws Exception if an error occurs reading the example instances.
 */
protected void setUp() throws Exception {
 super.setUp();
 
 m_Instances.deleteAttributeType(Attribute.STRING);
 m_Instances.deleteAttributeType(Attribute.RELATIONAL);
}

代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable

protected void setUp() throws Exception {
 super.setUp();
 m_Instances.deleteAttributeType(Attribute.STRING);
 m_Instances.deleteAttributeType(Attribute.DATE);
 m_FilteredClassifier = null;
 m_Instances.setClassIndex(0);
}

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

protected void setUp() throws Exception {
 super.setUp();
 m_Instances.deleteAttributeType(Attribute.STRING);
 m_Instances.deleteAttributeType(Attribute.DATE);
 m_FilteredClassifier = null;
 m_Instances.setClassIndex(0);
}

代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Need to remove non-numeric attributes.
 * 
 * @throws Exception    if something goes wrong in setup
 */
protected void setUp() throws Exception {
 super.setUp();
 m_Instances.deleteAttributeType(Attribute.STRING);
 
 // class index
 m_Instances.setClassIndex(1);
}

代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable

/** Need to remove string attributes, set class index */
protected void setUp() throws Exception {
 super.setUp();
 m_Instances.deleteAttributeType(Attribute.STRING);
 // class index
 m_Instances.setClassIndex(1);
}

代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Called by JUnit before each test method. This implementation creates
 * the default filter to test and loads a test set of Instances.
 *
 * @throws Exception if an error occurs reading the example instances.
 */
protected void setUp() throws Exception {
 super.setUp();
 m_Instances.deleteAttributeType(Attribute.STRING);
 m_Instances.setClassIndex(0);
}

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

/**
 * Called by JUnit before each test method. This implementation creates
 * the default filter to test and loads a test set of Instances.
 *
 * @throws Exception if an error occurs reading the example instances.
 */
protected void setUp() throws Exception {
 super.setUp();
 m_Instances.deleteAttributeType(Attribute.STRING);
 m_Instances.setClassIndex(0);
}

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

/** Need to remove string attributes, set class index */
protected void setUp() throws Exception {
 super.setUp();
 m_Instances.deleteAttributeType(Attribute.STRING);
 // class index
 m_Instances.setClassIndex(1);
}

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

/**
 * Need to remove non-numeric attributes.
 * 
 * @throws Exception    if something goes wrong in setup
 */
protected void setUp() throws Exception {
 super.setUp();
 m_Instances.deleteAttributeType(Attribute.STRING);
 
 // class index
 m_Instances.setClassIndex(1);
}

代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Called by JUnit before each test method. 
 * <p/>
 * Removes all the string attributes and sets the first attribute as class 
 * attribute.
 *
 * @throws Exception     if an error occurs reading the example instances.
 */
@Override
protected void setUp() throws Exception {
 super.setUp();
 
 m_Instances.deleteAttributeType(Attribute.STRING);
 m_Instances.setClassIndex(0);
}

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

/**
 * Called by JUnit before each test method. 
 * <p/>
 * Removes all the string attributes and sets the first attribute as class 
 * attribute.
 *
 * @throws Exception     if an error occurs reading the example instances.
 */
@Override
protected void setUp() throws Exception {
 super.setUp();
 
 m_Instances.deleteAttributeType(Attribute.STRING);
 m_Instances.setClassIndex(0);
}

相关文章

Instances类方法