@Singleton @Path(value="/because") public final class Because extends AbstractOryxResource
Responds to a GET request to /because/[userID]/[itemID](?howMany=n)(&offset=o)
.
Results are items that the user has interacted with that best explain why a given item was recommended. Outputs contain item and score pairs, where the score is an opaque value where higher values mean more relevant to recommendation.
If the user is not known to the model, a
Response.Status.NOT_FOUND
response is generated.
If the user has no known items associated, the response has no elements.
howMany
and offset
behavior, and output, are as in Recommend
.
INPUT_PRODUCER_KEY, MODEL_MANAGER_KEY
Constructor and Description |
---|
Because() |
Modifier and Type | Method and Description |
---|---|
List<IDValue> |
get(String userID,
String itemID,
int howMany,
int offset) |
check, check, checkExists, checkNotReadOnly, getServingModel, isReadOnly, maybeBuffer, maybeBuffer, maybeDecompress, parseMultipart, sendInput
getInputProducer, getServingModelManager, init
@GET @Path(value="{userID}/{itemID}") @Produces(value={"text/plain","text/csv","application/json"}) public List<IDValue> get(@PathParam(value="userID") String userID, @PathParam(value="itemID") String itemID, @DefaultValue(value="10") @QueryParam(value="howMany") int howMany, @DefaultValue(value="0") @QueryParam(value="offset") int offset) throws OryxServingException
OryxServingException
Copyright © 2014–2018. All rights reserved.