@@ -10,7 +10,7 @@ test_that("sparse tibble can be passed to `fit() - supported", {
1010
1111 expect_snapshot(
1212 error = TRUE ,
13- lm_fit <- fit(spec , avg_price_per_room ~ . , data = hotel_data )
13+ xgb_fit <- fit(spec , avg_price_per_room ~ . , data = hotel_data )
1414 )
1515})
1616
@@ -38,7 +38,7 @@ test_that("sparse matrix can be passed to `fit() - supported", {
3838
3939 expect_snapshot(
4040 error = TRUE ,
41- lm_fit <- fit(spec , avg_price_per_room ~ . , data = hotel_data )
41+ xgb_fit <- fit(spec , avg_price_per_room ~ . , data = hotel_data )
4242 )
4343
4444})
@@ -66,7 +66,7 @@ test_that("sparse tibble can be passed to `fit_xy() - supported", {
6666 set_engine(" xgboost" )
6767
6868 expect_no_error(
69- lm_fit <- fit_xy(spec , x = hotel_data [, - 1 ], y = hotel_data [, 1 ])
69+ xgb_fit <- fit_xy(spec , x = hotel_data [, - 1 ], y = hotel_data [, 1 ])
7070 )
7171})
7272
@@ -93,7 +93,7 @@ test_that("sparse matrices can be passed to `fit_xy() - supported", {
9393 set_engine(" xgboost" )
9494
9595 expect_no_error(
96- lm_fit <- fit_xy(spec , x = hotel_data [, - 1 ], y = hotel_data [, 1 ])
96+ xgb_fit <- fit_xy(spec , x = hotel_data [, - 1 ], y = hotel_data [, 1 ])
9797 )
9898})
9999
@@ -190,30 +190,30 @@ test_that("sparse data work with xgboost engine", {
190190 hotel_data <- sparse_hotel_rates()
191191
192192 expect_no_error(
193- tree_fit <- fit_xy(spec , x = hotel_data [, - 1 ], y = hotel_data [, 1 ])
193+ xgb_fit <- fit_xy(spec , x = hotel_data [, - 1 ], y = hotel_data [, 1 ])
194194 )
195195
196196 expect_no_error(
197- predict(tree_fit , hotel_data )
197+ predict(xgb_fit , hotel_data )
198198 )
199199
200200 hotel_data <- sparse_hotel_rates(tibble = TRUE )
201201
202202 expect_snapshot(
203203 error = TRUE ,
204- tree_fit <- fit(spec , avg_price_per_room ~ . , data = hotel_data )
204+ xgb_fit <- fit(spec , avg_price_per_room ~ . , data = hotel_data )
205205 )
206206
207207 expect_no_error(
208- predict(tree_fit , hotel_data )
208+ predict(xgb_fit , hotel_data )
209209 )
210210
211211 expect_no_error(
212- tree_fit <- fit_xy(spec , x = hotel_data [, - 1 ], y = hotel_data [, 1 ])
212+ xgb_fit <- fit_xy(spec , x = hotel_data [, - 1 ], y = hotel_data [, 1 ])
213213 )
214214
215215 expect_no_error(
216- predict(tree_fit , hotel_data )
216+ predict(xgb_fit , hotel_data )
217217 )
218218})
219219
0 commit comments