Reinforcement Learning

Online reinforcement learning API.

post
Reward

https://api.mlrequest.com/v1/rl/reward
Updates a reinforcement learning model with a single reward.
Request
Response
Headers
MLREQ-API-KEY
required
string
Your API key
Body Parameters
model_name
required
string
The name of this model
session_id
required
string
The unique id of this user session
reward
required
number
The reward assigned to the model for performing this action. Smaller is bad, larger is good.
200: OK
{
"message": "OK",
"remainingTransactions": 12345,
"total_active_models": 3,
"timestamp": "2019-10-05T02:33:23.972Z"
}

post
Predict

https://api.mlrequest.com/v1/rl/predict
Returns a single reinforcement learning model prediction.
Request
Response
Headers
MLREQ-API-KEY
required
string
Your API key
Body Parameters
model_name
required
string
The name of this model
session_id
required
string
The unique id of this user session
features
required
object
A map of feature names and their values
epsilon
optional
number
The percentage of time the model will explore new options expressed as a number between 0 and 1
negative_reward
required
number
The negative reward to assign an example if a positive reward never occurs. This reward is assigned 1 hour after prediction.
action_count
required
integer
The total number of actions for this model
action_list
optional
array
A list of actions for the model to choose from
200: OK
Returns a list of actions ordered by a score that estimates how well they will perform. The first action in the list is the highest scored, and therefore most-likely to obtain a good result.
{
"message": "RL prediction",
"predict_result": [2, 1, 3, 7, 5, 4, 9, 0, 6, 8],
"model_name": "my-model",
"remainingTransactions": 12345,
"total_active_models": 3,
"timestamp": "2019-10-05T02:33:23.972Z"
}