@Singleton @Path(value="/similarityToItem") public final class SimilarityToItem extends AbstractOryxResource
Responds to a GET request to /similarityToItem/[toItemID]/[itemID1](/[itemID2]/...)
.
This computes cosine similarity between an item and one or more other items.
The output are similarities, in the same order as the item IDs, with format
as in Estimate
INPUT_PRODUCER_KEY, MODEL_MANAGER_KEY
Constructor and Description |
---|
SimilarityToItem() |
Modifier and Type | Method and Description |
---|---|
List<Double> |
get(String toItemID,
List<javax.ws.rs.core.PathSegment> pathSegmentsList) |
check, check, checkExists, checkNotReadOnly, getServingModel, isReadOnly, maybeBuffer, maybeBuffer, maybeDecompress, parseMultipart, sendInput
getInputProducer, getServingModelManager, init
@GET @Path(value="{toItemID}/{itemID : .+}") @Produces(value={"text/plain","text/csv","application/json"}) public List<Double> get(@PathParam(value="toItemID") String toItemID, @PathParam(value="itemID") List<javax.ws.rs.core.PathSegment> pathSegmentsList) throws OryxServingException
OryxServingException
Copyright © 2014–2018. All rights reserved.