Skip to content

Commit 51c7f40

Browse files
committed
Switched order of python arguments to match R interface
1 parent 4ff58b7 commit 51c7f40

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

stochtree/bart.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ def sample(
8282
num_gfr: int = 5,
8383
num_burnin: int = 0,
8484
num_mcmc: int = 100,
85+
previous_model_json: Optional[str] = None,
86+
previous_model_warmstart_sample_num: Optional[int] = None,
8587
general_params: Optional[Dict[str, Any]] = None,
8688
mean_forest_params: Optional[Dict[str, Any]] = None,
8789
variance_forest_params: Optional[Dict[str, Any]] = None,
8890
random_effects_params: Optional[Dict[str, Any]] = None,
89-
previous_model_json: Optional[str] = None,
90-
previous_model_warmstart_sample_num: Optional[int] = None,
9191
) -> None:
9292
"""Runs a BART sampler on provided training set. Predictions will be cached for the training set and (if provided) the test set.
9393
Does not require a leaf regression basis.
@@ -2194,8 +2194,8 @@ def compute_contrast(
21942194
def compute_posterior_interval(
21952195
self,
21962196
terms: Union[list[str], str] = "all",
2197-
scale: str = "linear",
21982197
level: float = 0.95,
2198+
scale: str = "linear",
21992199
covariates: np.array = None,
22002200
basis: np.array = None,
22012201
rfx_group_ids: np.array = None,

stochtree/bcf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,13 @@ def sample(
9595
num_gfr: int = 5,
9696
num_burnin: int = 0,
9797
num_mcmc: int = 100,
98+
previous_model_json: Optional[str] = None,
99+
previous_model_warmstart_sample_num: Optional[int] = None,
98100
general_params: Optional[Dict[str, Any]] = None,
99101
prognostic_forest_params: Optional[Dict[str, Any]] = None,
100102
treatment_effect_forest_params: Optional[Dict[str, Any]] = None,
101103
variance_forest_params: Optional[Dict[str, Any]] = None,
102104
random_effects_params: Optional[Dict[str, Any]] = None,
103-
previous_model_json: Optional[str] = None,
104-
previous_model_warmstart_sample_num: Optional[int] = None,
105105
) -> None:
106106
"""Runs a BCF sampler on provided training set. Outcome predictions and estimates of the prognostic and treatment effect functions
107107
will be cached for the training set and (if provided) the test set.
@@ -3261,8 +3261,8 @@ def compute_contrast(
32613261
def compute_posterior_interval(
32623262
self,
32633263
terms: Union[list[str], str] = "all",
3264-
scale: str = "linear",
32653264
level: float = 0.95,
3265+
scale: str = "linear",
32663266
covariates: np.array = None,
32673267
treatment: np.array = None,
32683268
propensity: np.array = None,

0 commit comments

Comments
 (0)