SKL Runner
The SKL runner is responsible for executing a trained ML models (Regression & classification) to make predictions or perform tasks. It takes input data, applies the model's knowledge, and generates the desired output.
Method: POST Authorization: API Keyhttps://engine.raccoon-ai.io/api/v1/runner/skl/<permanent_model_id>
Important: To use SKL runner, first you need to make train model with trainer
and make that cached model
to permanent model
.
Authorization
Type | Key | Value |
---|---|---|
API Key | X-Api-Key | rae_########## |
Request Body
Section | Key | Data Type | Required | Description |
---|---|---|---|---|
train | data | json | true | Data that use to train the model |
features | list | true | Input features (X) | |
targets | list | true | Output targets (y) | |
config | json | false | Train configurations | |
project | project_id | string | true | ID of the project |
Types
{
"data":<json>,
"config": <json>
}
Sample
{
"data": {
"R&D Spend": {
"0": 165349.2,
"1": 162597.7,
"2": 153441.51,
"3": 144372.41,
"4": 142107.34
},
"Administration": {
"0": 136897.8,
"1": 151377.59,
"2": 101145.55,
"3": 118671.85,
"4": 91391.77
},
"Marketing Spend": {
"0": 471784.1,
"1": 443898.53,
"2": 407934.54,
"3": 383199.62,
"4": 366168.42
},
"State": {
"0": "New York",
"1": "California",
"2": "Florida",
"3": "New York",
"4": "Florida"
}
},
"config": {
"include_inputs": true
}
}
Reponse Body
Key | Data Type | Description |
---|---|---|
success | boolean | Indicate the success of the request |
msg | string | Message indicators |
error_code | int | Error code information, only set if success is false |
result | json | Result, only set if success is true |
gen_at | datetime | Generated datetime |
Types
{
"success": <bool>,
"msg": <string>,
"error": <null> or <string>,
"result": <json>,
"score": <json>,
"generated_ts": <timestamp>
}
Sample
{
"success": true,
"msg": "Runner predicted successfully",
"error": null,
"result": {
"R&D Spend": {
"0": 165349.2,
"1": 162597.7,
"2": 153441.51,
"3": 144372.41,
"4": 142107.34
},
"Administration": {
"0": 136897.8,
"1": 151377.59,
"2": 101145.55,
"3": 118671.85,
"4": 91391.77
},
"Marketing Spend": {
"0": 471784.1,
"1": 443898.53,
"2": 407934.54,
"3": 383199.62,
"4": 366168.42
},
"State": {
"0": "New York",
"1": "California",
"2": "Florida",
"3": "New York",
"4": "Florida"
},
"Profit": {
"0": 190209.72,
"1": 186863.18,
"2": 179790.26,
"3": 171576.92,
"4": 169898.04
}
},
"score": {
"train": 0.942446542689397,
"test": 0.9649618042060305
},
"generated_ts": 1686130100.870728
}