/** * Returns the keys as string. * * @return the keys */ public String toString() { return Utils.arrayToString(m_Keys); } }
/** * Returns the keys as string. * * @return the keys */ public String toString() { return Utils.arrayToString(m_Keys); } }
/** * Short description. * * @return the description */ public String toString() { return Utils.arrayToString(m_Parameters); } }
/** * returns the coefficients in a string representation */ public String toString() { return Utils.arrayToString(getCoefficients()); }
/** * initializes the creator, locates the props file with the Utils class. * * @throws Exception if loading of CREATOR_FILE fails * @see #MEKA_CREATOR_FILE */ public GenericPropertiesCreator() throws Exception { super(MEKA_CREATOR_FILE); m_ExplicitPropsFile = false; if (DEBUG) System.out.println("start<GenericPropertiesCreator/find: " + MEKA_CREATOR_FILE + ">\n" + Utils.arrayToString(PropsUtils.find(MEKA_CREATOR_FILE)) + "\nend<GenericPropertiesCreator/find: + " + MEKA_CREATOR_FILE + ">\n"); }
/** * Generates random bytes and places them into a user-supplied byte array. * * @param bytes array to fill with random bytes */ public void nextBytes(byte[] bytes) { super.nextBytes(bytes); println("nextBytes=" + Utils.arrayToString(bytes)); }
/** * Generates random bytes and places them into a user-supplied byte array. * * @param bytes array to fill with random bytes */ public void nextBytes(byte[] bytes) { super.nextBytes(bytes); println("nextBytes=" + Utils.arrayToString(bytes)); }
/** * initializes the creator, locates the props file with the Utils class. * * @throws Exception if loading of CREATOR_FILE fails * @see #MEKA_CREATOR_FILE */ public GenericPropertiesCreator() throws Exception { super(MEKA_CREATOR_FILE); m_ExplicitPropsFile = false; if (DEBUG) System.out.println("start<GenericPropertiesCreator/find: " + MEKA_CREATOR_FILE + ">\n" + Utils.arrayToString(PropsUtils.find(MEKA_CREATOR_FILE)) + "\nend<GenericPropertiesCreator/find: + " + MEKA_CREATOR_FILE + ">\n"); }
/** * returns the coefficients in a string representation */ public String toString() { return Utils.arrayToString(getCoefficients()); }
/** * Generates a comment string that documentates the data generator. By default * this string is added at the beginning of the produced output as ARFF file * type, next after the options. * * @return string contains info about the generated rules */ @Override public String generateStart() { StringBuffer result; int i; result = new StringBuffer(); result.append("%\n"); result.append("% centroids:\n"); for (i = 0; i < getNumCentroids(); i++) { result.append("% " + i + ".: " + Utils.arrayToString(m_centroids[i]) + "\n"); } result.append("%\n"); result.append("% centroidClasses: " + Utils.arrayToString(m_centroidClasses) + "\n"); result.append("%\n"); result.append("% centroidWeights: " + Utils.arrayToString(m_centroidWeights) + "\n"); result.append("%\n"); result.append("% centroidStdDevs: " + Utils.arrayToString(m_centroidStdDevs) + "\n"); result.append("%\n"); return result.toString(); }
/** * Generates a comment string that documentates the data generator. By default * this string is added at the beginning of the produced output as ARFF file * type, next after the options. * * @return string contains info about the generated rules */ @Override public String generateStart() { StringBuffer result; int i; result = new StringBuffer(); result.append("%\n"); result.append("% centroids:\n"); for (i = 0; i < getNumCentroids(); i++) { result.append("% " + i + ".: " + Utils.arrayToString(m_centroids[i]) + "\n"); } result.append("%\n"); result.append("% centroidClasses: " + Utils.arrayToString(m_centroidClasses) + "\n"); result.append("%\n"); result.append("% centroidWeights: " + Utils.arrayToString(m_centroidWeights) + "\n"); result.append("%\n"); result.append("% centroidStdDevs: " + Utils.arrayToString(m_centroidStdDevs) + "\n"); result.append("%\n"); return result.toString(); }
result += ","; result += "[" + arrayToString(Array.get(array, i)) + "]";
result += ","; result += "[" + arrayToString(Array.get(array, i)) + "]";
System.err.println("Failed to set options: " + Utils.arrayToString(args)); e.printStackTrace();
System.err.println("Failed to set options: " + Utils.arrayToString(args)); e.printStackTrace();
+ Utils.arrayToString(m_IndicesUnused));
/** * Returns a string representation of the dimension. * * @return a string representation */ public String toString() { return "dimension: " + getLabel() + ", min: " + getMin() + ", max: " + getMax() + ", list: " + Utils.arrayToString(getList()); } }
public static void main(String[] args) throws Exception { if (args.length != 2) throw new IllegalArgumentException("Required arguments: <train> <predict>"); System.out.println("Loading train: " + args[0]); Instances train = DataSource.read(args[0]); MLUtils.prepareData(train); System.out.println("Loading predict: " + args[1]); Instances predict = DataSource.read(args[1]); MLUtils.prepareData(predict); // compatible? String msg = train.equalHeadersMsg(predict); if (msg != null) throw new IllegalStateException(msg); System.out.println("Build BR classifier on " + args[0]); BR classifier = new BR(); // further configuration of classifier classifier.buildClassifier(train); System.out.println("Use BR classifier on " + args[1]); for (int i = 0; i < predict.numInstances(); i++) { double[] dist = classifier.distributionForInstance(predict.instance(i)); System.out.println((i+1) + ": " + Utils.arrayToString(dist)); } } }
/** * tests the commandline operation of the saver. */ public void testSaverCommandlineArgs() { String[] options; options = getCommandlineOptions(false); try { ((OptionHandler) m_Saver).setOptions(options); } catch (Exception e) { e.printStackTrace(); fail("Command line test failed ('" + Utils.arrayToString(options) + "'): " + e.toString()); } }
/** * tests the commandline operation of the saver. */ public void testSaverCommandlineArgs() { String[] options; options = getCommandlineOptions(false); try { ((OptionHandler) m_Saver).setOptions(options); } catch (Exception e) { e.printStackTrace(); fail("Command line test failed ('" + Utils.arrayToString(options) + "'): " + e.toString()); } }