@@ -12,10 +12,12 @@ testthat::test_that("new_observation as list", {
12
12
13
13
if (requireNamespace(" xgboost" , quietly = TRUE )) {
14
14
testthat :: test_that(" check_single_prediction error" , {
15
- testthat :: expect_error(
16
- ms <- modelStudio :: modelStudio(explainer_xgb ,
17
- new_observation = model_matrix_train [1 ,],
18
- show_info = v , B = 3 )
15
+ testthat :: expect_warning(
16
+ testthat :: expect_error(
17
+ ms <- modelStudio :: modelStudio(explainer_xgb ,
18
+ new_observation = model_matrix_train [1 ,],
19
+ show_info = v , B = 3 )
20
+ )
19
21
)
20
22
})
21
23
}
@@ -37,8 +39,8 @@ testthat::test_that("removed modelStudioOptions", {
37
39
if (requireNamespace(" ranger" , quietly = TRUE )) {
38
40
ms <- modelStudio :: modelStudio(explain_rf , apartments [1 : 2 ,], N = 5 , B = 2 , show_info = v )
39
41
new_ms <- modelStudio :: ms_update_observations(ms , explain_rf , B = 2 , show_info = v ,
40
- new_observation = apartments [1 ,],
41
- new_observation_y = apartments $ m2.price [1 ])
42
+ new_observation = apartments [3 ,],
43
+ new_observation_y = apartments $ m2.price [3 ])
42
44
43
45
testthat :: test_that(" duplicated ids" , {
44
46
testthat :: expect_is(new_ms , " modelStudio" )
0 commit comments