Package weka.experiment

Examples of weka.experiment.ResultMatrix


   * @return              the classname and options
   * @see ResultMatrix
   * @see ResultMatrixPlainText
   */
  public final static ResultMatrix getOutputFormat() {
    ResultMatrix  result;
   
    try {
      String[] options = Utils.splitOptions(get("OutputFormat", ResultMatrix.class.getName() + " -col-name-width 0 -row-name-width 25 -mean-width 0 -stddev-width 0 -sig-width 0 -count-width 5 -print-col-names -print-row-names -enum-col-names"));
      String classname = options[0];
      options[0]       = "";
      result           = (ResultMatrix) Utils.forName(ResultMatrix.class, classname, options);
    }
    catch (Exception e) {
      e.printStackTrace();
      result = new ResultMatrixPlainText();
    }
   
    // override with other default properties
    result.setMeanPrec(getMeanPrecision());
    result.setStdDevPrec(getStdDevPrecision());
    result.setShowAverage(getShowAverage());
    result.setShowStdDev(getShowStdDevs());
    result.setRemoveFilterName(getRemoveFilterClassnames());

    return result;
  }
View Full Code Here


   */
  protected void initialize() {
    Vector     classes;
    int      i;
    Class     cls;
    ResultMatrix   matrix;
   
    m_Result = CANCEL_OPTION;

    if (m_OutputFormatClasses == null) {
      classes = GenericObjectEditor.getClassnames(ResultMatrix.class.getName());

      // set names and classes
      m_OutputFormatClasses = new Vector<Class>();
      m_OutputFormatNames   = new Vector<String>();
      for (i = 0; i < classes.size(); i++) {
        try {
          cls    = Class.forName(classes.get(i).toString());
          matrix = (ResultMatrix) cls.newInstance();
          m_OutputFormatClasses.add(cls);
          m_OutputFormatNames.add(matrix.getDisplayName());
        }
        catch (Exception e) {
          e.printStackTrace();
        }
      }
View Full Code Here

TOP

Related Classes of weka.experiment.ResultMatrix

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.