1
1
test_that(" sparse matrices can be passed to `fit_xy()" , {
2
- skip_if_not_installed(" LiblineaR " )
2
+ skip_if_not_installed(" xgboost " )
3
3
4
4
hotel_data <- sparse_hotel_rates()
5
5
6
- spec <- svm_linear () %> %
6
+ spec <- boost_tree () %> %
7
7
set_mode(" regression" ) %> %
8
- set_engine(" LiblineaR " )
8
+ set_engine(" xgboost " )
9
9
10
10
expect_no_error(
11
11
lm_fit <- fit_xy(spec , x = hotel_data [, - 1 ], y = hotel_data [, 1 ])
@@ -21,7 +21,7 @@ test_that("sparse matrices can be passed to `fit_xy()", {
21
21
})
22
22
23
23
test_that(" to_sparse_data_frame() is used correctly" , {
24
- skip_if_not_installed(" LiblineaR " )
24
+ skip_if_not_installed(" xgboost " )
25
25
26
26
local_mocked_bindings(
27
27
to_sparse_data_frame = function (x , object ) {
@@ -50,9 +50,9 @@ test_that("to_sparse_data_frame() is used correctly", {
50
50
fit_xy(spec , x = hotel_data [, - 1 ], y = hotel_data [, 1 ])
51
51
)
52
52
53
- spec <- svm_linear () %> %
53
+ spec <- boost_tree () %> %
54
54
set_mode(" regression" ) %> %
55
- set_engine(" LiblineaR " )
55
+ set_engine(" xgboost " )
56
56
57
57
expect_snapshot(
58
58
error = TRUE ,
@@ -61,7 +61,7 @@ test_that("to_sparse_data_frame() is used correctly", {
61
61
})
62
62
63
63
test_that(" maybe_sparse_matrix() is used correctly" , {
64
- skip_if_not_installed(" LiblineaR " )
64
+ skip_if_not_installed(" xgboost " )
65
65
66
66
local_mocked_bindings(
67
67
maybe_sparse_matrix = function (x ) {
@@ -75,9 +75,9 @@ test_that("maybe_sparse_matrix() is used correctly", {
75
75
76
76
hotel_data <- sparse_hotel_rates()
77
77
78
- spec <- svm_linear () %> %
78
+ spec <- boost_tree () %> %
79
79
set_mode(" regression" ) %> %
80
- set_engine(" LiblineaR " )
80
+ set_engine(" xgboost " )
81
81
82
82
expect_snapshot(
83
83
error = TRUE ,
0 commit comments