本文整理汇总了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();
}
示例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();
}
示例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;
}
示例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);
}
}
示例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;
}
示例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();
示例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);
}
}
示例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);
}
}
示例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();