/** * Returns a string representation of the model. * * @return the model */ @Override public String getModel() { if (m_Classifier instanceof MultiLabelClassifier) return ((MultiLabelClassifier) m_Classifier).getModel(); else return toString(); }
/** * Returns a string representation of the model. * * @return the model */ @Override public String getModel() { if (m_Classifier instanceof MultiLabelClassifier) return ((MultiLabelClassifier) m_Classifier).getModel(); else return toString(); }
/** * Returns a string representation of the model. * * @return the model */ public String getModel() { StringBuilder result; int i; String model; if (m_Classifiers == null) return getClass().getName() + ": No model built yet"; result = new StringBuilder(); for (i = 0; i < m_Classifiers.length; i++) { if (i > 0) result.append("\n\n"); result.append(getClass().getName() + ": Model #" + (i+1) + "\n\n"); model = m_Classifiers[i].getModel(); if (model.length() > 0) result.append(model); else result.append("No model representation available"); } return result.toString(); } }
/** * Returns a string representation of the model. * * @return the model */ public String getModel() { StringBuilder result; int i; String model; if (m_Classifiers == null) return getClass().getName() + ": No model built yet"; result = new StringBuilder(); for (i = 0; i < m_Classifiers.length; i++) { if (i > 0) result.append("\n\n"); result.append(getClass().getName() + ": Model #" + (i+1) + "\n\n"); model = m_Classifiers[i].getModel(); if (model.length() > 0) result.append(model); else result.append("No model representation available"); } return result.toString(); } }
/** * Performs the actual rendering. * * @param obj the object to render * @param panel the panel to render into * @return null if successful, otherwise error message */ @Override protected String doRender(Object obj, JPanel panel) { JTextArea text; MultiLabelClassifier cls; StringBuilder content; cls = (MultiLabelClassifier) obj; content = new StringBuilder(); content.append("Command-line\n"); content.append("============\n\n"); content.append(Utils.toCommandLine(cls) + "\n\n"); content.append("Model\n"); content.append("=====\n\n"); content.append(cls.getModel()); text = new JTextArea(); text.setFont(GUIHelper.getMonospacedFont()); text.setText(content.toString()); text.setCaretPosition(0); panel.add(new BaseScrollPane(text), BorderLayout.CENTER); return null; } }
/** * Performs the actual rendering. * * @param obj the object to render * @param panel the panel to render into * @return null if successful, otherwise error message */ @Override protected String doRender(Object obj, JPanel panel) { JTextArea text; MultiLabelClassifier cls; StringBuilder content; cls = (MultiLabelClassifier) obj; content = new StringBuilder(); content.append("Command-line\n"); content.append("============\n\n"); content.append(Utils.toCommandLine(cls) + "\n\n"); content.append("Model\n"); content.append("=====\n\n"); content.append(cls.getModel()); text = new JTextArea(); text.setFont(GUIHelper.getMonospacedFont()); text.setText(content.toString()); text.setCaretPosition(0); panel.add(new BaseScrollPane(text), BorderLayout.CENTER); return null; } }