Skip to main content

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 Key
https://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

TypeKeyValue
API KeyX-Api-Keyrae_##########

Request Body

SectionKeyData TypeRequiredDescription
traindatajsontrueData that use to train the model
featureslisttrueInput features (X)
targetslisttrueOutput targets (y)
configjsonfalseTrain configurations
projectproject_idstringtrueID 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

KeyData TypeDescription
successbooleanIndicate the success of the request
msgstringMessage indicators
error_codeintError code information, only set if success is false
resultjsonResult, only set if success is true
gen_atdatetimeGenerated 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
}