本文整理了Java中weka.core.Instances.checkForAttributeType()
方法的一些代码示例,展示了Instances.checkForAttributeType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Instances.checkForAttributeType()
方法的具体详情如下:
包路径:weka.core.Instances
类名称: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!");
}
内容来源于网络,如有侵权,请联系作者删除!