tests/testthat/helper_model.R

## A special file sourced by testthat.

get_basescore <- function(model) {
  as.numeric(
    jsonlite::fromJSON(model$learner$learner_model_param$base_score)
  )
}

Try the xgboost package in your browser

Any scripts or data that you put into this service are public.

xgboost documentation built on Dec. 3, 2025, 5:06 p.m.