public final class ClientRecommender extends Object implements MyrrixRecommender
An implementation of MyrrixRecommender which accesses a remote Serving Layer instance
over HTTP or HTTPS. This is like a local "handle" on the remote recommender.
It is useful to note here, again, that the API methods setPreference(long, long)
and removePreference(long, long), retained from Apache Mahout, have a somewhat different meaning
than in Mahout. They add to an association strength, rather than replace it. See the javadoc.
There are a few advanced, system-wide parameters that can be set to affect how the client works. These should not normally be used:
client.connection.close: Causes the client to request no HTTP keep-alive. This can avoid
running out of local sockets on the client side during load testing, but should not otherwise be set.client.https.ignoreHost: When using HTTPS, ignore the host specified in the certificate. This
can make development easier, but must not be used in production.| Constructor and Description |
|---|
ClientRecommender(MyrrixClientConfiguration config)
Instantiates a new recommender client with the given configuration
|
| Modifier and Type | Method and Description |
|---|---|
void |
await() |
boolean |
await(long time,
TimeUnit unit) |
float |
estimateForAnonymous(long toItemID,
long[] itemIDs) |
float |
estimateForAnonymous(long toItemID,
long[] itemIDs,
float[] values) |
float |
estimateForAnonymous(long toItemID,
long[] itemIDs,
float[] values,
Long contextUserID) |
float |
estimatePreference(long userID,
long itemID) |
float[] |
estimatePreferences(long userID,
long... itemIDs) |
FastIDSet |
getAllItemIDs() |
FastIDSet |
getAllUserIDs() |
org.apache.mahout.cf.taste.model.DataModel |
getDataModel()
Deprecated.
do not call
|
FastIDSet |
getItemCluster(int n) |
int |
getNumItemClusters() |
int |
getNumUserClusters() |
FastIDSet |
getUserCluster(int n) |
void |
ingest(File file) |
void |
ingest(Reader reader) |
boolean |
isReady() |
List<org.apache.mahout.cf.taste.recommender.RecommendedItem> |
mostPopularItems(int howMany) |
List<org.apache.mahout.cf.taste.recommender.RecommendedItem> |
mostPopularItems(int howMany,
org.apache.mahout.cf.taste.recommender.IDRescorer rescorer)
Deprecated.
use
mostPopularItems(int) instead |
List<org.apache.mahout.cf.taste.recommender.RecommendedItem> |
mostSimilarItems(long[] itemIDs,
int howMany)
Computes items most similar to an item or items.
|
List<org.apache.mahout.cf.taste.recommender.RecommendedItem> |
mostSimilarItems(long[] itemIDs,
int howMany,
boolean excludeItemIfNotSimilarToAll)
Deprecated.
use
mostSimilarItems(long[], int) instead |
List<org.apache.mahout.cf.taste.recommender.RecommendedItem> |
mostSimilarItems(long[] itemIDs,
int howMany,
org.apache.mahout.cf.taste.recommender.Rescorer<org.apache.mahout.common.LongPair> rescorer)
Deprecated.
use
mostSimilarItems(long[], int) instead |
List<org.apache.mahout.cf.taste.recommender.RecommendedItem> |
mostSimilarItems(long[] itemIDs,
int howMany,
org.apache.mahout.cf.taste.recommender.Rescorer<org.apache.mahout.common.LongPair> rescorer,
boolean excludeItemIfNotSimilarToAll)
Deprecated.
use
mostSimilarItems(long[], int) instead |
List<org.apache.mahout.cf.taste.recommender.RecommendedItem> |
mostSimilarItems(long[] itemIDs,
int howMany,
String[] rescorerParams,
Long contextUserID)
Like
mostSimilarItems(long[], int), but allows caller to specify the user for which the request
is being made. |
List<org.apache.mahout.cf.taste.recommender.RecommendedItem> |
mostSimilarItems(long itemID,
int howMany)
One-argument version of
mostSimilarItems(long[], int). |
List<org.apache.mahout.cf.taste.recommender.RecommendedItem> |
mostSimilarItems(long itemID,
int howMany,
org.apache.mahout.cf.taste.recommender.Rescorer<org.apache.mahout.common.LongPair> rescorer)
Deprecated.
use
mostSimilarItems(long, int) instead |
List<org.apache.mahout.cf.taste.recommender.RecommendedItem> |
recommend(long userID,
int howMany)
Like
recommend(long, int, boolean, IDRescorer), and sets considerKnownItems to false
and rescorer to null. |
List<org.apache.mahout.cf.taste.recommender.RecommendedItem> |
recommend(long userID,
int howMany,
boolean considerKnownItems,
org.apache.mahout.cf.taste.recommender.IDRescorer rescorer)
Deprecated.
use
recommend(long, int, boolean, String[]) instead |
List<org.apache.mahout.cf.taste.recommender.RecommendedItem> |
recommend(long userID,
int howMany,
boolean considerKnownItems,
String[] rescorerParams) |
List<org.apache.mahout.cf.taste.recommender.RecommendedItem> |
recommend(long userID,
int howMany,
org.apache.mahout.cf.taste.recommender.IDRescorer rescorer)
Deprecated.
use
recommend(long, int) instead |
List<org.apache.mahout.cf.taste.recommender.RecommendedItem> |
recommendedBecause(long userID,
long itemID,
int howMany)
Lists the items that were most influential in recommending a given item to a given user.
|
List<org.apache.mahout.cf.taste.recommender.RecommendedItem> |
recommendToAnonymous(long[] itemIDs,
float[] values,
int howMany) |
List<org.apache.mahout.cf.taste.recommender.RecommendedItem> |
recommendToAnonymous(long[] itemIDs,
float[] values,
int howMany,
org.apache.mahout.cf.taste.recommender.IDRescorer rescorer)
Deprecated.
use
recommendToAnonymous(long[], float[], int) instead |
List<org.apache.mahout.cf.taste.recommender.RecommendedItem> |
recommendToAnonymous(long[] itemIDs,
float[] values,
int howMany,
String[] rescorerParams,
Long contextUserID)
Like
recommendToAnonymous(long[], float[], int), but allows caller to specify the user for
which the request is being made. |
List<org.apache.mahout.cf.taste.recommender.RecommendedItem> |
recommendToAnonymous(long[] itemIDs,
int howMany) |
List<org.apache.mahout.cf.taste.recommender.RecommendedItem> |
recommendToAnonymous(long[] itemIDs,
int howMany,
org.apache.mahout.cf.taste.recommender.IDRescorer rescorer)
Deprecated.
use
recommendToAnonymous(long[], int) instead |
List<org.apache.mahout.cf.taste.recommender.RecommendedItem> |
recommendToMany(long[] userIDs,
int howMany,
boolean considerKnownItems,
org.apache.mahout.cf.taste.recommender.IDRescorer rescorer)
Deprecated.
|
List<org.apache.mahout.cf.taste.recommender.RecommendedItem> |
recommendToMany(long[] userIDs,
int howMany,
boolean considerKnownItems,
String[] rescorerParams) |
void |
refresh()
Requests that the Serving Layer recompute its models.
|
void |
refresh(Collection<org.apache.mahout.cf.taste.common.Refreshable> alreadyRefreshed)
Deprecated.
|
void |
removePreference(long userID,
long itemID) |
void |
setItemTag(String tag,
long itemID) |
void |
setItemTag(String tag,
long itemID,
float value) |
void |
setItemTag(String tag,
long itemID,
float value,
Long contextUserID)
Like
setItemTag(String, long, float), but allows caller to specify the user for
which the request is being made. |
void |
setPreference(long userID,
long itemID)
Calls
setPreference(long, long, float) with value 1.0. |
void |
setPreference(long userID,
long itemID,
float value) |
void |
setUserTag(long userID,
String tag) |
void |
setUserTag(long userID,
String tag,
float value) |
float[] |
similarityToItem(long toItemID,
long... itemIDs) |
float[] |
similarityToItem(long toItemID,
long[] itemIDs,
Long contextUserID)
Like
similarityToItem(long, long[]), but allows caller to specify the user for which the request
is being made. |
public ClientRecommender(MyrrixClientConfiguration config) throws IOException
config - configuration to use with this clientIOException - if the HTTP client encounters an error during configurationpublic void setPreference(long userID,
long itemID)
throws org.apache.mahout.cf.taste.common.TasteException
setPreference(long, long, float) with value 1.0.setPreference in interface MyrrixRecommenderorg.apache.mahout.cf.taste.common.TasteExceptionpublic void setPreference(long userID,
long itemID,
float value)
throws org.apache.mahout.cf.taste.common.TasteException
setPreference in interface MyrrixRecommendersetPreference in interface org.apache.mahout.cf.taste.recommender.Recommenderorg.apache.mahout.cf.taste.common.TasteExceptionpublic void removePreference(long userID,
long itemID)
throws org.apache.mahout.cf.taste.common.TasteException
removePreference in interface MyrrixRecommenderremovePreference in interface org.apache.mahout.cf.taste.recommender.Recommenderorg.apache.mahout.cf.taste.common.TasteExceptionpublic void setUserTag(long userID,
String tag)
throws org.apache.mahout.cf.taste.common.TasteException
setUserTag in interface MyrrixRecommenderorg.apache.mahout.cf.taste.common.TasteExceptionpublic void setUserTag(long userID,
String tag,
float value)
throws org.apache.mahout.cf.taste.common.TasteException
setUserTag in interface MyrrixRecommenderorg.apache.mahout.cf.taste.common.TasteExceptionpublic void setItemTag(String tag, long itemID) throws org.apache.mahout.cf.taste.common.TasteException
setItemTag in interface MyrrixRecommenderorg.apache.mahout.cf.taste.common.TasteExceptionpublic void setItemTag(String tag, long itemID, float value) throws org.apache.mahout.cf.taste.common.TasteException
setItemTag in interface MyrrixRecommenderorg.apache.mahout.cf.taste.common.TasteExceptionpublic void setItemTag(String tag, long itemID, float value, Long contextUserID) throws org.apache.mahout.cf.taste.common.TasteException
setItemTag(String, long, float), but allows caller to specify the user for
which the request is being made. This information does not directly affect the computation,
but affects routing of the request in a distributed context. This is always recommended
when there is a user in whose context the request is being made, as it will ensure that the
request can take into account all the latest information from the user, including a very new
item like itemID.org.apache.mahout.cf.taste.common.TasteExceptionpublic float estimatePreference(long userID,
long itemID)
throws org.apache.mahout.cf.taste.common.TasteException
estimatePreference in interface MyrrixRecommenderestimatePreference in interface org.apache.mahout.cf.taste.recommender.RecommenderuserID - user ID whose preference is to be estimateditemID - item ID to estimate preference forrecommend(long, int). They are opaque values and have no interpretation
other than that larger means stronger. The values are typically in the range [0,1] but are not guaranteed
to be so. Note that 0 will be returned if the user or item is not known in the data.NotReadyException - if the recommender has no model available yetorg.apache.mahout.cf.taste.common.TasteException - if another error occurspublic float[] estimatePreferences(long userID,
long... itemIDs)
throws org.apache.mahout.cf.taste.common.TasteException
estimatePreferences in interface MyrrixRecommenderorg.apache.mahout.cf.taste.common.TasteExceptionpublic float estimateForAnonymous(long toItemID,
long[] itemIDs)
throws org.apache.mahout.cf.taste.common.TasteException
estimateForAnonymous in interface MyrrixRecommenderorg.apache.mahout.cf.taste.common.TasteExceptionpublic float estimateForAnonymous(long toItemID,
long[] itemIDs,
float[] values)
throws org.apache.mahout.cf.taste.common.TasteException
estimateForAnonymous in interface MyrrixRecommenderorg.apache.mahout.cf.taste.common.TasteExceptionpublic float estimateForAnonymous(long toItemID,
long[] itemIDs,
float[] values,
Long contextUserID)
throws org.apache.mahout.cf.taste.common.TasteException
org.apache.mahout.cf.taste.common.TasteExceptionpublic List<org.apache.mahout.cf.taste.recommender.RecommendedItem> recommend(long userID, int howMany) throws org.apache.mahout.cf.taste.common.TasteException
recommend(long, int, boolean, IDRescorer), and sets considerKnownItems to false
and rescorer to null.recommend in interface MyrrixRecommenderrecommend in interface org.apache.mahout.cf.taste.recommender.Recommenderorg.apache.mahout.cf.taste.common.TasteExceptionpublic List<org.apache.mahout.cf.taste.recommender.RecommendedItem> recommend(long userID, int howMany, boolean considerKnownItems, String[] rescorerParams) throws org.apache.mahout.cf.taste.common.TasteException
userID - user for which recommendations are to be computedhowMany - desired number of recommendationsconsiderKnownItems - if true, items that the user is already associated to are candidates
for recommendation. Normally this is false.rescorerParams - optional parameters to send to the server's RescorerProviderList of recommended RecommendedItems, ordered from most strongly recommend to leastorg.apache.mahout.cf.taste.common.NoSuchUserException - if the user is not known in the modelNotReadyException - if the recommender has no model available yetorg.apache.mahout.cf.taste.common.TasteException - if another error occursUnsupportedOperationException - if rescorer is not nullpublic List<org.apache.mahout.cf.taste.recommender.RecommendedItem> recommendToMany(long[] userIDs, int howMany, boolean considerKnownItems, String[] rescorerParams) throws org.apache.mahout.cf.taste.common.TasteException
userIDs - users for which recommendations are to be computedhowMany - desired number of recommendationsconsiderKnownItems - if true, items that the user is already associated to are candidates
for recommendation. Normally this is false.rescorerParams - optional parameters to send to the server's RescorerProviderList of recommended RecommendedItems, ordered from most strongly recommend to leastorg.apache.mahout.cf.taste.common.NoSuchUserException - if none of userIDs are known in the model. Otherwise unknown
user IDs are ignored.NotReadyException - if the recommender has no model available yetorg.apache.mahout.cf.taste.common.TasteException - if another error occursUnsupportedOperationException - if rescorer is not nullpublic List<org.apache.mahout.cf.taste.recommender.RecommendedItem> recommendToAnonymous(long[] itemIDs, int howMany) throws org.apache.mahout.cf.taste.common.TasteException
recommendToAnonymous in interface MyrrixRecommenderorg.apache.mahout.cf.taste.common.TasteExceptionpublic List<org.apache.mahout.cf.taste.recommender.RecommendedItem> recommendToAnonymous(long[] itemIDs, float[] values, int howMany) throws org.apache.mahout.cf.taste.common.TasteException
recommendToAnonymous in interface MyrrixRecommenderorg.apache.mahout.cf.taste.common.TasteExceptionpublic List<org.apache.mahout.cf.taste.recommender.RecommendedItem> recommendToAnonymous(long[] itemIDs, float[] values, int howMany, String[] rescorerParams, Long contextUserID) throws org.apache.mahout.cf.taste.common.TasteException
recommendToAnonymous(long[], float[], int), but allows caller to specify the user for
which the request is being made. This information does not directly affect the computation,
but affects routing of the request in a distributed context. This is always recommended
when there is a user in whose context the request is being made, as it will ensure that the
request can take into account all the latest information from the user, including very new
items that may be in itemIDs.org.apache.mahout.cf.taste.common.TasteExceptionpublic List<org.apache.mahout.cf.taste.recommender.RecommendedItem> mostPopularItems(int howMany) throws org.apache.mahout.cf.taste.common.TasteException
mostPopularItems in interface MyrrixRecommenderorg.apache.mahout.cf.taste.common.TasteExceptionpublic List<org.apache.mahout.cf.taste.recommender.RecommendedItem> mostSimilarItems(long[] itemIDs, int howMany) throws org.apache.mahout.cf.taste.common.TasteException
mostSimilarItems in interface MyrrixRecommendermostSimilarItems in interface org.apache.mahout.cf.taste.recommender.ItemBasedRecommenderitemIDs - items for which most similar items are requiredhowMany - maximum number of similar items to return; fewer may be returnedRecommendedItems representing the top recommendations for the user, ordered by quality,
descending. The score associated to it is an opaque value. Larger means more similar, but no further
interpretation may necessarily be applied.org.apache.mahout.cf.taste.common.NoSuchItemException - if none of itemIDs exist in the model. Otherwise, unknown
items are ignored.NotReadyException - if the recommender has no model available yetorg.apache.mahout.cf.taste.common.TasteException - if another error occurspublic List<org.apache.mahout.cf.taste.recommender.RecommendedItem> mostSimilarItems(long[] itemIDs, int howMany, String[] rescorerParams, Long contextUserID) throws org.apache.mahout.cf.taste.common.TasteException
mostSimilarItems(long[], int), but allows caller to specify the user for which the request
is being made. This information does not directly affect the computation, but affects routing
of the request in a distributed context. This is always recommended when there is a user in whose context
the request is being made, as it will ensure that the request can take into account all the latest information
from the user, including very new items that may be in itemIDs.org.apache.mahout.cf.taste.common.TasteExceptionpublic List<org.apache.mahout.cf.taste.recommender.RecommendedItem> mostSimilarItems(long itemID, int howMany) throws org.apache.mahout.cf.taste.common.TasteException
mostSimilarItems(long[], int).mostSimilarItems in interface MyrrixRecommendermostSimilarItems in interface org.apache.mahout.cf.taste.recommender.ItemBasedRecommenderorg.apache.mahout.cf.taste.common.TasteExceptionpublic float[] similarityToItem(long toItemID,
long... itemIDs)
throws org.apache.mahout.cf.taste.common.TasteException
similarityToItem in interface MyrrixRecommenderorg.apache.mahout.cf.taste.common.TasteExceptionpublic float[] similarityToItem(long toItemID,
long[] itemIDs,
Long contextUserID)
throws org.apache.mahout.cf.taste.common.TasteException
similarityToItem(long, long[]), but allows caller to specify the user for which the request
is being made. This information does not directly affect the computation, but affects routing
of the request in a distributed context. This is always recommended when there is a user in whose context
the request is being made, as it will ensure that the request can take into account all the latest information
from the user, including very new items that may be in itemIDs.org.apache.mahout.cf.taste.common.TasteExceptionpublic List<org.apache.mahout.cf.taste.recommender.RecommendedItem> recommendedBecause(long userID, long itemID, int howMany) throws org.apache.mahout.cf.taste.common.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.
These values by which the results are ordered are opaque values and have no interpretation other than that larger means stronger.
recommendedBecause in interface MyrrixRecommenderrecommendedBecause in interface org.apache.mahout.cf.taste.recommender.ItemBasedRecommenderuserID - ID of user who was recommended the itemitemID - ID of item that was recommendedhowMany - maximum number of items to returnList of RecommendedItem, ordered from most influential in recommended the given
item to leastorg.apache.mahout.cf.taste.common.NoSuchUserException - if the user is not known in the modelorg.apache.mahout.cf.taste.common.NoSuchItemException - if the item is not known in the modelNotReadyException - if the recommender has no model available yetorg.apache.mahout.cf.taste.common.TasteException - if another error occurspublic void ingest(File file) throws org.apache.mahout.cf.taste.common.TasteException
ingest in interface MyrrixRecommenderorg.apache.mahout.cf.taste.common.TasteExceptionpublic void ingest(Reader reader) throws org.apache.mahout.cf.taste.common.TasteException
ingest in interface MyrrixRecommenderorg.apache.mahout.cf.taste.common.TasteException@Deprecated public void refresh(Collection<org.apache.mahout.cf.taste.common.Refreshable> alreadyRefreshed)
refresh in interface MyrrixRecommenderrefresh in interface org.apache.mahout.cf.taste.common.Refreshablepublic void refresh()
refresh in interface MyrrixRecommender@Deprecated public org.apache.mahout.cf.taste.model.DataModel getDataModel()
DataModel.getDataModel in interface MyrrixRecommendergetDataModel in interface org.apache.mahout.cf.taste.recommender.RecommenderUnsupportedOperationException@Deprecated public List<org.apache.mahout.cf.taste.recommender.RecommendedItem> recommend(long userID, int howMany, org.apache.mahout.cf.taste.recommender.IDRescorer rescorer) throws org.apache.mahout.cf.taste.common.TasteException
recommend(long, int) insteadRescorers are not available at this time in the model.recommend in interface MyrrixRecommenderrecommend in interface org.apache.mahout.cf.taste.recommender.Recommenderrecommend(long, int) if rescorer is nullUnsupportedOperationException - otherwiseorg.apache.mahout.cf.taste.common.TasteException@Deprecated public List<org.apache.mahout.cf.taste.recommender.RecommendedItem> recommend(long userID, int howMany, boolean considerKnownItems, org.apache.mahout.cf.taste.recommender.IDRescorer rescorer) throws org.apache.mahout.cf.taste.common.TasteException
recommend(long, int, boolean, String[]) insteadRescorers are not available at this time in the model.recommend in interface MyrrixRecommenderrecommend(long, int, boolean, String[]) if rescorer is nullUnsupportedOperationException - otherwiseorg.apache.mahout.cf.taste.common.TasteException@Deprecated public List<org.apache.mahout.cf.taste.recommender.RecommendedItem> recommendToMany(long[] userIDs, int howMany, boolean considerKnownItems, org.apache.mahout.cf.taste.recommender.IDRescorer rescorer) throws org.apache.mahout.cf.taste.common.TasteException
recommendToMany in interface MyrrixRecommenderorg.apache.mahout.cf.taste.common.TasteException@Deprecated public List<org.apache.mahout.cf.taste.recommender.RecommendedItem> recommendToAnonymous(long[] itemIDs, int howMany, org.apache.mahout.cf.taste.recommender.IDRescorer rescorer) throws org.apache.mahout.cf.taste.common.TasteException
recommendToAnonymous(long[], int) insteadIDRescorer is not supported in the client now and must be null.recommendToAnonymous in interface MyrrixRecommenderrecommendToAnonymous(long[], int) if rescorer is nullUnsupportedOperationException - otherwiseorg.apache.mahout.cf.taste.common.TasteException@Deprecated public List<org.apache.mahout.cf.taste.recommender.RecommendedItem> recommendToAnonymous(long[] itemIDs, float[] values, int howMany, org.apache.mahout.cf.taste.recommender.IDRescorer rescorer) throws org.apache.mahout.cf.taste.common.TasteException
recommendToAnonymous(long[], float[], int) insteadIDRescorer is not supported in the client now and must be null.recommendToAnonymous in interface MyrrixRecommenderrecommendToAnonymous(long[], float[], int) if rescorer is nullUnsupportedOperationException - otherwiseorg.apache.mahout.cf.taste.common.TasteException@Deprecated public List<org.apache.mahout.cf.taste.recommender.RecommendedItem> mostPopularItems(int howMany, org.apache.mahout.cf.taste.recommender.IDRescorer rescorer) throws org.apache.mahout.cf.taste.common.TasteException
mostPopularItems(int) insteadIDRescorer is not supported in the client now and must be null.mostPopularItems in interface MyrrixRecommendermostPopularItems(int) if rescorer is nullUnsupportedOperationException - otherwiseorg.apache.mahout.cf.taste.common.TasteException@Deprecated public List<org.apache.mahout.cf.taste.recommender.RecommendedItem> mostSimilarItems(long itemID, int howMany, org.apache.mahout.cf.taste.recommender.Rescorer<org.apache.mahout.common.LongPair> rescorer) throws org.apache.mahout.cf.taste.common.TasteException
mostSimilarItems(long, int) insteadRescorers are not available at this time in the model.mostSimilarItems in interface MyrrixRecommendermostSimilarItems in interface org.apache.mahout.cf.taste.recommender.ItemBasedRecommendermostSimilarItems(long, int) if rescorer is nullUnsupportedOperationException - otherwiseorg.apache.mahout.cf.taste.common.TasteException@Deprecated public List<org.apache.mahout.cf.taste.recommender.RecommendedItem> mostSimilarItems(long[] itemIDs, int howMany, org.apache.mahout.cf.taste.recommender.Rescorer<org.apache.mahout.common.LongPair> rescorer) throws org.apache.mahout.cf.taste.common.TasteException
mostSimilarItems(long[], int) insteadRescorers are not available at this time in the model.mostSimilarItems in interface MyrrixRecommendermostSimilarItems in interface org.apache.mahout.cf.taste.recommender.ItemBasedRecommendermostSimilarItems(long[], int) if rescorer is nullUnsupportedOperationException - otherwiseorg.apache.mahout.cf.taste.common.TasteException@Deprecated public List<org.apache.mahout.cf.taste.recommender.RecommendedItem> mostSimilarItems(long[] itemIDs, int howMany, boolean excludeItemIfNotSimilarToAll) throws org.apache.mahout.cf.taste.common.TasteException
mostSimilarItems(long[], int) insteadexcludeItemIfNotSimilarToAll is not applicable in this implementation.mostSimilarItems in interface MyrrixRecommendermostSimilarItems in interface org.apache.mahout.cf.taste.recommender.ItemBasedRecommendermostSimilarItems(long[], int) if excludeItemIfNotSimilarToAll is falseUnsupportedOperationException - otherwiseorg.apache.mahout.cf.taste.common.TasteException@Deprecated public List<org.apache.mahout.cf.taste.recommender.RecommendedItem> mostSimilarItems(long[] itemIDs, int howMany, org.apache.mahout.cf.taste.recommender.Rescorer<org.apache.mahout.common.LongPair> rescorer, boolean excludeItemIfNotSimilarToAll) throws org.apache.mahout.cf.taste.common.TasteException
mostSimilarItems(long[], int) insteadRescorers are not available at this time in the model.
excludeItemIfNotSimilarToAll is not applicable in this implementation.mostSimilarItems in interface MyrrixRecommendermostSimilarItems in interface org.apache.mahout.cf.taste.recommender.ItemBasedRecommendermostSimilarItems(long[], int) if excludeItemIfNotSimilarToAll is false and rescorer is nullUnsupportedOperationException - otherwiseorg.apache.mahout.cf.taste.common.TasteExceptionpublic boolean isReady()
throws org.apache.mahout.cf.taste.common.TasteException
isReady in interface MyrrixRecommenderorg.apache.mahout.cf.taste.common.TasteExceptionpublic void await()
throws org.apache.mahout.cf.taste.common.TasteException,
InterruptedException
await in interface MyrrixRecommenderorg.apache.mahout.cf.taste.common.TasteExceptionInterruptedExceptionpublic boolean await(long time,
TimeUnit unit)
throws org.apache.mahout.cf.taste.common.TasteException,
InterruptedException
await in interface MyrrixRecommenderorg.apache.mahout.cf.taste.common.TasteExceptionInterruptedExceptionpublic FastIDSet getAllUserIDs() throws org.apache.mahout.cf.taste.common.TasteException
getAllUserIDs in interface MyrrixRecommenderorg.apache.mahout.cf.taste.common.TasteExceptionpublic FastIDSet getAllItemIDs() throws org.apache.mahout.cf.taste.common.TasteException
getAllItemIDs in interface MyrrixRecommenderorg.apache.mahout.cf.taste.common.TasteExceptionpublic int getNumUserClusters()
throws org.apache.mahout.cf.taste.common.TasteException
getNumUserClusters in interface MyrrixRecommenderorg.apache.mahout.cf.taste.common.TasteExceptionpublic int getNumItemClusters()
throws org.apache.mahout.cf.taste.common.TasteException
getNumItemClusters in interface MyrrixRecommenderorg.apache.mahout.cf.taste.common.TasteExceptionpublic FastIDSet getUserCluster(int n) throws org.apache.mahout.cf.taste.common.TasteException
getUserCluster in interface MyrrixRecommenderorg.apache.mahout.cf.taste.common.TasteExceptionpublic FastIDSet getItemCluster(int n) throws org.apache.mahout.cf.taste.common.TasteException
getItemCluster in interface MyrrixRecommenderorg.apache.mahout.cf.taste.common.TasteExceptionCopyright © 2012-2013. All Rights Reserved.