Classification

Online learning classification API.

post
Learn

https://api.mlrequest.com/v1/classifier/learn
Updates an online logistic regression classification model with a single label.
Request
Response
Headers
MLREQ-API-KEY
required
string
Your API key
Body Parameters
model_name
required
string
The name of this model
features
required
object
A map of feature names and their values
label
required
integer
The correct class label for this example
class_count
required
integer
The total number of classes for this model
200: OK
{
"message": "OK",
"remainingTransactions": 12345,
"total_active_models": 3,
"timestamp": "2019-10-05T02:33:23.972Z"
}

post
Predict

https://api.mlrequest.com/v1/classifier/predict
Returns a single online logistic regression classification model prediction.
Request
Response
Headers
MLREQ-API-KEY
required
string
Your API key
Body Parameters
model_name
required
string
The name of this model
features
required
object
A map of feature names and their values
class_count
required
integer
The total number of classes for this model
200: OK
{
"message": "Classifier prediction",
"predict_result": 1,
"class_scores": [
0.4279863,
0.324595,
0.24741869
],
"model_name": "my-model",
"remainingTransactions": 12345,
"total_active_models": 3,
"timestamp": "2019-10-05T02:33:23.972Z"
}

post
Batch Learn

https://api.mlrequest.com/v1/classifier/batch/learn
Updates an online logistic regression classifier model with up to 100 labels.
Request
Response
Headers
MLREQ-API-KEY
required
string
Your API key
Body Parameters
model_name
required
string
The name of this model
training_data
required
object
A list of objects, each of which contain a feature map and an associated label. See example above.
class_count
required
integer
The total number of classes for this model
200: OK
{
"message": "OK",
"remainingTransactions": 12345,
"total_active_models": 3,
"timestamp": "2019-10-05T02:33:23.972Z"
}

post
Batch Predict

https://api.mlrequest.com/v1/classifier/batch/predict
Returns up to 100 online logistic regression classifier model predictions.
Request
Response
Headers
MLREQ-API-KEY
required
string
Your API key
Body Parameters
model_name
required
string
The name of this model
features
required
object
A list of maps, each of which contain feature names and their values
class_count
required
integer
The total number of classes for this model
200: OK
{
"message": "Batch classifier prediction",
"predict_result": [
1,
1,
1
],
"class_scores": [
[
0.4279863,
0.324595,
0.24741869
],
[
0.4279863,
0.324595,
0.24741869
],
[
0.4279863,
0.324595,
0.24741869
]
],
"model_name": "my-model",
"remainingTransactions": 12345,
"total_active_models": 3,
"timestamp": "2019-10-05T02:33:23.972Z"
}