diff --git a/tests/testthat/_snaps/asymmetric-causal-output.md b/tests/testthat/_snaps/asymmetric-causal-output.md index dfe44a39..69d88372 100644 --- a/tests/testthat/_snaps/asymmetric-causal-output.md +++ b/tests/testthat/_snaps/asymmetric-causal-output.md @@ -659,7 +659,7 @@ * Approach: categorical * Adaptive estimation: FALSE * Number of feature-wise Shapley values: 4 - * Number of observations to explain: 3 + * Number of observations to explain: 2 * Causal ordering: {Solar.R_factor, Wind_factor}, {Ozone_sub30_factor}, {Month_factor} * Components with confounding: {Solar.R_factor, Wind_factor} @@ -670,9 +670,8 @@ Output explain_id none Month_factor Ozone_sub30_factor Solar.R_factor Wind_factor - 1: 1 42.44 -11.613 12.57 -8.702 7.235 - 2: 2 42.44 -3.868 -10.67 23.074 -23.367 - 3: 3 42.44 22.619 -14.62 -4.992 -21.367 + 1: 1 42.44 -10.128 15.35 -10.26 4.526 + 2: 2 42.44 -4.316 -10.80 21.06 -20.769 # output_cat_asym_causal_mixed_cat_ad diff --git a/tests/testthat/_snaps/asymmetric-causal-output/output_categorical_asym_causal_mixed_cat.rds b/tests/testthat/_snaps/asymmetric-causal-output/output_categorical_asym_causal_mixed_cat.rds index 5af69e71..adf82daa 100644 Binary files a/tests/testthat/_snaps/asymmetric-causal-output/output_categorical_asym_causal_mixed_cat.rds and b/tests/testthat/_snaps/asymmetric-causal-output/output_categorical_asym_causal_mixed_cat.rds differ diff --git a/tests/testthat/test-asymmetric-causal-output.R b/tests/testthat/test-asymmetric-causal-output.R index 3e8451f2..0ae98f76 100644 --- a/tests/testthat/test-asymmetric-causal-output.R +++ b/tests/testthat/test-asymmetric-causal-output.R @@ -453,19 +453,22 @@ test_that("output_categorical_asym_causal_mixed_cat", { explain( testing = TRUE, model = model_lm_categorical, - x_explain = x_explain_categorical, + x_explain = x_explain_categorical[1:2], #Temp [1:2] as [1:3] give different sample on GHA-macOS for unknown reason x_train = x_train_categorical, approach = "categorical", prediction_zero = p0, asymmetric = FALSE, causal_ordering = list(3:4, 2, 1), confounding = c(TRUE, FALSE, FALSE), - n_MC_samples = 5 # Just for speed + n_MC_samples = 5, # Just for speed + keep_samp_for_vS = TRUE ), "output_categorical_asym_causal_mixed_cat" ) }) + + test_that("output_cat_asym_causal_mixed_cat_ad", { expect_snapshot_rds( explain( @@ -480,7 +483,7 @@ test_that("output_cat_asym_causal_mixed_cat_ad", { confounding = c(TRUE, FALSE, FALSE), n_MC_samples = 5, # Just for speed adaptive = TRUE - ), + ), "output_cat_asym_causal_mixed_cat_ad" ) })