-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxgb_config.yaml
More file actions
32 lines (26 loc) · 1.79 KB
/
xgb_config.yaml
File metadata and controls
32 lines (26 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Enhanced XGBoost Configuration for Flood Depth Prediction (Tweedie Objective)
# Objective
objective: reg:tweedie # models zero + positive skewed values (ideal for flood depth)
tweedie_variance_power: 1.3 # adjust between 1.1–1.9 depending on data
eval_metric: rmse # root mean square error
# Boosting rounds & learning
n_estimators: 500 # total boosting rounds
learning_rate: 0.5 # learning rate (try 0.03–0.1 range if tuning)
# Tree structure control using depth
tree_method: hist # efficient CPU histogram algorithm (use gpu_hist for GPU)
grow_policy: depthwise # grow trees depth-wise (standard method)
max_depth: 8 # maximum tree depth to control complexity
# Regularization to avoid overfitting
reg_lambda: 3.0 # stronger L2 regularization
reg_alpha: 1.0 # stronger L1 regularization
min_child_weight: 10 # minimum data in a child node before split
gamma: 1.0 # minimum loss reduction to allow a split
max_delta_step: 1 # limits size of leaf value updates (adds numerical stability)
# Subsampling
subsample: 0.8 # row sampling for each tree
colsample_bytree: 0.8 # feature sampling for each tree
# Optimization and reproducibility
early_stopping_rounds: 30 # stop early if no improvement on validation set
random_state: 42 # reproducibility
n_jobs: -1 # utilize all CPU cores
verbosity: 1 # warnings only (set to 2 for more logs, or 0 for silent)