Skip to content

Commit cbcb918

Browse files
committed
Merge branch 'master' into update-gh-actions
2 parents dbb0afc + 0bcc6dd commit cbcb918

File tree

6 files changed

+38
-27
lines changed

6 files changed

+38
-27
lines changed

R/boost_tree.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ xgb_train <- function(
301301

302302

303303
if (is.numeric(y)) {
304-
loss <- "reg:linear"
304+
loss <- "reg:squarederror"
305305
} else {
306306
lvl <- levels(y)
307307
y <- as.numeric(y) - 1
@@ -399,7 +399,7 @@ xgb_pred <- function(object, newdata, ...) {
399399

400400
x = switch(
401401
object$params$objective,
402-
"reg:linear" = , "reg:logistic" = , "binary:logistic" = res,
402+
"reg:squarederror" = , "reg:logistic" = , "binary:logistic" = res,
403403
"binary:logitraw" = stats::binomial()$linkinv(res),
404404
"multi:softprob" = matrix(res, ncol = object$params$num_class, byrow = TRUE),
405405
res

R/predict.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
#' is the parameter for the tail area of the intervals
2424
#' (e.g. confidence level for confidence intervals).
2525
#' Default value is 0.95.
26-
#' \item `std_error`: add the standard error of fit or
27-
#' prediction for `type`s of "conf_int" and "pred_int".
28-
#' Default value is `FALSE`.
26+
#' \item `std_error`: add the standard error of fit or prediction (on
27+
#' the scale of the linear predictors) for `type`s of "conf_int"
28+
#' and "pred_int". Default value is `FALSE`.
2929
#' \item `quantile`: the quantile(s) for quantile regression
3030
#' (not implemented yet)
3131
#' \item `time`: the time(s) for hazard probability estimates

README.Rmd

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ knitr::opts_chunk$set(
2121
[![CRAN status](https://www.r-pkg.org/badges/version/parsnip)](https://CRAN.R-project.org/package=parsnip)
2222
[![Downloads](http://cranlogs.r-pkg.org/badges/parsnip)](https://cran.rstudio.com/package=parsnip)
2323
[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing)
24-
25-
[![Codecov test coverage](https://codecov.io/gh/tidymodels/parsnip/branch/master/graph/badge.svg)](https://codecov.io/gh/tidymodels/parsnip?branch=master)
26-
[![R build status](https://github.com/tidymodels/parsnip/workflows/R-CMD-check/badge.svg)](https://github.com/tidymodels/parsnip/actions)
2724
<!-- badges: end -->
2825

2926
## Introduction
@@ -129,6 +126,12 @@ Data sets previously found in `parsnip` are now find in the `modeldata` package.
129126

130127
## Contributing
131128

132-
If you encounter a bug, please file a minimal reproducible example on [GitHub](https://github.com/tidymodels/parsnip/issues). For questions and other discussion, please use [community.rstudio.com](https://community.rstudio.com/).
129+
This project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.
130+
131+
- For questions and discussions about tidymodels packages, modeling, and machine learning, please [post on RStudio Community](https://rstd.io/tidymodels-community).
132+
133+
- If you think you have encountered a bug, please [submit an issue](https://github.com/tidymodels/parsnip/issues).
134+
135+
- Either way, learn how to create and share a [reprex](https://rstd.io/reprex) (a minimal, reproducible example), to clearly communicate about your code.
133136

134-
Please note that the parsnip project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.
137+
- Check out further details on [contributing guidelines for tidymodels packages](https://www.tidymodels.org/contribute/) and [how to get help](https://www.tidymodels.org/help/).

README.md

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ status](https://codecov.io/gh/tidymodels/parsnip/branch/master/graph/badge.svg)]
1313
status](https://www.r-pkg.org/badges/version/parsnip)](https://CRAN.R-project.org/package=parsnip)
1414
[![Downloads](http://cranlogs.r-pkg.org/badges/parsnip)](https://cran.rstudio.com/package=parsnip)
1515
[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing)
16-
1716
<!-- badges: end -->
1817

1918
## Introduction
@@ -141,7 +140,7 @@ rand_forest(mtry = 10, trees = 2000) %>%
141140
fit(mpg ~ ., data = mtcars)
142141
#> parsnip model object
143142
#>
144-
#> Fit time: 69ms
143+
#> Fit time: 71ms
145144
#> Ranger result
146145
#>
147146
#> Call:
@@ -155,8 +154,8 @@ rand_forest(mtry = 10, trees = 2000) %>%
155154
#> Target node size: 5
156155
#> Variable importance mode: impurity
157156
#> Splitrule: variance
158-
#> OOB prediction error (MSE): 5.815633
159-
#> R squared (OOB): 0.839896
157+
#> OOB prediction error (MSE): 5.911312
158+
#> R squared (OOB): 0.837262
160159
```
161160

162161
A list of all `parsnip` models across different CRAN packages can be
@@ -167,12 +166,21 @@ package.
167166

168167
## Contributing
169168

170-
If you encounter a bug, please file a minimal reproducible example on
171-
[GitHub](https://github.com/tidymodels/parsnip/issues). For questions
172-
and other discussion, please use
173-
[community.rstudio.com](https://community.rstudio.com/).
174-
175-
Please note that the parsnip project is released with a [Contributor
176-
Code of
169+
This project is released with a [Contributor Code of
177170
Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html).
178171
By contributing to this project, you agree to abide by its terms.
172+
173+
- For questions and discussions about tidymodels packages, modeling,
174+
and machine learning, please [post on RStudio
175+
Community](https://rstd.io/tidymodels-community).
176+
177+
- If you think you have encountered a bug, please [submit an
178+
issue](https://github.com/tidymodels/parsnip/issues).
179+
180+
- Either way, learn how to create and share a
181+
[reprex](https://rstd.io/reprex) (a minimal, reproducible example),
182+
to clearly communicate about your code.
183+
184+
- Check out further details on [contributing guidelines for tidymodels
185+
packages](https://www.tidymodels.org/contribute/) and [how to get
186+
help](https://www.tidymodels.org/help/).

man/other_predict.Rd

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/predict.model_fit.Rd

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)