Package com.jgaap.generics

Examples of com.jgaap.generics.AnalyzeException


      double current;
      try {
        current = distance.distance(new EventMap(unknown), knowns.get(i).getSecond());
      } catch (DistanceCalculationException e) {
        logger.error("Distance "+distance.displayName()+" failed", e);
        throw new AnalyzeException("Distance "+distance.displayName()+" failed");
      }
            rawResults.add(new Pair<String, Double>(knowns.get(i).getFirst().getAuthor(), current, 2));
      logger.debug(unknown.getFilePath()+"(Unknown):"+knowns.get(i).getFirst().getFilePath()+"("+knowns.get(i).getFirst().getAuthor()+") Distance:"+current);
    }
    Collections.sort(rawResults);
View Full Code Here


   
    //Test that each author has at least two documents.  If not, throw a
    //  new exception.
    for(String s : docsPerAuthor.keySet()){
      if(docsPerAuthor.get(s) < 2){
        throw new AnalyzeException("Weka Linear Regression classifier requires at "
            +"least two documents per author.\nAuthor '"+s+"' has only "
            +docsPerAuthor.get(s)+" documents.");
      }
    }
  }
View Full Code Here

        double current = distance.distance(new EventMap(unknown), known.getSecond());
        results.add(new Pair<String, Double>(known.getFirst().getAuthor() + " -" + known.getFirst().getFilePath(),current,2));
        logger.debug(unknown.getFilePath()+"(Unknown) -> "+known.getFirst().getFilePath()+"("+known.getFirst().getAuthor()+") Distance:"+current);
      } catch (DistanceCalculationException e) {
        logger.error("Distance "+distance.displayName()+" failed", e);
        throw new AnalyzeException("Distance "+distance.displayName()+" failed");
      }
    }
    Collections.sort(results);
    return results;
  }
View Full Code Here

        if (!entry.getKey().equals(currentAuthor)) {
          results.add(new Pair<String, Double>(entry.getKey(),distance.distance(currentEventMap, entry.getValue()), 2));
        }
      }
    } catch (DistanceCalculationException e) {
      throw new AnalyzeException("Distance Method "+distance.displayName()+" has failed");
    }
    Collections.sort(results);
    return results;
  }
View Full Code Here

        double current = distance.distance(unknownHistogram, knownEntry.getValue());
        logger.debug(unknown.getTitle()+" ("+unknown.getFilePath()+")"+" -> "+knownEntry.getKey()+":"+current);
        result.add(new Pair<String, Double>(knownEntry.getKey(), current, 2));
      } catch (DistanceCalculationException e) {
        logger.fatal("Distance " + distance.displayName() + " failed", e);
        throw new AnalyzeException("Distance " + distance.displayName() + " failed");
      }
    }
    Collections.sort(result);
    return result;
  }
View Full Code Here

        double current = distance.distance(unknownHistogram, knownEntry.getValue());
        logger.debug(unknown.getTitle()+" ("+unknown.getFilePath()+")"+" -> "+knownEntry.getKey()+":"+current);
        result.add(new Pair<String, Double>(knownEntry.getKey(), current, 2));
      } catch (DistanceCalculationException e) {
        logger.fatal("Distance " + distance.displayName() + " failed", e);
        throw new AnalyzeException("Distance " + distance.displayName() + " failed");
      }
    }
    Collections.sort(result);
    return result;
  }
View Full Code Here

   
    //Test that each author has at least two documents.  If not, throw a
    //  new exception.
    for(String s : docsPerAuthor.keySet()){
      if(docsPerAuthor.get(s) < 2){
        throw new AnalyzeException("Weka J48 Decision Tree classifier requires at "
            +"least two documents per author.\nAuthor '"+s+"' has only "
            +docsPerAuthor.get(s)+" documents.");
      }
    }
  }
View Full Code Here

      for (EventMap knownHistogram : entry.getValue()) {
        try {
          rawResults.add(new Pair<String, Double>(entry.getKey(), distance.distance(unknownHistogram, knownHistogram), 2));
        } catch (DistanceCalculationException e) {
          logger.fatal("Distance " + distance.displayName() + " failed", e);
          throw new AnalyzeException("Distance " + distance.displayName() + " failed");
        }
      }
    }
    Collections.sort(rawResults);
   
View Full Code Here

        if (!entry.getKey().equals(currentAuthor)) {
          results.add(new Pair<String, Double>(entry.getKey(),distance.distance(currentAbsoluteHistogram, entry.getValue()), 2));
        }
      }
    } catch (DistanceCalculationException e) {
      throw new AnalyzeException("Distance Method "+distance.displayName()+" has failed");
    }
    Collections.sort(results);
    return results;
  }
View Full Code Here

   
    //Test that each author has at least two documents.  If not, throw a
    //  new exception.
    for(String s : docsPerAuthor.keySet()){
      if(docsPerAuthor.get(s) < 2){
        throw new AnalyzeException("Weka Least Median Squared classifier requires at "
            +"least two documents per author.\nAuthor '"+s+"' has only "
            +docsPerAuthor.get(s)+" documents.");
      }
    }
  }
View Full Code Here

TOP

Related Classes of com.jgaap.generics.AnalyzeException

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.