コード例 #1
0
  public void generateGnuplot(ClassifierTypes classifierType, List<ClassifierWrapper> wrapperList) {

    File outputSubdir = new File(outputDir + sep + classifierType.toString().replaceAll(" ", "-"));
    if (!outputSubdir.exists()) {
      outputSubdir.mkdir();
    }
    String fullPath = outputSubdir.getAbsolutePath() + sep;

    String fprFileName = fullPath + FPR_FILE_NAME;
    writeErrorRateFile(fprFileName, classifierType, ErrorTypes.Type1, wrapperList);

    String fnrFileName = fullPath + FNR_FILE_NAME;
    writeErrorRateFile(fnrFileName, classifierType, ErrorTypes.Type2, wrapperList);

    String gnuPlotFileName = fullPath + "" + outputSubdir.getName() + ".gplt";
    writeGnuPlotFile(fullPath, gnuPlotFileName, classifierType.toString());

    String pAucFileName = fullPath + PAUC_FILE_NAME;
    writeAucFile(pAucFileName, classifierType, ErrorTypes.Type1, wrapperList);

    String nAucFileName = fullPath + NAUC_FILE_NAME;
    writeAucFile(nAucFileName, classifierType, ErrorTypes.Type2, wrapperList);

    String wAucFileName = fullPath + WAUC_FILE_NAME;
    writeWAucFile(wAucFileName, classifierType, wrapperList);

    String aucGnuPlotFileName = fullPath + outputSubdir.getName() + "-AUC.gplt";
    writeAucGnuPlot(fullPath, aucGnuPlotFileName, classifierType.toString());
  }
コード例 #2
0
 public void generateGnuplot(Map<ClassifierTypes, List<ClassifierWrapper>> resultsObj) {
   for (ClassifierTypes classifierType : ClassifierTypes.values()) {
     generateGnuplot(classifierType, resultsObj.get(classifierType));
   }
 }