@Singleton @Path(value="/distanceToNearest") public final class DistanceToNearest extends AbstractOryxResource
Responds to a GET request to /distanceToNearest/[datum]
. The inputs is a data point
to cluster, delimited, like "1,foo,3.0".
The response body contains the distance from the point to its nearest cluster center. The distance function depends on the model. For now the default is Euclidean distance.
INPUT_PRODUCER_KEY, MODEL_MANAGER_KEY
Constructor and Description |
---|
DistanceToNearest() |
Modifier and Type | Method and Description |
---|---|
String |
get(String datum) |
check, check, checkExists, checkNotReadOnly, getServingModel, isReadOnly, maybeBuffer, maybeBuffer, maybeDecompress, parseMultipart, sendInput
getInputProducer, getServingModelManager, init
@GET @Path(value="{datum}") @Produces(value={"text/plain","text/csv","application/json"}) public String get(@PathParam(value="datum") String datum) throws OryxServingException
OryxServingException
Copyright © 2014–2018. All rights reserved.