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


Java HeaderExampleSet类代码示例

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


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

示例1: toString

import com.rapidminer.example.set.HeaderExampleSet; //导入依赖的package包/类
@Override
public String toString() {
	StringBuffer buffer = new StringBuffer();
	HeaderExampleSet header = getTrainingHeader();
	Attribute label = header.getAttributes().getLabel();

	if (label.isNominal()) {
		buffer.append("Using the majority of the following attributes for prediction:" + Tools.getLineSeparator());
	} else {
		buffer.append("Using the avarage of the following attributes for prediction:" + Tools.getLineSeparator());
	}

	for (Attribute attribute : header.getAttributes()) {
		if (attribute.isNominal() && label.isNominal() || attribute.isNumerical() && label.isNumerical()) {
			buffer.append("  " + attribute.getName() + Tools.getLineSeparator());
		}
	}

	buffer.append(Tools.getLineSeparator());
	if (label.isNominal()) {
		buffer.append("The default value is " + label.getMapping().mapIndex((int) majorityVote));
	}
	return buffer.toString();
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:25,代码来源:AttributeBasedVotingModel.java

示例2: toString

import com.rapidminer.example.set.HeaderExampleSet; //导入依赖的package包/类
@Override
public String toString() {
	StringBuffer buffer = new StringBuffer();
	HeaderExampleSet header = getTrainingHeader();
	Attribute label = header.getAttributes().getLabel();

	if (label.isNominal())
		buffer.append("Using the majority of the following attributes for prediction:" + Tools.getLineSeparator());
	else
		buffer.append("Using the avarage of the following attributes for prediction:" + Tools.getLineSeparator());

	for (Attribute attribute: header.getAttributes()) {
		if (attribute.isNominal() && label.isNominal() || attribute.isNumerical() && label.isNumerical()) {
			buffer.append("  " + attribute.getName() + Tools.getLineSeparator());
		}
	}

	buffer.append(Tools.getLineSeparator());
	if (label.isNominal())
		buffer.append("The default value is " + label.getMapping().mapIndex((int)majorityVote));
	return buffer.toString();
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:23,代码来源:AttributeBasedVotingModel.java

示例3: getTrainingHeader

import com.rapidminer.example.set.HeaderExampleSet; //导入依赖的package包/类
/**
 * Delivers the training header example set, i.e. the header of the example set (without data
 * reference) which was used for creating this model. Might return null.
 */
@Override
public HeaderExampleSet getTrainingHeader() {
	return this.headerExampleSet;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:9,代码来源:AbstractModel.java

示例4: AbstractModel

import com.rapidminer.example.set.HeaderExampleSet; //导入依赖的package包/类
/** Created a new model which was built on the given example set. Please note
 *  that the given example set is automatically transformed into a {@link HeaderExampleSet}
 *  which means that no reference to the data itself is kept but only to the header, i.e.
 *  to the attribute meta descriptions. */
protected AbstractModel(ExampleSet exampleSet) {
	if (exampleSet != null) {
		this.headerExampleSet = new HeaderExampleSet(exampleSet);
	}
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:10,代码来源:AbstractModel.java

示例5: getTrainingHeader

import com.rapidminer.example.set.HeaderExampleSet; //导入依赖的package包/类
/** Delivers the training header example set, i.e. the header of the example set (without
 *  data reference) which was used for creating this model. Might return null. */
public HeaderExampleSet getTrainingHeader() {
	return this.headerExampleSet;
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:6,代码来源:AbstractModel.java

示例6: getTrainingHeader

import com.rapidminer.example.set.HeaderExampleSet; //导入依赖的package包/类
/**
 * This method has to return the HeaderExampleSet containing the signature of the example set
 * during training time containing all informations about attributes. This is important for
 * checking the compatibility of the examples on application time. Note that the AbstractModel
 * already implements all necessary functionality.
 */
public HeaderExampleSet getTrainingHeader();
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:8,代码来源:Model.java

示例7: AbstractModel

import com.rapidminer.example.set.HeaderExampleSet; //导入依赖的package包/类
/**
 * Created a new model which was built on the given example set. Please note that the given
 * example set is automatically transformed into a {@link HeaderExampleSet} which means that no
 * reference to the data itself is kept but only to the header, i.e. to the attribute meta
 * descriptions.
 */
protected AbstractModel(IExampleSet exampleSet) {
	if (exampleSet != null) {
		this.headerExampleSet = new HeaderExampleSet((ExampleSet)exampleSet);
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:12,代码来源:AbstractModel.java

示例8: AbstractModel

import com.rapidminer.example.set.HeaderExampleSet; //导入依赖的package包/类
/**
 * Created a new model which was built on the given example set. Please note that the given
 * example set is automatically transformed into a {@link HeaderExampleSet} which means that no
 * reference to the data itself is kept but only to the header, i.e. to the attribute meta
 * descriptions.
 */
protected AbstractModel(ExampleSet exampleSet) {
	if (exampleSet != null) {
		this.headerExampleSet = new HeaderExampleSet(exampleSet);
	}
}
 
开发者ID:rapidminer,项目名称:rapidminer-studio,代码行数:12,代码来源:AbstractModel.java

示例9: getTrainingHeader

import com.rapidminer.example.set.HeaderExampleSet; //导入依赖的package包/类
/**
 * This method has to return the HeaderExampleSet containing the signature of the example
 * set during training time containing all informations about attributes. This is important for
 * checking the compatibility of the examples on application time.
 * Note that the AbstractModel already implements all necessary functionality.
 */
public HeaderExampleSet getTrainingHeader();
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:8,代码来源:Model.java


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