1
1
test_that(" validation of adjustments (regression)" , {
2
2
expect_no_condition(
3
3
reg_tailor <-
4
- tailor(type = " regression " ) %> %
4
+ tailor() %> %
5
5
adjust_numeric_calibration() %> %
6
6
adjust_numeric_range(lower_limit = 2 ) %> %
7
7
adjust_predictions_custom(squared = .pred ^ 2 )
8
8
)
9
9
10
10
expect_snapshot(
11
11
error = TRUE ,
12
- tailor(type = " regression " ) %> %
12
+ tailor() %> %
13
13
adjust_numeric_range(lower_limit = 2 ) %> %
14
14
adjust_numeric_calibration() %> %
15
15
adjust_predictions_custom(squared = .pred ^ 2 )
@@ -19,7 +19,7 @@ test_that("validation of adjustments (regression)", {
19
19
# modifies the prediction?
20
20
expect_no_condition(
21
21
reg_tailor <-
22
- tailor(type = " regression " ) %> %
22
+ tailor() %> %
23
23
adjust_predictions_custom(squared = .pred ^ 2 ) %> %
24
24
adjust_numeric_calibration() %> %
25
25
adjust_numeric_range(lower_limit = 2 )
@@ -29,14 +29,14 @@ test_that("validation of adjustments (regression)", {
29
29
test_that(" validation of adjustments (classification)" , {
30
30
expect_no_condition(
31
31
cls_tailor_1 <-
32
- tailor(type = " binary " ) %> %
32
+ tailor() %> %
33
33
adjust_probability_calibration(" logistic" ) %> %
34
34
adjust_probability_threshold(threshold = .4 )
35
35
)
36
36
37
37
expect_no_condition(
38
38
cls_tailor_2 <-
39
- tailor(type = " binary " ) %> %
39
+ tailor() %> %
40
40
adjust_predictions_custom(starch = " potato" ) %> %
41
41
adjust_predictions_custom(veg = " green beans" ) %> %
42
42
adjust_probability_calibration(" logistic" ) %> %
@@ -45,7 +45,7 @@ test_that("validation of adjustments (classification)", {
45
45
46
46
expect_snapshot(
47
47
error = TRUE ,
48
- tailor(type = " binary " ) %> %
48
+ tailor() %> %
49
49
adjust_probability_threshold(threshold = .4 ) %> %
50
50
adjust_probability_calibration()
51
51
)
@@ -59,7 +59,7 @@ test_that("validation of adjustments (classification)", {
59
59
60
60
expect_snapshot(
61
61
error = TRUE ,
62
- tailor(type = " binary " ) %> %
62
+ tailor() %> %
63
63
adjust_predictions_custom(veg = " potato" ) %> %
64
64
adjust_probability_threshold(threshold = .4 ) %> %
65
65
adjust_probability_calibration()
@@ -75,7 +75,7 @@ test_that("validation of adjustments (classification)", {
75
75
76
76
expect_snapshot(
77
77
error = TRUE ,
78
- tailor(type = " binary " ) %> %
78
+ tailor() %> %
79
79
adjust_predictions_custom(veg = " potato" ) %> %
80
80
adjust_probability_threshold(threshold = .4 ) %> %
81
81
adjust_probability_threshold(threshold = .5 ) %> %
@@ -93,7 +93,7 @@ test_that("validation of adjustments (classification)", {
93
93
94
94
expect_snapshot(
95
95
error = TRUE ,
96
- tailor(type = " binary " ) %> %
96
+ tailor() %> %
97
97
adjust_equivocal_zone(value = .2 ) %> %
98
98
adjust_probability_threshold(threshold = .4 )
99
99
)
0 commit comments