ml.gradient_boosting Histogram gradient boosting regression or classification (scikit-learn). Writes a SpadeModel with an ONNX graph that models.predict scores without Python; before the model is written, the graph scores the training rows and must agree with the fitted model, or the block fails. Early stopping is off, so the number of trees never depends on a random validation split.
Kind: standardNetwork: noName Type Description datafile (Parquet or CSV) Training table: one row per observation, with the target, the predictor columns, and any weights or id columns. targetstring The response column. featuresstring Column selector for the predictors: names, globs and exclusions, e.g. B*,MB*,-B0. taskstring regression (default) predicts a number; classification predicts the target's classes, with a probability for each.id_columnsstring Column selector for identifier columns, never used as predictors; kept as text when reading CSV. Default empty. weightsstring Column of non-negative observation weights. Empty fits unweighted. categoricalstring Column selector for numeric-coded predictors to treat as categorical. Categoricals are one-hot encoded, one column per level. Default empty. na_actionstring fail (default, naming the columns) or drop: what to do with a row that has a missing value in a model column.seednumber Seed for the model's randomness and for fold assignment; the same seed gives the same model. Default 0. cv_foldsnumber K-fold cross-validation (0 for none). The model is always fitted on all rows. Default 0. cv_groupstring Column whose values are kept together in one fold (e.g. a county id), so spatially related rows do not leak between folds. Default empty. learning_ratenumber Shrinkage applied to each tree. Default 0.1. max_iternumber Boosting iterations (trees per class). Default 100. max_depthnumber Maximum tree depth. Leave empty (the default) for no limit beyond max_leaf_nodes. max_leaf_nodesnumber Maximum leaves per tree. Default 31. min_samples_leafnumber Minimum rows in a leaf. Default 20. l2_regularizationnumber L2 penalty on leaf values. Default 0.
Outputs🔗 Name Type Description modelfile (SpadeModel) The fitted model with its ONNX graph, for models.predict . fitjson Rows used and dropped, the arguments that shaped the fit, and metrics: rmse, mae, r_squared (regression) or accuracy, log_loss (classification), with cv_ versions when cross-validated.
Example🔗 - id : " @fit "
name : ml.gradient_boosting
inputs :
- " @plots "
args :
target : " present "
features : " elevation_m,canopy_cover_pct,forest_type "
task : " classification "
cv_folds : 5 ← Previous ml.select_best Next → ml.random_forest