コード例 #1
0
  public void increment(double x, Object y) {
    KernelRegression kreg;
    double score;

    // increment all categories
    for (Object o : kernelRegressionMap.keySet()) {
      kreg = kernelRegressionMap.get(o);
      score = itemScoring.computeCategoryScore(o, y);
      kreg.increment(x, score);
    }

    // increment item
    score = itemScoring.computeItemScore(y);
    expectedScore.increment(x, score);
  }
コード例 #2
0
  public void initializeCategories() {
    expectedScore = new KernelRegression(kernel, bandwidth, uniform);

    // add all categories to map
    Iterator<Object> iter = itemScoring.categoryIterator();
    Object obj = null;
    while (iter.hasNext()) {
      obj = iter.next();
      kernelRegressionMap.put(obj, new KernelRegression(kernel, bandwidth, uniform));
    }
  }
コード例 #3
0
 public double getMaximumPossibleScore() {
   return itemScoring.maximumPossibleScore();
 }
コード例 #4
0
 public double getScoreValue(Object category) {
   return itemScoring.computeItemScore(category);
 }