本文整理汇总了Java中com.rapidminer.operator.learner.SimplePredictionModel类的典型用法代码示例。如果您正苦于以下问题:Java SimplePredictionModel类的具体用法?Java SimplePredictionModel怎么用?Java SimplePredictionModel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SimplePredictionModel类属于com.rapidminer.operator.learner包,在下文中一共展示了SimplePredictionModel类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: toString
import com.rapidminer.operator.learner.SimplePredictionModel; //导入依赖的package包/类
@Override
public String toString() {
StringBuilder buffer = new StringBuilder();
int i = 1;
for (SimplePredictionModel model : models) {
buffer.append(i);
buffer.append(") ");
buffer.append(model.getName());
buffer.append(Tools.getLineSeparator());
buffer.append("---");
buffer.append(Tools.getLineSeparator());
buffer.append(model.toString());
buffer.append(Tools.getLineSeparators(2));
i++;
}
return buffer.toString();
}
示例2: getModelNames
import com.rapidminer.operator.learner.SimplePredictionModel; //导入依赖的package包/类
@Override
public List<String> getModelNames() {
List<String> names = new ArrayList<>(models.size());
for (SimplePredictionModel model : models) {
names.add(model.getName());
}
return names;
}
示例3: SimpleVoteModel
import com.rapidminer.operator.learner.SimplePredictionModel; //导入依赖的package包/类
public SimpleVoteModel(ExampleSet exampleSet, List<? extends SimplePredictionModel> baseModels) {
super(exampleSet, ExampleSetUtilities.SetsCompareOption.EQUAL,
ExampleSetUtilities.TypesCompareOption.ALLOW_SAME_PARENTS);
this.baseModels = baseModels;
labelIsNominal = getLabel().isNominal();
if (labelIsNominal) {
labelIndices = new LinkedList<>();
NominalMapping mapping = getLabel().getMapping();
List<String> mappingValues = mapping.getValues();
for (String value : mappingValues) {
double index = mapping.getIndex(value);
labelIndices.add(index);
}
}
}
示例4: toString
import com.rapidminer.operator.learner.SimplePredictionModel; //导入依赖的package包/类
@Override
public String toString() {
StringBuffer buffer = new StringBuffer();
int i = 0;
for (SimplePredictionModel model : baseModels) {
buffer.append("Model " + i + ":" + Tools.getLineSeparator());
buffer.append("---" + Tools.getLineSeparator());
buffer.append(model.toString());
buffer.append(Tools.getLineSeparators(2));
i++;
}
return buffer.toString();
}
示例5: SimpleVoteModel
import com.rapidminer.operator.learner.SimplePredictionModel; //导入依赖的package包/类
public SimpleVoteModel(ExampleSet exampleSet, List<? extends SimplePredictionModel> baseModels) {
super(exampleSet);
this.baseModels = baseModels;
labelIsNominal = getLabel().isNominal();
if (labelIsNominal) {
labelIndices = new LinkedList<Double>();
NominalMapping mapping = getLabel().getMapping();
List<String> mappingValues = mapping.getValues();
for (String value : mappingValues) {
double index = mapping.getIndex(value);
labelIndices.add(index);
}
}
}
示例6: ConfidenceVoteModel
import com.rapidminer.operator.learner.SimplePredictionModel; //导入依赖的package包/类
/**
* Creates a new {@link MetaModel} with confidence based voting for the given example set and
* models.
*
* @param exampleSet
* the example set
* @param models
* the voting models
* @throws IllegalArgumentException
* if the given example set's label is not nominal
*/
public ConfidenceVoteModel(ExampleSet exampleSet, List<? extends SimplePredictionModel> models) {
super(exampleSet, ExampleSetUtilities.SetsCompareOption.EQUAL,
ExampleSetUtilities.TypesCompareOption.ALLOW_SAME_PARENTS);
if (!getLabel().isNominal()) {
throw new IllegalArgumentException("Label must be nominal.");
}
this.models = models;
}