Skip to content

Conversation

simonpcouch
Copy link
Contributor

Together with #934, puts us under 100% overhead in the causal estimate bootstrapping example. :)

With main dev:

library(tidymodels)

lr <- fit(logistic_reg(), Class ~ ., two_class_dat)

bench::mark(
  old = predict(lr, two_class_dat, type = "prob")
)
#> # A tibble: 1 × 6
#>   expression      min   median `itr/sec` mem_alloc `gc/sec`
#>   <bch:expr> <bch:tm> <bch:tm>     <dbl> <bch:byt>    <dbl>
#> 1 old          3.01ms   3.12ms      305.    3.62MB     6.27

With this PR:

#> # A tibble: 1 × 6
#>   expression      min   median `itr/sec` mem_alloc `gc/sec`
#>   <bch:expr> <bch:tm> <bch:tm>     <dbl> <bch:byt>    <dbl>
#> 1 new          2.14ms   2.44ms      398.   84.78KB     6.19

Created on 2023-03-20 with reprex v2.0.2

@simonpcouch simonpcouch requested a review from hfrick March 20, 2023 14:02
Copy link
Member

@hfrick hfrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I would just suggest changing the name on one object since remove_intercept a) suggests a boolean and b) is only a part of that object (the whole tibble on encodings).

Co-authored-by: Hannah Frick <hfrick@users.noreply.github.com>
@simonpcouch
Copy link
Contributor Author

Perfect, thanks. :)

@simonpcouch simonpcouch merged commit 34f74fe into main Mar 21, 2023
@simonpcouch simonpcouch deleted the prepare_data branch March 21, 2023 18:33
@github-actions
Copy link

github-actions bot commented Apr 5, 2023

This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants