/** * performs the data extraction and quantification. * * @return a histogram dataset. */ private SimpleHistogramDataset createDataset() { SimpleHistogramDataset set = new SimpleHistogramDataset("empty"); if (targetAttributeName != null) { Extractor extractor = new Extractor(targetAttributeName); double resolution = getResolution(extractor); Statistic statistic = new Statistic(extractor.getDataSet(), resolution); set = new SimpleHistogramDataset(targetAttributeName.getId()); set.setAdjustForBinSize(false); SimpleHistogramBin bin; double[][] his = statistic.getHistogramValues(); double x_start, x_end; int count = 0; for (int i = 0; i < his.length; i++) { x_start = his[i][0]; x_end = his[i][0] + resolution; count = (int) his[i][1]; bin = new SimpleHistogramBin(x_start, x_end, true, false); bin.setItemCount(count); set.addBin(bin); } } return set; }