本文整理汇总了Java中com.rapidminer.tools.math.ROCData.getInterpolatedTruePositives方法的典型用法代码示例。如果您正苦于以下问题:Java ROCData.getInterpolatedTruePositives方法的具体用法?Java ROCData.getInterpolatedTruePositives怎么用?Java ROCData.getInterpolatedTruePositives使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.rapidminer.tools.math.ROCData
的用法示例。
在下文中一共展示了ROCData.getInterpolatedTruePositives方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: prepareData
import com.rapidminer.tools.math.ROCData; //导入方法依赖的package包/类
protected void prepareData() {
this.dataset = new YIntervalSeriesCollection();
Iterator<Map.Entry<String, List<ROCData>>> r = rocDataLists.entrySet().iterator();
boolean showThresholds = true;
if (rocDataLists.size() > 1) {
showThresholds = false;
}
while (r.hasNext()) {
Map.Entry<String, List<ROCData>> entry = r.next();
YIntervalSeries rocSeries = new YIntervalSeries(entry.getKey());
YIntervalSeries thresholdSeries = new YIntervalSeries(entry.getKey() + " (Thresholds)");
List<ROCData> dataList = entry.getValue();
for (int i = 0; i <= NUMBER_OF_POINTS; i++) {
double rocSum = 0.0d;
double rocSquaredSum = 0.0d;
double thresholdSum = 0.0d;
double thresholdSquaredSum = 0.0d;
for (ROCData data : dataList) {
double rocValue = data.getInterpolatedTruePositives(i / (double) NUMBER_OF_POINTS)
/ data.getTotalPositives();
rocSum += rocValue;
rocSquaredSum += rocValue * rocValue;
double thresholdValue = data.getInterpolatedThreshold(i / (double) NUMBER_OF_POINTS);
thresholdSum += thresholdValue;
thresholdSquaredSum += thresholdValue * thresholdValue;
}
double rocMean = rocSum / dataList.size();
double rocDeviation = Math.sqrt(rocSquaredSum / dataList.size() - (rocMean * rocMean));
rocSeries.add(i / (double) NUMBER_OF_POINTS, rocMean, rocMean - rocDeviation, rocMean + rocDeviation);
double thresholdMean = thresholdSum / dataList.size();
double thresholdDeviation = Math.sqrt(thresholdSquaredSum / dataList.size()
- (thresholdMean * thresholdMean));
thresholdSeries.add(i / (double) NUMBER_OF_POINTS, thresholdMean, thresholdMean - thresholdDeviation,
thresholdMean + thresholdDeviation);
}
dataset.addSeries(rocSeries);
if (showThresholds) {
dataset.addSeries(thresholdSeries);
}
}
}
示例2: prepareData
import com.rapidminer.tools.math.ROCData; //导入方法依赖的package包/类
private void prepareData() {
this.dataset = new YIntervalSeriesCollection();
Iterator<Map.Entry<String, List<ROCData>>> r = rocDataLists.entrySet().iterator();
boolean showThresholds = true;
if (rocDataLists.size() > 1) {
showThresholds = false;
}
while (r.hasNext()) {
Map.Entry<String, List<ROCData>> entry = r.next();
YIntervalSeries rocSeries = new YIntervalSeries(entry.getKey());
YIntervalSeries thresholdSeries = new YIntervalSeries(entry.getKey() + " (Thresholds)");
List<ROCData> dataList = entry.getValue();
for (int i = 0; i <= NUMBER_OF_POINTS; i++) {
double rocSum = 0.0d;
double rocSquaredSum = 0.0d;
double thresholdSum = 0.0d;
double thresholdSquaredSum = 0.0d;
for (ROCData data : dataList) {
double rocValue = data.getInterpolatedTruePositives(i / (double) NUMBER_OF_POINTS)
/ data.getTotalPositives();
rocSum += rocValue;
rocSquaredSum += rocValue * rocValue;
double thresholdValue = data.getInterpolatedThreshold(i / (double) NUMBER_OF_POINTS);
thresholdSum += thresholdValue;
thresholdSquaredSum += thresholdValue * thresholdValue;
}
double rocMean = rocSum / dataList.size();
double rocDeviation = Math.sqrt(rocSquaredSum / dataList.size() - (rocMean * rocMean));
rocSeries.add(i / (double) NUMBER_OF_POINTS, rocMean, rocMean - rocDeviation, rocMean + rocDeviation);
double thresholdMean = thresholdSum / dataList.size();
double thresholdDeviation = Math.sqrt(thresholdSquaredSum / dataList.size()
- (thresholdMean * thresholdMean));
thresholdSeries.add(i / (double) NUMBER_OF_POINTS, thresholdMean, thresholdMean - thresholdDeviation,
thresholdMean + thresholdDeviation);
}
dataset.addSeries(rocSeries);
if (showThresholds) {
dataset.addSeries(thresholdSeries);
}
}
}
示例3: prepareData
import com.rapidminer.tools.math.ROCData; //导入方法依赖的package包/类
private void prepareData() {
this.dataset = new YIntervalSeriesCollection();
Iterator<Map.Entry<String, List<ROCData>>> r = rocDataLists.entrySet().iterator();
boolean showThresholds = true;
if (rocDataLists.size() > 1)
showThresholds = false;
while (r.hasNext()) {
Map.Entry<String, List<ROCData>> entry = r.next();
YIntervalSeries rocSeries = new YIntervalSeries(entry.getKey());
YIntervalSeries thresholdSeries = new YIntervalSeries(entry.getKey() + " (Thresholds)");
List<ROCData> dataList = entry.getValue();
for (int i = 0; i <= NUMBER_OF_POINTS; i++) {
double rocSum = 0.0d;
double rocSquaredSum = 0.0d;
double thresholdSum = 0.0d;
double thresholdSquaredSum = 0.0d;
for (ROCData data : dataList) {
double rocValue = data.getInterpolatedTruePositives(i / (double)NUMBER_OF_POINTS) / data.getTotalPositives();
rocSum += rocValue;
rocSquaredSum += rocValue * rocValue;
double thresholdValue = data.getInterpolatedThreshold(i / (double)NUMBER_OF_POINTS);
thresholdSum += thresholdValue;
thresholdSquaredSum += thresholdValue * thresholdValue;
}
double rocMean = rocSum / dataList.size();
double rocDeviation = Math.sqrt(rocSquaredSum / dataList.size() - (rocMean * rocMean));
rocSeries.add(i / (double)NUMBER_OF_POINTS, rocMean, rocMean - rocDeviation, rocMean + rocDeviation);
double thresholdMean = thresholdSum / dataList.size();
double thresholdDeviation = Math.sqrt(thresholdSquaredSum / dataList.size() - (thresholdMean * thresholdMean));
thresholdSeries.add(i / (double)NUMBER_OF_POINTS, thresholdMean, thresholdMean - thresholdDeviation, thresholdMean + thresholdDeviation);
}
dataset.addSeries(rocSeries);
if (showThresholds)
dataset.addSeries(thresholdSeries);
}
}