/** * Returns the description of one instance (without weight appended). If the * instance doesn't have access to a dataset, it returns the internal * floating-point values. Quotes string values that contain whitespace * characters. * * This method is used by getRandomNumberGenerator() in Instances.java in * order to maintain backwards compatibility with weka 3.4. * * @param afterDecimalPoint maximum number of digits after the decimal point * for numeric values * * @return the instance's description as a string */ @Override public String toStringNoWeight(int afterDecimalPoint) { StringBuffer text = new StringBuffer(); for (int i = 0; i < m_AttValues.length; i++) { if (i > 0) { text.append(","); } text.append(toString(i, afterDecimalPoint)); } return text.toString(); }
/** * Returns the description of one instance (without weight appended). If the * instance doesn't have access to a dataset, it returns the internal * floating-point values. Quotes string values that contain whitespace * characters. * * This method is used by getRandomNumberGenerator() in Instances.java in * order to maintain backwards compatibility with weka 3.4. * * @param afterDecimalPoint maximum number of digits after the decimal point * for numeric values * * @return the instance's description as a string */ @Override public String toStringNoWeight(int afterDecimalPoint) { StringBuffer text = new StringBuffer(); for (int i = 0; i < m_AttValues.length; i++) { if (i > 0) { text.append(","); } text.append(toString(i, afterDecimalPoint)); } return text.toString(); }