diff --git a/DESCRIPTION b/DESCRIPTION index 9bb0e0da..ffc5407f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,12 +1,12 @@ Package: tidypredict -Version: 0.4.8.9000 +Version: 0.4.8.9001 Title: Run Predictions Inside the Database Description: It parses a fitted 'R' model object, and returns a formula in 'Tidy Eval' code that calculates the predictions. It works with several databases back-ends because it leverages 'dplyr' and 'dbplyr' for the final 'SQL' translation of the algorithm. It currently supports lm(), glm(), randomForest(), ranger(), earth(), xgb.Booster.complete(), - cubist(), and ctree() models. + cubist(), and ctree() models. Authors@R: person("Max", "Kuhn", email = "max@rstudio.com", role = c("aut", "cre")) Depends: diff --git a/R/model-xgboost.R b/R/model-xgboost.R index cb8ada38..0d838a00 100644 --- a/R/model-xgboost.R +++ b/R/model-xgboost.R @@ -116,7 +116,7 @@ get_xgb_case <- function(path, prediction, digits = NA) { get_xgb_case_tree <- function(tree_no, parsedmodel, digits = NA) { purrr::map( parsedmodel$trees[[tree_no]], - ~ get_xgb_case(.x$path, .x$prediction, digits) + ~ get_xgb_case(.x$path, round(.x$prediction, 3), digits) ) }