/** * Gets the bin ranges string for an attribute * * @param attributeIndex the index (from 0) of the attribute to get the bin * ranges string of * @return the bin ranges string (or null if the attribute requested has been * discretized into only one interval.) */ public String getBinRangesString(int attributeIndex) { if (m_CutPoints == null) { return null; } double[] cutPoints = m_CutPoints[attributeIndex]; if (cutPoints == null) { return "All"; } StringBuilder sb = new StringBuilder(); boolean first = true; for (int j = 0, n = cutPoints.length; j <= n; ++j) { if (first) { first = false; } else { sb.append(','); } sb.append(binRangeString(cutPoints, j, getBinRangePrecision())); } return sb.toString(); }
/** * Gets the bin ranges string for an attribute * * @param attributeIndex the index (from 0) of the attribute to get the bin * ranges string of * @return the bin ranges string (or null if the attribute requested has been * discretized into only one interval.) */ public String getBinRangesString(int attributeIndex) { if (m_CutPoints == null) { return null; } double[] cutPoints = m_CutPoints[attributeIndex]; if (cutPoints == null) { return "All"; } StringBuilder sb = new StringBuilder(); boolean first = true; for (int j = 0, n = cutPoints.length; j <= n; ++j) { if (first) { first = false; } else { sb.append(','); } sb.append(binRangeString(cutPoints, j, getBinRangePrecision())); } return sb.toString(); }
String newBinRangeString = binRangeString(cutPoints, j, getBinRangePrecision()); if (!cutPointsCheck.add(newBinRangeString)) { throw new IllegalArgumentException( } else { double[] binaryCutPoint = { cutPoints[j] }; String newBinRangeString1 = binRangeString(binaryCutPoint, 0, m_BinRangePrecision); String newBinRangeString2 = binRangeString(binaryCutPoint, 1, m_BinRangePrecision); if (newBinRangeString1.equals(newBinRangeString2)) { throw new IllegalArgumentException(
String newBinRangeString = binRangeString(cutPoints, j, getBinRangePrecision()); if (!cutPointsCheck.add(newBinRangeString)) { throw new IllegalArgumentException( } else { double[] binaryCutPoint = { cutPoints[j] }; String newBinRangeString1 = binRangeString(binaryCutPoint, 0, m_BinRangePrecision); String newBinRangeString2 = binRangeString(binaryCutPoint, 1, m_BinRangePrecision); if (newBinRangeString1.equals(newBinRangeString2)) { throw new IllegalArgumentException(