Description Usage Arguments Value Examples
Boosting Predictions
1 2 |
object |
a |
new_data |
data to compute predictions for. |
eval_times |
numeric vector of times to compute survival probabilities. |
... |
Additional arguments passed to other functions.
|
a matrix
with number of columns equal to the number of
eval_times
and number of rows equal to the number of rows in
new_data
. Additionally, eval_times
are attached to the output
as an attribute.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | x1 <- rnorm(100)
x2 <- rnorm(100)
s <- as.numeric(x1 + x2 + rnorm(100) > 0)
t <- runif(100, min=1, max=10)
df = data.frame(time=t, status=s, x1=x1, x2=x2)
df = as_sgb_data(df, time=time, status=status)
sgb_booster <- sgb_fit(
sgb_df = df,
params = sgb_params(max_depth=1),
nrounds = 10,
verbose = FALSE
)
sgb_probs <- predict(sgb_booster, new_data = df)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.