本文整理汇总了Java中com.rapidminer.operator.features.Individual.getPerformance方法的典型用法代码示例。如果您正苦于以下问题:Java Individual.getPerformance方法的具体用法?Java Individual.getPerformance怎么用?Java Individual.getPerformance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.rapidminer.operator.features.Individual
的用法示例。
在下文中一共展示了Individual.getPerformance方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isDominated
import com.rapidminer.operator.features.Individual; //导入方法依赖的package包/类
/**
* Returns true if the second performance vector is better in all fitness criteria than the
* first one (remember: the criteria should be maximized).
*/
public static boolean isDominated(Individual i1, Individual i2) {
PerformanceVector pv1 = i1.getPerformance();
PerformanceVector pv2 = i2.getPerformance();
double[][] performances = new double[pv1.getSize()][2];
for (int p = 0; p < performances.length; p++) {
performances[p][0] = pv1.getCriterion(p).getFitness();
performances[p][1] = pv2.getCriterion(p).getFitness();
}
boolean dominated = true;
for (int p = 0; p < performances.length; p++) {
dominated &= (performances[p][1] >= performances[p][0]);
}
boolean oneActuallyBetter = false;
for (int p = 0; p < performances.length; p++) {
oneActuallyBetter |= (performances[p][1] > performances[p][0]);
}
dominated &= oneActuallyBetter;
return dominated;
}
示例2: IndividualSelectorTableModel
import com.rapidminer.operator.features.Individual; //导入方法依赖的package包/类
public IndividualSelectorTableModel(String[] attributeNames, Population population) {
this.attributeNames = attributeNames;
this.population = population;
if (population.getNumberOfIndividuals() > 0) {
columnNames.add("Index");
columnNames.add("Features");
columnNames.add("Names");
Individual individual = population.get(0);
PerformanceVector performanceVector = individual.getPerformance();
for (int i = 0; i < performanceVector.getSize(); i++) {
PerformanceCriterion criterion = performanceVector.getCriterion(i);
columnNames.add(criterion.getName());
}
}
}
示例3: isDominated
import com.rapidminer.operator.features.Individual; //导入方法依赖的package包/类
/**
* Returns true if the second performance vector is better in all fitness
* criteria than the first one (remember: the criteria should be maximized).
*/
public static boolean isDominated(Individual i1, Individual i2) {
PerformanceVector pv1 = i1.getPerformance();
PerformanceVector pv2 = i2.getPerformance();
double[][] performances = new double[pv1.getSize()][2];
for (int p = 0; p < performances.length; p++) {
performances[p][0] = pv1.getCriterion(p).getFitness();
performances[p][1] = pv2.getCriterion(p).getFitness();
}
boolean dominated = true;
for (int p = 0; p < performances.length; p++) {
dominated &= (performances[p][1] >= performances[p][0]);
}
boolean oneActuallyBetter = false;
for (int p = 0; p < performances.length; p++) {
oneActuallyBetter |= (performances[p][1] > performances[p][0]);
}
dominated &= oneActuallyBetter;
return dominated;
}
示例4: IndividualSelectorTableModel
import com.rapidminer.operator.features.Individual; //导入方法依赖的package包/类
public IndividualSelectorTableModel(String[] attributeNames, Population population) {
this.attributeNames = attributeNames;
this.population = population;
if (population.getNumberOfIndividuals() > 0) {
columnNames.add("Index");
columnNames.add("Features");
columnNames.add("Names");
Individual individual = population.get(0);
PerformanceVector performanceVector = individual.getPerformance();
for (int i = 0; i < performanceVector.getSize(); i++) {
PerformanceCriterion criterion = performanceVector.getCriterion(i);
columnNames.add(criterion.getName());
}
}
}
示例5: compare
import com.rapidminer.operator.features.Individual; //导入方法依赖的package包/类
@Override
public int compare(Individual i1, Individual i2) {
PerformanceVector pv1 = i1.getPerformance();
PerformanceVector pv2 = i2.getPerformance();
return (-1) * Double.compare(pv1.getCriterion(m).getFitness(), pv2.getCriterion(m).getFitness());
}
示例6: compare
import com.rapidminer.operator.features.Individual; //导入方法依赖的package包/类
public int compare(Individual i1, Individual i2) {
PerformanceVector pv1 = i1.getPerformance();
PerformanceVector pv2 = i2.getPerformance();
return (-1) * Double.compare(pv1.getCriterion(m).getFitness(), pv2.getCriterion(m).getFitness());
}