Seldon REST API for Prediction

The Seldon prediction REST API has a single endpoint which injest arbitrary JSON objects representing feature data to be used to train a model

Use the relevant API endpoint to provide predictions

An API method can be called with the following template

[GET|POST]      /endpoint?oauth_token=t

For security reasons using the HTTPS protocol is recommended.

Events

Events allow input into Seldon of arbitrary events from which we wish to create a predictive model.

POST     /events

Example

The service injects house price data

{
"num_bedrooms"    :        2,
"detached" 	  : true,
"postcode"    :        "SW1",
"price" : 400000
}

Prediction (Classification)

POST     /predict

The endpoint should be passed JSON containing features from which a prediction is to be made.

A request can have two parts

The meta data can at present just contain a provided optional prediction id “puid”.

Example

A housing price predictor based on features:

{
"meta" :
       {
		"puid" : 1
       },
"data":
	{
		"num_bedrooms"    :        2,
		"detached" 	  : true,
		"postcode"    :        "SW1"
	}
}

Output

{
  "meta": {
    "puid": "1",
    "modelName": "model_prices",
    "variation": "default"
  },
"predictions":
	[
	{"prediction":400000,"predictedClass":"1","confidence":1.0}
	]
}