Skip to content

Commit 2aaee25

Browse files
committed
Merge branch 'main' into feature/case-weights
2 parents 0698b6d + 5716803 commit 2aaee25

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+4109
-2141
lines changed

DESCRIPTION

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Suggests:
6060
sparklyr (>= 1.0.0),
6161
survival,
6262
tensorflow,
63-
testthat,
63+
testthat (>= 3.0.0),
6464
xgboost (>= 1.5.0.1)
6565
Remotes:
6666
tidymodels/hardhat
@@ -75,4 +75,5 @@ Config/rcmdcheck/ignore-inconsequential-notes: true
7575
Encoding: UTF-8
7676
LazyData: true
7777
Roxygen: list(markdown = TRUE)
78+
Config/testthat/edition: 3
7879
RoxygenNote: 7.1.2.9000

tests/testthat/_snaps/boost_tree.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# updating
2+
3+
Code
4+
expr1 %>% update(trees = 10)
5+
Output
6+
Boosted Tree Model Specification (unknown)
7+
8+
Main Arguments:
9+
trees = 10
10+
11+
Engine-Specific Arguments:
12+
verbose = 0
13+
14+
Computational engine: xgboost
15+
16+
17+
---
18+
19+
Code
20+
expr1 %>% update(param_tibb)
21+
Output
22+
Boosted Tree Model Specification (unknown)
23+
24+
Main Arguments:
25+
mtry = 1
26+
trees = 7
27+
28+
Engine-Specific Arguments:
29+
verbose = 0
30+
31+
Computational engine: xgboost
32+
33+
34+
---
35+
36+
Code
37+
expr1 %>% update(param_list)
38+
Output
39+
Boosted Tree Model Specification (unknown)
40+
41+
Main Arguments:
42+
mtry = 1
43+
trees = 7
44+
45+
Engine-Specific Arguments:
46+
verbose = 0
47+
48+
Computational engine: xgboost
49+
50+
51+
---
52+
53+
Code
54+
expr2 %>% update(bands = 10)
55+
Output
56+
Boosted Tree Model Specification (unknown)
57+
58+
Main Arguments:
59+
trees = tune()
60+
61+
Engine-Specific Arguments:
62+
bands = 10
63+
64+
Computational engine: C5.0
65+
66+
67+
---
68+
69+
Code
70+
expr3 %>% update(trees = 1, fresh = TRUE)
71+
Output
72+
Boosted Tree Model Specification (unknown)
73+
74+
Main Arguments:
75+
trees = 1
76+
77+
Computational engine: xgboost
78+
79+
80+
---
81+
82+
Code
83+
expr4 %>% update(noGlobalPruning = TRUE)
84+
Output
85+
Boosted Tree Model Specification (unknown)
86+
87+
Engine-Specific Arguments:
88+
noGlobalPruning = TRUE
89+
90+
Computational engine: C5.0
91+
92+
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# updating
2+
3+
Code
4+
expr1 %>% update(cost_complexity = 0.1)
5+
Output
6+
Decision Tree Model Specification (unknown)
7+
8+
Main Arguments:
9+
cost_complexity = 0.1
10+
11+
Engine-Specific Arguments:
12+
model = FALSE
13+
14+
Computational engine: rpart
15+
16+
17+
---
18+
19+
Code
20+
expr1 %>% update(param_tibb)
21+
Output
22+
Decision Tree Model Specification (unknown)
23+
24+
Main Arguments:
25+
cost_complexity = 0.1
26+
min_n = 1
27+
28+
Engine-Specific Arguments:
29+
model = FALSE
30+
31+
Computational engine: rpart
32+
33+
34+
---
35+
36+
Code
37+
expr1 %>% update(param_list)
38+
Output
39+
Decision Tree Model Specification (unknown)
40+
41+
Main Arguments:
42+
cost_complexity = 0.1
43+
min_n = 1
44+
45+
Engine-Specific Arguments:
46+
model = FALSE
47+
48+
Computational engine: rpart
49+
50+
51+
---
52+
53+
Code
54+
expr2 %>% update(model = FALSE)
55+
Output
56+
Decision Tree Model Specification (unknown)
57+
58+
Main Arguments:
59+
cost_complexity = tune()
60+
61+
Engine-Specific Arguments:
62+
model = FALSE
63+
64+
Computational engine: rpart
65+
66+
67+
---
68+
69+
Code
70+
expr3 %>% update(cost_complexity = 1, fresh = TRUE)
71+
Output
72+
Decision Tree Model Specification (unknown)
73+
74+
Main Arguments:
75+
cost_complexity = 1
76+
77+
Computational engine: rpart
78+
79+

tests/testthat/_snaps/linear_reg.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# updating
2+
3+
Code
4+
expr1 %>% update(mixture = 0)
5+
Output
6+
Linear Regression Model Specification (regression)
7+
8+
Main Arguments:
9+
mixture = 0
10+
11+
Engine-Specific Arguments:
12+
model = FALSE
13+
14+
Computational engine: lm
15+
16+
17+
---
18+
19+
Code
20+
expr2 %>% update(nlambda = 10)
21+
Output
22+
Linear Regression Model Specification (regression)
23+
24+
Engine-Specific Arguments:
25+
nlambda = 10
26+
27+
Computational engine: glmnet
28+
29+
30+
---
31+
32+
Code
33+
expr3 %>% update(mixture = 1, fresh = TRUE, nlambda = 10)
34+
Output
35+
Linear Regression Model Specification (regression)
36+
37+
Main Arguments:
38+
mixture = 1
39+
40+
Engine-Specific Arguments:
41+
nlambda = 10
42+
43+
Computational engine: glmnet
44+
45+
46+
---
47+
48+
Code
49+
expr3 %>% update(nlambda = 10)
50+
Output
51+
Linear Regression Model Specification (regression)
52+
53+
Main Arguments:
54+
penalty = tune()
55+
mixture = 0
56+
57+
Engine-Specific Arguments:
58+
nlambda = 10
59+
60+
Computational engine: glmnet
61+
62+
63+
---
64+
65+
Code
66+
expr4 %>% update(param_tibb)
67+
Output
68+
Linear Regression Model Specification (regression)
69+
70+
Main Arguments:
71+
penalty = 1
72+
mixture = 0.333333333333333
73+
74+
Engine-Specific Arguments:
75+
nlambda = 10
76+
77+
Computational engine: glmnet
78+
79+
80+
---
81+
82+
Code
83+
expr4 %>% update(param_list)
84+
Output
85+
Linear Regression Model Specification (regression)
86+
87+
Main Arguments:
88+
penalty = 1
89+
mixture = 0.333333333333333
90+
91+
Engine-Specific Arguments:
92+
nlambda = 10
93+
94+
Computational engine: glmnet
95+
96+
97+
---
98+
99+
Code
100+
expr5 %>% update(family = "poisson")
101+
Output
102+
Linear Regression Model Specification (regression)
103+
104+
Engine-Specific Arguments:
105+
family = poisson
106+
107+
Computational engine: glm
108+
109+

tests/testthat/_snaps/logistic_reg.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# updating
2+
3+
Code
4+
expr1 %>% update(mixture = 0)
5+
Output
6+
Logistic Regression Model Specification (classification)
7+
8+
Main Arguments:
9+
mixture = 0
10+
11+
Engine-Specific Arguments:
12+
family = expr(binomial(link = "probit"))
13+
14+
Computational engine: glm
15+
16+
17+
---
18+
19+
Code
20+
expr2 %>% update(nlambda = 10)
21+
Output
22+
Logistic Regression Model Specification (classification)
23+
24+
Main Arguments:
25+
mixture = tune()
26+
27+
Engine-Specific Arguments:
28+
nlambda = 10
29+
30+
Computational engine: glmnet
31+
32+
33+
---
34+
35+
Code
36+
expr3 %>% update(mixture = 1, fresh = TRUE, nlambda = 10)
37+
Output
38+
Logistic Regression Model Specification (classification)
39+
40+
Main Arguments:
41+
mixture = 1
42+
43+
Engine-Specific Arguments:
44+
nlambda = 10
45+
46+
Computational engine: glmnet
47+
48+
49+
---
50+
51+
Code
52+
expr4 %>% update(param_tibb)
53+
Output
54+
Logistic Regression Model Specification (classification)
55+
56+
Main Arguments:
57+
penalty = 1
58+
mixture = 0.333333333333333
59+
60+
Engine-Specific Arguments:
61+
nlambda = 10
62+
63+
Computational engine: glmnet
64+
65+
66+
---
67+
68+
Code
69+
expr4 %>% update(param_list)
70+
Output
71+
Logistic Regression Model Specification (classification)
72+
73+
Main Arguments:
74+
penalty = 1
75+
mixture = 0.333333333333333
76+
77+
Engine-Specific Arguments:
78+
nlambda = 10
79+
80+
Computational engine: glmnet
81+
82+

0 commit comments

Comments
 (0)