Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
package org.apache.mahout.cf.taste.recommender;

Interface implemented by "item-based" recommenders.

public interface ItemBasedRecommender extends Recommender {

  

Parameters:
itemID ID of item for which to find most similar other items
howMany desired number of most similar items to find
Returns:
items most similar to the given item, ordered from most similar to least
Throws:
org.apache.mahout.cf.taste.common.TasteException if an error occurs while accessing the org.apache.mahout.cf.taste.model.DataModel
  List<RecommendedItemmostSimilarItems(long itemIDint howManythrows TasteException;

  

Parameters:
itemID ID of item for which to find most similar other items
howMany desired number of most similar items to find
rescorer Rescorer which can adjust item-item similarity estimates used to determine most similar items
Returns:
itemss most similar to the given item, ordered from most similar to least
Throws:
org.apache.mahout.cf.taste.common.TasteException if an error occurs while accessing the org.apache.mahout.cf.taste.model.DataModel
                                         int howMany,
                                         Rescorer<LongPairrescorerthrows TasteException;

  

Parameters:
itemIDs IDs of item for which to find most similar other items
howMany desired number of most similar items to find estimates used to determine most similar items
Returns:
items most similar to the given items, ordered from most similar to least
Throws:
org.apache.mahout.cf.taste.common.TasteException if an error occurs while accessing the org.apache.mahout.cf.taste.model.DataModel
  List<RecommendedItemmostSimilarItems(long[] itemIDsint howManythrows TasteException;

  

Parameters:
itemIDs IDs of item for which to find most similar other items
howMany desired number of most similar items to find
rescorer Rescorer which can adjust item-item similarity estimates used to determine most similar items
Returns:
items most similar to the given items, ordered from most similar to least
Throws:
org.apache.mahout.cf.taste.common.TasteException if an error occurs while accessing the org.apache.mahout.cf.taste.model.DataModel
  List<RecommendedItemmostSimilarItems(long[] itemIDs,
                                         int howMany,
                                         Rescorer<LongPairrescorerthrows TasteException;

  

Lists the items that were most influential in recommending a given item to a given user. Exactly how this is determined is left to the implementation, but, generally this will return items that the user prefers and that are similar to the given item.

This returns a java.util.List of RecommendedItem which is a little misleading since it's returning recommending items, but, I thought it more natural to just reuse this class since it encapsulates an item and value. The value here does not necessarily have a consistent interpretation or expected range; it will be higher the more influential the item was in the recommendation.

Parameters:
userID ID of user who was recommended the item
itemID ID of item that was recommended
howMany maximum number of items to return
Returns:
java.util.List of RecommendedItem, ordered from most influential in recommended the given item to least
Throws:
org.apache.mahout.cf.taste.common.TasteException if an error occurs while accessing the org.apache.mahout.cf.taste.model.DataModel
  List<RecommendedItemrecommendedBecause(long userIDlong itemIDint howManythrows TasteException;
New to GrepCode? Check out our FAQ X