当前位置: 首页>>代码示例>>Java>>正文


Java ROCData.getTotalPositives方法代码示例

本文整理汇总了Java中com.rapidminer.tools.math.ROCData.getTotalPositives方法的典型用法代码示例。如果您正苦于以下问题:Java ROCData.getTotalPositives方法的具体用法?Java ROCData.getTotalPositives怎么用?Java ROCData.getTotalPositives使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.rapidminer.tools.math.ROCData的用法示例。


在下文中一共展示了ROCData.getTotalPositives方法的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);
			}
		}
	}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:51,代码来源:ROCChartPlotter.java

示例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);
			}
		}
	}
 
开发者ID:rapidminer,项目名称:rapidminer-studio,代码行数:51,代码来源:ROCChartPlotter.java

示例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);
      }
  }
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:48,代码来源:ROCChartPlotter.java


注:本文中的com.rapidminer.tools.math.ROCData.getTotalPositives方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。