/** * Returns the CLI string of a given item in the trace. * * @param index the index of the trace item to obtain */ public String getTraceClassifierAsCli(int index) { return getCommandline(m_Trace.get(index).getValue().getClassifier()); }
/** * Returns a string that summarizes the object. * * @return the object summarized as a string */ public String toSummaryString() { String result; result = "Best classifier: " + getCommandline(getBestClassifier()); return result; }
/** * returns the options of the current setup. * * @return the current options */ @Override public String[] getOptions() { int i; Vector<String> result; String[] options; result = new Vector<String>(); result.add("-E"); result.add("" + getEvaluation()); for (i = 0; i < getSearchParameters().length; i++) { result.add("-search"); result.add(getCommandline(getSearchParameters()[i])); } result.add("-class-label"); result.add(getClassLabel()); result.add("-algorithm"); result.add(getCommandline(m_Algorithm)); result.add("-log-file"); result.add("" + getLogFile()); options = super.getOptions(); for (i = 0; i < options.length; i++) result.add(options[i]); return result.toArray(new String[result.size()]); }
/** * returns a string representation of the classifier. * * @return a string representation of the classifier */ @Override public String toString() { StringBuilder result; int i; result = new StringBuilder(); if (getBestValues() == null) { result.append("No search performed yet."); } else { result.append(this.getClass().getName() + ":\n" + "Classifier: " + getCommandline(getBestClassifier()) + "\n\n"); for (i = 0; i < m_Parameters.length; i++) result.append((i+1) + ". parameter: " + m_Parameters[i] + "\n"); result.append("Evaluation: " + getEvaluation().getSelectedTag().getReadable() + "\n" + "Coordinates: " + getBestCoordinates() + "\n"); result.append("Values: " + getBestValues() + "\n\n" + m_Classifier.toString()); if (m_Debug) { result.append("\n\nTrace (format: #. folds/performance - setup):\n"); for (i = 0; i < getTraceSize(); i++) { result.append("\n" + (i + 1) + ". " + getTraceFolds(i) + "/" + getTraceValue(i) + " - " + getTraceClassifierAsCli(i)); } } } return result.toString(); }
if (search.size() == 0) { for (i = 0; i < m_DefaultParameters.length; i++) search.add(getCommandline(m_DefaultParameters[i]));