Skip to main content
POST
/
quantlib
/
ml
/
regression
/
tree
Tree-Based Regression (Decision Tree, Gradient Boosting)
curl --request POST \
  --url https://finceptbackend.share.zrok.io/quantlib/ml/regression/tree \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "X": [
    [
      1.2,
      0.5,
      3.1
    ],
    [
      2.1,
      1.3,
      2.5
    ],
    [
      0.8,
      0.9,
      4.2
    ]
  ],
  "y": [
    0.35,
    0.42,
    0.28
  ],
  "method": "gradient_boosting",
  "max_depth": 3,
  "n_estimators": 50,
  "learning_rate": 0.05,
  "predict_X": [
    [
      1.5,
      0.7,
      3.3
    ]
  ]
}
'
{
  "success": true,
  "data": {
    "predictions": [
      0.38
    ],
    "feature_importances": [
      0.45,
      0.32,
      0.23
    ]
  }
}

Authorizations

X-API-Key
string
header
required

API key for authentication. Get your key at https://finceptbackend.share.zrok.io/auth/register

Body

application/json
X
number[][]
required

Feature matrix

Example:
[
[1.2, 0.5, 3.1],
[2.1, 1.3, 2.5],
[0.8, 0.9, 4.2]
]
y
number[]
required

Continuous target values

Example:
[0.35, 0.42, 0.28]
method
enum<string>
default:tree

Tree method

Available options:
tree,
gradient_boosting
Example:

"gradient_boosting"

max_depth
integer
default:5

Maximum tree depth

Example:

3

n_estimators
integer
default:100

Number of trees (for gradient boosting)

Example:

50

learning_rate
number
default:0.1

Learning rate (for gradient boosting)

Example:

0.05

predict_X
number[][]

Optional feature matrix for prediction

Example:
[[1.5, 0.7, 3.3]]

Response

Tree regression results

success
boolean
Example:

true

data
object