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

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

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

Instances.checkForAttributeType介绍

[英]Checks for attributes of the given type in the dataset
[中]检查数据集中给定类型的属性

代码示例

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

/**
 * Checks for string attributes in the dataset
 * 
 * @return true if string attributes are present, false otherwise
 */
public/* @pure@ */boolean checkForStringAttributes() {
 return checkForAttributeType(Attribute.STRING);
}

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

/**
 * Checks for string attributes in the dataset
 * 
 * @return true if string attributes are present, false otherwise
 */
public/* @pure@ */boolean checkForStringAttributes() {
 return checkForAttributeType(Attribute.STRING);
}

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

if (header.checkForAttributeType(Attribute.DATE)) {
 result += "\n" + dateBuilder.toString();
if (header.checkForAttributeType(Attribute.NUMERIC)) {
 result += "\n" + numericBuilder.toString();
if (header.checkForAttributeType(Attribute.STRING)) {
 result += "\n" + stringBuilder.toString();
if (header.checkForAttributeType(Attribute.NOMINAL)) {
 result += "\n" + nominalBuilder.toString();

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

public void testTypical() {
 Instances result = useFilter();
 // Number of attributes and instances shouldn't change
 assertEquals(m_Instances.numAttributes(), result.numAttributes());
 assertEquals(m_Instances.numInstances(), result.numInstances());
 // no date and numeric attributes should remain
 if (result.checkForAttributeType(Attribute.DATE))
  fail("Date attribute(s) left over!");
 if (result.checkForAttributeType(Attribute.NUMERIC))
  fail("Numeric attribute(s) left over!");
}

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

public void testTypical() {
 Instances result = useFilter();
 // Number of attributes and instances shouldn't change
 assertEquals(m_Instances.numAttributes(), result.numAttributes());
 assertEquals(m_Instances.numInstances(), result.numInstances());
 // no date and numeric attributes should remain
 if (result.checkForAttributeType(Attribute.DATE))
  fail("Date attribute(s) left over!");
 if (result.checkForAttributeType(Attribute.NUMERIC))
  fail("Numeric attribute(s) left over!");
}

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

public void testTypical() {
 Instances result = useFilter();
 // Number of attributes and instances shouldn't change
 assertEquals(m_Instances.numAttributes(), result.numAttributes());
 assertEquals(m_Instances.numInstances(), result.numInstances());
 // no date attributes should remain
 if (result.checkForAttributeType(Attribute.DATE))
  fail("Date attribute(s) left over!");
}

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

public void testTypical() {
 Instances result = useFilter();
 // Number of attributes and instances shouldn't change
 assertEquals(m_Instances.numAttributes(), result.numAttributes());
 assertEquals(m_Instances.numInstances(), result.numInstances());
 // no numeric attributes should remain
 if (result.checkForAttributeType(Attribute.NUMERIC))
  fail("Numeric attribute(s) left over!");
}

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

public void testTypical() {
 Instances result = useFilter();
 // Number of attributes and instances shouldn't change
 assertEquals(m_Instances.numAttributes(), result.numAttributes());
 assertEquals(m_Instances.numInstances(), result.numInstances());
 // no numeric attributes should remain
 if (result.checkForAttributeType(Attribute.NUMERIC))
  fail("Numeric attribute(s) left over!");
}

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

public void testTypical() {
 Instances result = useFilter();
 // Number of attributes and instances shouldn't change
 assertEquals(m_Instances.numAttributes(), result.numAttributes());
 assertEquals(m_Instances.numInstances(), result.numInstances());
 // no date attributes should remain
 if (result.checkForAttributeType(Attribute.DATE))
  fail("Date attribute(s) left over!");
}

相关文章

Instances类方法