com.planetj.taste.impl.recommender
Class TopItems
java.lang.Object
com.planetj.taste.impl.recommender.TopItems
public final class TopItems
- extends java.lang.Object
A simple class that refactors the "find top N recommended items" logic that is used in
several places in Taste.
- Since:
- 1.1
- Author:
- Sean Owen, tsmorton
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getTopItems
@NotNull
public static java.util.List<RecommendedItem> getTopItems(int howMany,
java.lang.Iterable<Item> allItems,
Rescorer<Item> rescorer,
TopItems.Estimator<Item> estimator)
throws TasteException
- Throws:
TasteException
getTopUsers
@NotNull
public static java.util.List<User> getTopUsers(int howMany,
java.lang.Iterable<User> allUsers,
Rescorer<User> rescorer,
TopItems.Estimator<User> estimator)
throws TasteException
- Throws:
TasteException
getTopItemItemCorrelations
@NotNull
public static java.util.List<GenericItemCorrelation.ItemItemCorrelation> getTopItemItemCorrelations(int howMany,
java.lang.Iterable<GenericItemCorrelation.ItemItemCorrelation> allCorrelations)
Thanks to tsmorton for suggesting this functionality and writing part of the code.
- See Also:
GenericItemCorrelation.GenericItemCorrelation(Iterable, int),
GenericItemCorrelation.GenericItemCorrelation(com.planetj.taste.correlation.ItemCorrelation , com.planetj.taste.model.DataModel , int)