Native gradient tree boosting (ESL Algorithm 10.3 with shrinkage); no boosted-trees package is loaded or called.
Usage
morie_gradient_boosting_ensemble(
x,
y,
n_estimators = 100L,
learning_rate = 0.1,
max_depth = 3L,
task = "auto",
seed = 0L,
deterministic_seed = NULL
)Arguments
- x
Numeric predictor matrix.
- y
Response.
- n_estimators
Number of boosting iterations.
- learning_rate
Shrinkage nu.
- max_depth
Depth of each tree.
- task
"auto", "classification", or "regression".
- seed
RNG seed.
- deterministic_seed
Integer or NULL. If supplied, the RNG state is derived from the SHA-keyed
morie_det_rng()so Py<->R streams agree on the canonical fixture. WhenNULL(default), behaviour is unchanged:seeddrivesset.seed()directly.
Value
Named list: estimate, train_score, feature_importances, n_estimators, learning_rate, max_depth, task, n, method.
Examples
set.seed(1)
morie_gradient_boosting_ensemble(x = rnorm(50), y = rnorm(50))
#> $estimate
#> [1] 0.9541126
#>
#> $train_score
#> [1] 0.9541126
#>
#> $feature_importances
#> [1] 0.4205544 0.5794456
#>
#> $n_estimators
#> [1] 100
#>
#> $learning_rate
#> [1] 0.1
#>
#> $max_depth
#> [1] 3
#>
#> $task
#> [1] "regression"
#>
#> $backend
#> [1] "native"
#>
#> $n
#> [1] 50
#>
#> $method
#> [1] "Gradient Boosting (regression, native)"
#>
