if (m_CutPoints == null) {
setOutputFormat(null);
return;
}
FastVector attributes = new FastVector(getInputFormat().numAttributes());
int classIndex = getInputFormat().classIndex();
for(int i = 0; i < getInputFormat().numAttributes(); i++) {
if ((m_DiscretizeCols.isInRange(i))
&& (getInputFormat().attribute(i).isNumeric())) {
if (!m_MakeBinary) {
FastVector attribValues = new FastVector(1);
if (m_CutPoints[i] == null) {
attribValues.addElement("'All'");
} else {
for(int j = 0; j <= m_CutPoints[i].length; j++) {
if (j == 0) {
attribValues.addElement("'(-inf-"
+ Utils.doubleToString(m_CutPoints[i][j], 6) + "]'");
} else if (j == m_CutPoints[i].length) {
attribValues.addElement("'("
+ Utils.doubleToString(m_CutPoints[i][j - 1], 6)
+ "-inf)'");
} else {
attribValues.addElement("'("
+ Utils.doubleToString(m_CutPoints[i][j - 1], 6) + "-"
+ Utils.doubleToString(m_CutPoints[i][j], 6) + "]'");
}
}
}
attributes.addElement(new Attribute(getInputFormat().
attribute(i).name(),
attribValues));
} else {
if (m_CutPoints[i] == null) {
FastVector attribValues = new FastVector(1);
attribValues.addElement("'All'");
attributes.addElement(new Attribute(getInputFormat().
attribute(i).name(),
attribValues));
} else {
if (i < getInputFormat().classIndex()) {
classIndex += m_CutPoints[i].length - 1;
}
for(int j = 0; j < m_CutPoints[i].length; j++) {
FastVector attribValues = new FastVector(2);
attribValues.addElement("'(-inf-"
+ Utils.doubleToString(m_CutPoints[i][j], 6) + "]'");
attribValues.addElement("'("
+ Utils.doubleToString(m_CutPoints[i][j], 6) + "-inf)'");
attributes.addElement(new Attribute(getInputFormat().
attribute(i).name() + "_" + (j+1),
attribValues));
}