Skip to content

Commit 0a4d8c8

Browse files
committed
Added unit test to make sure BCF runs without propensity scores
1 parent e48fd7b commit 0a4d8c8

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/python/test_bcf.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,19 @@ def test_binary_bcf(self):
194194
# Check treatment effect prediction method
195195
tau_hat = bcf_model.predict(X=X_test, Z=Z_test, terms="cate")
196196

197+
# Check that we can run BCF without propensities
198+
bcf_model = BCFModel()
199+
general_params = {"propensity_covariate": "none"}
200+
bcf_model.sample(
201+
X_train=X_train,
202+
Z_train=Z_train,
203+
y_train=y_train,
204+
num_gfr=num_gfr,
205+
num_burnin=num_burnin,
206+
num_mcmc=num_mcmc,
207+
general_params=general_params,
208+
)
209+
197210
def test_continuous_univariate_bcf(self):
198211
# RNG
199212
random_seed = 101

0 commit comments

Comments
 (0)