@@ -4,23 +4,23 @@ source("test_objects.R")
4
4
5
5
testthat :: test_that(" new_observation as list" , {
6
6
testthat :: expect_warning(
7
- modelStudio :: modelStudio(explain_glm ,
7
+ ms <- modelStudio :: modelStudio(explain_glm ,
8
8
new_observation = as.list(titanic_test [1 ,- 9 ]),
9
9
show_info = v , B = 3 )
10
10
)
11
11
})
12
12
13
13
testthat :: test_that(" check_single_prediction error" , {
14
14
testthat :: expect_error(
15
- modelStudio :: modelStudio(explainer_xgb ,
15
+ ms <- modelStudio :: modelStudio(explainer_xgb ,
16
16
new_observation = model_matrix_train [1 ,],
17
17
show_info = v , B = 3 )
18
18
)
19
19
})
20
20
21
21
testthat :: test_that(" deprecated modelStudioOptions" , {
22
22
testthat :: expect_warning(
23
- modelStudio :: modelStudioOptions()
23
+ ms <- modelStudio :: modelStudioOptions()
24
24
)
25
25
})
26
26
@@ -32,7 +32,7 @@ new_ms <- modelStudio::ms_update_observations(ms, explain_rf, B = 2, show_info =
32
32
testthat :: test_that(" duplicated ids" , {
33
33
testthat :: expect_is(new_ms , " modelStudio" )
34
34
testthat :: expect_warning(
35
- modelStudio :: ms_update_observations(ms , explain_rf , B = 2 , show_info = v ,
35
+ ms <- modelStudio :: ms_update_observations(ms , explain_rf , B = 2 , show_info = v ,
36
36
new_observation = apartments [1 ,],
37
37
new_observation_y = apartments $ m2.price [1 ])
38
38
)
0 commit comments