当前位置: 首页>>代码示例>>Java>>正文


Java ViewAttribute类代码示例

本文整理汇总了Java中com.rapidminer.example.table.ViewAttribute的典型用法代码示例。如果您正苦于以下问题:Java ViewAttribute类的具体用法?Java ViewAttribute怎么用?Java ViewAttribute使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ViewAttribute类属于com.rapidminer.example.table包,在下文中一共展示了ViewAttribute类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getTargetAttributes

import com.rapidminer.example.table.ViewAttribute; //导入依赖的package包/类
@Override
public Attributes getTargetAttributes(ExampleSet viewParent) {
	SimpleAttributes attributes = new SimpleAttributes();
	// add special attributes to new attributes
	Iterator<AttributeRole> roleIterator = viewParent.getAttributes().allAttributeRoles();
	while (roleIterator.hasNext()) {
		AttributeRole role = roleIterator.next();
		if (role.isSpecial()) {
			attributes.add(role);
		}
	}
	// add regular attributes
	for (Attribute attribute : viewParent.getAttributes()) {
		if (!attribute.isNumerical() || !attributeMeanSigmaMap.containsKey(attribute.getName())) {
			attributes.addRegular(attribute);
		} else {
			// giving new attributes old name: connection to rangesMap
			attributes.addRegular(new ViewAttribute(this, attribute, attribute.getName(), Ontology.NUMERICAL, null));
		}
	}
	return attributes;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:23,代码来源:IQRNormalizationModel.java

示例2: getTargetAttributes

import com.rapidminer.example.table.ViewAttribute; //导入依赖的package包/类
@Override
public Attributes getTargetAttributes(ExampleSet viewParent) {
	SimpleAttributes attributes = new SimpleAttributes();
	// add special attributes to new attributes
	Iterator<AttributeRole> roleIterator = viewParent.getAttributes().allAttributeRoles();
	while (roleIterator.hasNext()) {
		AttributeRole role = roleIterator.next();
		if (role.isSpecial()) {
			attributes.add(role);
		}
	}
	// add regular attributes
	for (Attribute attribute : viewParent.getAttributes()) {
		if (!attribute.isNumerical() || !attributeMeanVarianceMap.containsKey(attribute.getName())) {
			attributes.addRegular(attribute);
		} else {
			// giving new attributes old name: connection to rangesMap
			attributes.addRegular(new ViewAttribute(this, attribute, attribute.getName(), Ontology.NUMERICAL, null));
		}
	}
	return attributes;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:23,代码来源:ZTransformationModel.java

示例3: getTargetAttributes

import com.rapidminer.example.table.ViewAttribute; //导入依赖的package包/类
@Override
public Attributes getTargetAttributes(ExampleSet viewParent) {
	SimpleAttributes attributes = new SimpleAttributes();
	// add special attributes to new attributes
	Iterator<AttributeRole> roleIterator = viewParent.getAttributes().allAttributeRoles();
	while (roleIterator.hasNext()) {
		AttributeRole role = roleIterator.next();
		if (role.isSpecial()) {
			attributes.add(role);
		}
	}
	// add regular attributes
	for (Attribute attribute : viewParent.getAttributes()) {
		if (!attribute.isNumerical() || !attributeNames.contains(attribute.getName())) {
			attributes.addRegular(attribute);
		} else {
			// giving new attributes old name: connection to rangesMap
			attributes.addRegular(new ViewAttribute(this, attribute, attribute.getName(), Ontology.NUMERICAL, null));
		}
	}
	return attributes;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:23,代码来源:MinMaxNormalizationModel.java

示例4: getTargetAttributes

import com.rapidminer.example.table.ViewAttribute; //导入依赖的package包/类
@Override
public Attributes getTargetAttributes(ExampleSet viewParent) {
	SimpleAttributes attributes = new SimpleAttributes();
	// add special attributes to new attributes
	Iterator<AttributeRole> roleIterator = viewParent.getAttributes().allAttributeRoles();
	while (roleIterator.hasNext()) {
		AttributeRole role = roleIterator.next();
		if (role.isSpecial()) {
			attributes.add(role);
		}
	}
	// add regular attributes
	for (Attribute attribute : viewParent.getAttributes()) {
		if (!attribute.isNumerical() || !attributeTransformations.containsKey(attribute.getName())) {
			attributes.addRegular(attribute);
		} else {
			// giving new attributes old name: connection to rangesMap
			attributes.addRegular(new ViewAttribute(this, attribute, attribute.getName(), Ontology.NUMERICAL, null));
		}
	}
	return attributes;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:23,代码来源:DenormalizationModel.java

示例5: getTargetAttributes

import com.rapidminer.example.table.ViewAttribute; //导入依赖的package包/类
@Override
public Attributes getTargetAttributes(ExampleSet viewParent) {
	SimpleAttributes attributes = new SimpleAttributes();
	// add special attributes to new attributes
	Iterator<AttributeRole> roleIterator = viewParent.getAttributes().allAttributeRoles();
	while (roleIterator.hasNext()) {
		AttributeRole role = roleIterator.next();
		if (role.isSpecial()) {
			attributes.add(role);
		}
	}
	// add regular attributes
	for (Attribute attribute : viewParent.getAttributes()) {
		MappingTranslation mappingTranslation = translations.get(attribute.getName());
		if (!attribute.isNominal() || mappingTranslation == null) {
			attributes.addRegular(attribute);
		} else {
			// giving new attributes old name: connection to rangesMap
			attributes.addRegular(new ViewAttribute(this, attribute, attribute.getName(), attribute.getValueType(),
					mappingTranslation.newMapping));
		}
	}
	return attributes;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:25,代码来源:RemoveUnusedNominalValuesModel.java

示例6: getTargetAttributes

import com.rapidminer.example.table.ViewAttribute; //导入依赖的package包/类
public Attributes getTargetAttributes(ExampleSet viewParent) {
	SimpleAttributes attributes = new SimpleAttributes();
	// add special attributes to new attributes
	Iterator<AttributeRole> roleIterator = viewParent.getAttributes().allAttributeRoles();
	while (roleIterator.hasNext()) {
		AttributeRole role = roleIterator.next();
		if (role.isSpecial()) {
			attributes.add(role);
		}
	}
	// add regular attributes
	for (Attribute attribute : viewParent.getAttributes()) {
		if (!attribute.isNumerical() || !attributeMeanSigmaMap.containsKey(attribute.getName())) {
			attributes.addRegular(attribute);
		} else {
			// giving new attributes old name: connection to rangesMap
			attributes.addRegular(new ViewAttribute(this, attribute, attribute.getName(), Ontology.NUMERICAL, null));
		}
	}
	return attributes;
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:22,代码来源:IQRNormalizationModel.java

示例7: getTargetAttributes

import com.rapidminer.example.table.ViewAttribute; //导入依赖的package包/类
@Override
public Attributes getTargetAttributes(ExampleSet viewParent) {
    SimpleAttributes attributes = new SimpleAttributes();
    // add special attributes to new attributes
    Iterator<AttributeRole> roleIterator = viewParent.getAttributes().allAttributeRoles();
    while (roleIterator.hasNext()) {
        AttributeRole role = roleIterator.next();
        if (role.isSpecial()) {
            attributes.add(role);
        }
    }
    // add regular attributes
    for (Attribute attribute: viewParent.getAttributes()) {
        if (!attribute.isNumerical() || !attributeMeanVarianceMap.containsKey(attribute.getName())) {
            attributes.addRegular(attribute);
        } else {
            // giving new attributes old name: connection to rangesMap
            attributes.addRegular(new ViewAttribute(this, attribute, attribute.getName(), Ontology.NUMERICAL, null));
        }
    }
    return attributes;
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:23,代码来源:ZTransformationModel.java

示例8: getTargetAttributes

import com.rapidminer.example.table.ViewAttribute; //导入依赖的package包/类
public Attributes getTargetAttributes(ExampleSet viewParent) {
	SimpleAttributes attributes = new SimpleAttributes();
	// add special attributes to new attributes
	Iterator<AttributeRole> roleIterator = viewParent.getAttributes().allAttributeRoles();
	while (roleIterator.hasNext()) {
		AttributeRole role = roleIterator.next();
		if (role.isSpecial()) {
			attributes.add(role);
		}
	}
	// add regular attributes
	for (Attribute attribute: viewParent.getAttributes()) {
		if (!attribute.isNumerical() || !attributeNames.contains(attribute.getName())) {
			attributes.addRegular(attribute);
		} else {
			// giving new attributes old name: connection to rangesMap
			attributes.addRegular(new ViewAttribute(this, attribute, attribute.getName(), Ontology.NUMERICAL, null));
		}
	}
	return attributes;
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:22,代码来源:MinMaxNormalizationModel.java

示例9: getTargetAttributes

import com.rapidminer.example.table.ViewAttribute; //导入依赖的package包/类
@Override
public Attributes getTargetAttributes(ExampleSet viewParent) {
    SimpleAttributes attributes = new SimpleAttributes();
    // add special attributes to new attributes
    Iterator<AttributeRole> roleIterator = viewParent.getAttributes().allAttributeRoles();
    while (roleIterator.hasNext()) {
        AttributeRole role = roleIterator.next();
        if (role.isSpecial()) {
            attributes.add(role);
        }
    }
    // add regular attributes
    for (Attribute attribute : viewParent.getAttributes()) {
        if (!attribute.isNumerical() || !attributeTransformations.containsKey(attribute.getName())) {
            attributes.addRegular(attribute);
        } else {
            // giving new attributes old name: connection to rangesMap
            attributes.addRegular(new ViewAttribute(this, attribute, attribute.getName(), Ontology.NUMERICAL, null));
        }
    }
    return attributes;
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:23,代码来源:DenormalizationModel.java

示例10: getTargetAttributes

import com.rapidminer.example.table.ViewAttribute; //导入依赖的package包/类
@Override
public Attributes getTargetAttributes(ExampleSet viewParent) {
    SimpleAttributes attributes = new SimpleAttributes();
    // add special attributes to new attributes
    Iterator<AttributeRole> roleIterator = viewParent.getAttributes().allAttributeRoles();
    while (roleIterator.hasNext()) {
        AttributeRole role = roleIterator.next();
        if (role.isSpecial()) {
            attributes.add(role);
        }
    }
    // add regular attributes
    for (Attribute attribute : viewParent.getAttributes()) {
        MappingTranslation mappingTranslation = translations.get(attribute.getName());
        if (!attribute.isNominal() || mappingTranslation == null) {
            attributes.addRegular(attribute);
        } else {
            // giving new attributes old name: connection to rangesMap
            attributes.addRegular(new ViewAttribute(this, attribute, attribute.getName(), attribute.getValueType(), mappingTranslation.newMapping));
        }
    }
    return attributes;
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:24,代码来源:RemoveUnusedNominalValuesModel.java

示例11: getTargetAttributes

import com.rapidminer.example.table.ViewAttribute; //导入依赖的package包/类
@Override
public Attributes getTargetAttributes(ExampleSet parentSet) {
	SimpleAttributes attributes = new SimpleAttributes();
	// add special attributes to new attributes
	Iterator<AttributeRole> specialRoles = parentSet.getAttributes().specialAttributes();
	while (specialRoles.hasNext()) {
		attributes.add(specialRoles.next());
	}

	// add regular attributes
	for (Attribute attribute : parentSet.getAttributes()) {
		if (!attribute.isNumerical() || !attributeNames.contains(attribute.getName())) {
			attributes.addRegular(attribute);
		} else {
			// create nominal mapping
			SortedSet<Tupel<Double, String>> ranges = rangesMap.get(attribute.getName());
			if (ranges.size() > 1) {
				NominalMapping mapping = new PolynominalMapping();
				for (Tupel<Double, String> rangePair : ranges) {
					mapping.mapString(rangePair.getSecond());
				}
				// giving new attributes old name: connection to rangesMap
				attributes.addRegular(new ViewAttribute(this, attribute, attribute.getName(), Ontology.POLYNOMINAL,
						mapping));
			}
		}
	}
	return attributes;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:30,代码来源:DiscretizationModel.java

示例12: createBinominalValueAttribute

import com.rapidminer.example.table.ViewAttribute; //导入依赖的package包/类
private Attribute createBinominalValueAttribute(Attribute attribute, String value) {
	NominalMapping mapping = new BinominalMapping();
	mapping.mapString("false");
	mapping.mapString("true");
	// giving new attributes old name_value
	String newName = createAttributeName(attribute.getName(), value);
	Attribute newAttribute = new ViewAttribute(this, attribute, newName, Ontology.BINOMINAL, mapping);
	binominalAttributeValueMap.put(newAttribute, (double) attribute.getMapping().mapString(value));
	return newAttribute;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:11,代码来源:NominalToBinominalModel.java

示例13: getTargetAttributes

import com.rapidminer.example.table.ViewAttribute; //导入依赖的package包/类
@Override
public Attributes getTargetAttributes(ExampleSet parentSet) {
	SimpleAttributes attributes = new SimpleAttributes();
	// add special attributes to new attributes
	Iterator<AttributeRole> specialRoles = parentSet.getAttributes().specialAttributes();
	while (specialRoles.hasNext()) {
		attributes.add(specialRoles.next());
	}

	// add regular attributes
	for (Attribute attribute : parentSet.getAttributes()) {
		if (!attribute.isNumerical() || !attributeNames.contains(attribute.getName())) {
			attributes.addRegular(attribute);
		} else {
			// create nominal mapping
			SortedSet<Tupel<Double, String>> ranges = rangesMap.get(attribute.getName());
			if (ranges.size() > 1) {
				NominalMapping mapping = new PolynominalMapping();
				for (Tupel<Double, String> rangePair : ranges) {
					mapping.mapString(rangePair.getSecond());
				}
				// giving new attributes old name: connection to rangesMap
				attributes.addRegular(
						new ViewAttribute(this, attribute, attribute.getName(), Ontology.POLYNOMINAL, mapping));
			}
		}
	}
	return attributes;
}
 
开发者ID:rapidminer,项目名称:rapidminer-studio,代码行数:30,代码来源:DiscretizationModel.java

示例14: getTargetAttributes

import com.rapidminer.example.table.ViewAttribute; //导入依赖的package包/类
public Attributes getTargetAttributes(ExampleSet parentSet) {
	SimpleAttributes attributes = new SimpleAttributes();
	// add special attributes to new attributes
	Iterator<AttributeRole> specialRoles = parentSet.getAttributes().specialAttributes();
	while (specialRoles.hasNext()) {
		attributes.add(specialRoles.next());
	}
	
	// add regular attributes
	for (Attribute attribute : parentSet.getAttributes()) {
		if (!attribute.isNumerical() || !attributeNames.contains(attribute.getName())) {
			attributes.addRegular(attribute);
		} else {
			// create nominal mapping
			SortedSet<Tupel<Double, String>> ranges = rangesMap.get(attribute.getName());
			if (ranges.size() > 1) {
				NominalMapping mapping = new PolynominalMapping();
				for (Tupel<Double, String> rangePair : ranges) {
					mapping.mapString(rangePair.getSecond());
				}
				// giving new attributes old name: connection to rangesMap
				attributes.addRegular(new ViewAttribute(this, attribute, attribute.getName(), Ontology.POLYNOMINAL, mapping));
			}
		}
	}
	return attributes;
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:28,代码来源:DiscretizationModel.java

示例15: getTargetAttributes

import com.rapidminer.example.table.ViewAttribute; //导入依赖的package包/类
@Override
public Attributes getTargetAttributes(ExampleSet parentSet) {
	SimpleAttributes attributes = new SimpleAttributes();
	// add special attributes to new attributes
	Iterator<AttributeRole> specialRoles = parentSet.getAttributes().specialAttributes();
	while (specialRoles.hasNext()) {
		AttributeRole role = specialRoles.next();
		if (role.getSpecialName().equals(Attributes.LABEL_NAME) && labelNoise != 0d) {
			AttributeRole clonedRole = (AttributeRole) role.clone();
			viewLabelParent = role.getAttribute();
			viewLabel = new ViewAttribute(this, viewLabelParent, viewLabelParent.getName(), viewLabelParent.getValueType(), (viewLabelParent.isNominal()) ? viewLabelParent.getMapping() : null); 
			clonedRole.setAttribute(viewLabel);
			attributes.add(clonedRole);
		} else {
			attributes.add(specialRoles.next());
		}
	}

	// add regular attributes
	Iterator<AttributeRole> i = parentSet.getAttributes().allAttributeRoles();
	while (i.hasNext()) {
		AttributeRole attributeRole = i.next();
		if (!attributeRole.isSpecial()) {
			Attribute attribute = attributeRole.getAttribute();
			if (attribute.isNumerical()) {
				attributes.addRegular(new ViewAttribute(this, attribute, attribute.getName(), Ontology.REAL, null));
			} else {
				attributes.add(attributeRole);
			}
		}
	}

	// add new noise attributes
	for (String name: noiseAttributeNames) {
		Attribute viewAttribute = new ViewAttribute(this, null, name, Ontology.REAL, null);
		attributes.addRegular(viewAttribute);
		noiseAttributes.add(viewAttribute);
	}
	return attributes;
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:41,代码来源:NoiseModel.java


注:本文中的com.rapidminer.example.table.ViewAttribute类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。