當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。