Examples of rescore()


Examples of org.apache.mahout.cf.taste.recommender.IDRescorer.rescore()

      sum += SimpleVectorMath.dot(itemFeatures, oneUserFeatures);
      count++;
    }
   
    if (rescorer != null) {
      sum = rescorer.rescore(itemID, sum);
      if (!LangUtils.isFinite(sum)) {
        return null;
      }
    }
View Full Code Here

Examples of org.apache.mahout.cf.taste.recommender.IDRescorer.rescore()

    IDRescorer theRescorer = rescorer;
    if (theRescorer != null) {
      if (theRescorer.isFiltered(id)) {
        return null;
      }
      value = (float) theRescorer.rescore(id, value);
      if (!LangUtils.isFinite(value)) {
        return null;
      }
    }
    delegate.set(id, value);
View Full Code Here

Examples of org.apache.mahout.cf.taste.recommender.IDRescorer.rescore()

                  userTags.put(itemIDString, new GenericRecommendedItem(userID, value));
                } else {
                  if (provider != null) {
                    IDRescorer rescorer = provider.getRecommendRescorer(new long[] {userID}, null);
                    if (rescorer != null) {
                      value = (float) rescorer.rescore(itemID, value);
                    }
                  }
                  data.put(userID, new GenericRecommendedItem(itemID, value));
                }
              }
View Full Code Here

Examples of org.apache.mahout.cf.taste.recommender.IDRescorer.rescore()

              } else {
                float value = 1.0f;               
                if (provider != null) {
                  IDRescorer rescorer = provider.getRecommendRescorer(new long[] {userID}, null);
                  if (rescorer != null) {
                    value = (float) rescorer.rescore(itemID, value);
                  }
                }
                data.put(userID, new GenericRecommendedItem(itemID, value));
              }
            }
View Full Code Here

Examples of org.elasticsearch.search.internal.DefaultSearchContext.rescore()

        try {
            context.parsedQuery(indexService.queryParserService().parseQuery(request.source()));
            context.preProcess();
            int topLevelDocId = result.docIdAndVersion().docId + result.docIdAndVersion().context.docBase;
            Explanation explanation = context.searcher().explain(context.query(), topLevelDocId);
            for (RescoreSearchContext ctx : context.rescore()) {
                Rescorer rescorer = ctx.rescorer();
                explanation = rescorer.explain(topLevelDocId, context, ctx, explanation);
            }
            if (request.fields() != null || (request.fetchSourceContext() != null && request.fetchSourceContext().fetchSource())) {
                // Advantage is that we're not opening a second searcher to retrieve the _source. Also
View Full Code Here

Examples of org.elasticsearch.search.internal.SearchContext.rescore()

        try {
            context.parsedQuery(indexService.queryParserService().parseQuery(request.source()));
            context.preProcess();
            int topLevelDocId = result.docIdAndVersion().docId + result.docIdAndVersion().context.docBase;
            Explanation explanation = context.searcher().explain(context.query(), topLevelDocId);
            for (RescoreSearchContext ctx : context.rescore()) {
                Rescorer rescorer = ctx.rescorer();
                explanation = rescorer.explain(topLevelDocId, context, ctx, explanation);
            }
            if (request.fields() != null || (request.fetchSourceContext() != null && request.fetchSourceContext().fetchSource())) {
                // Advantage is that we're not opening a second searcher to retrieve the _source. Also
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.