108 lines
3.1 KiB
YAML
108 lines
3.1 KiB
YAML
openapi: 3.1.0
|
|
info:
|
|
title: XGBoost model API
|
|
version: 1.0.0
|
|
components:
|
|
schemas:
|
|
data_model:
|
|
type: object
|
|
properties:
|
|
scaler_method:
|
|
type: string
|
|
enum: ["MinMax", "Standard Scaler"]
|
|
default: null
|
|
example: "MinMax"
|
|
description: "Scaling strategy."
|
|
window_size:
|
|
type: integer
|
|
default: 0
|
|
example: 3
|
|
description: "Rolling window size used to generate lagged statistics for the target."
|
|
use_filtering:
|
|
type: boolean
|
|
default: false
|
|
example: false
|
|
description: "Whether to filter rows based on a CI column during `fit` (expects a binary CI column)."
|
|
transform_mode:
|
|
type: string
|
|
enum: ["all", "latest"]
|
|
default: "all"
|
|
example: "all"
|
|
description: "Prediction mode, `'all'` to keep all rows or `'latest'` to return only the last row."
|
|
arpr_config:
|
|
type: object
|
|
properties:
|
|
ci_col:
|
|
type: string
|
|
x-feature: true
|
|
ar_col:
|
|
type: string
|
|
x-feature: true
|
|
pr_col:
|
|
type: string
|
|
x-feature: true
|
|
example:
|
|
ci_col: "col_1"
|
|
ar_col: "col_2"
|
|
pr_col: "col_3"
|
|
description: "Optional configuration mapping for AR/PR substitution."
|
|
opt_params:
|
|
type: object
|
|
properties:
|
|
tree_method:
|
|
type: string
|
|
enum: ["hist", "exact", "approx"]
|
|
default: "hist"
|
|
example: "hist"
|
|
description: "Tree construction algorithm."
|
|
device:
|
|
type: string
|
|
enum: ["cuda", "cpu"]
|
|
default: "cuda"
|
|
example: "cuda"
|
|
description: "Device for computation."
|
|
learning_rate:
|
|
type: number
|
|
default: 0.3
|
|
example: 0.3
|
|
description: "Step size shrinkage to prevent overfitting."
|
|
n_estimators:
|
|
type: integer
|
|
default: 100
|
|
example: 100
|
|
description: "Number of boosting rounds."
|
|
max_depth:
|
|
type: integer
|
|
default: 32
|
|
example: 32
|
|
description: "Maximum depth of a tree."
|
|
subsample:
|
|
type: number
|
|
minimum: 0.0
|
|
maximum: 1.0
|
|
default: 0.8
|
|
example: 0.8
|
|
description: "Subsample ratio of the training instances."
|
|
colsample_bytree:
|
|
type: number
|
|
minimum: 0.0
|
|
maximum: 1.0
|
|
default: 0.8
|
|
example: 0.8
|
|
description: "Subsample ratio of columns when constructing each tree."
|
|
min_child_weight:
|
|
type: integer
|
|
default: 5
|
|
example: 5
|
|
description: "Minimum sum of instance weight in a child node."
|
|
random_state:
|
|
type: integer
|
|
default: 42
|
|
example: 42
|
|
description: "Seed for XGBoost random number generation."
|
|
early_stopping_rounds:
|
|
type: integer
|
|
default: null
|
|
example: 100
|
|
description: "If set, enables early stopping."
|