Simulated Bayes Calibration with CmdStanPy#
Uses toy model from Example of InferenceData schema in PyStan.
# read data
data = pd.read_csv("../../schema/linear_regression_data.csv", index_col=0)
time_since_joined = data.time.values
slack_comments = data.comments.values
github_commits = data.commits.values
names = data.index.values
N = len(names)
prior_model = CmdStanModel(stan_file="linreg_prior.stan")
linreg_prior_data_dict = {"N": N, "time_since_joined": time_since_joined}
write_stan_json("linreg_prior.data.json", linreg_prior_data_dict)
prior_fit = prior_model.sample(data="linreg_prior.data.json", chains=2, iter_sampling=100)
03:19:07 - cmdstanpy - INFO - CmdStan start processing
03:19:07 - cmdstanpy - INFO - CmdStan done processing.
idata_kwargs = dict(
prior_predictive=["slack_comments_hat", "github_commits_hat"],
posterior_predictive=["slack_comments_hat", "github_commits_hat"],
log_likelihood={
"slack_comments": "log_likelihood_slack_comments",
"github_commits": "log_likelihood_github_commits",
},
coords={"developer": names},
dims={
"slack_comments": ["developer"],
"github_commits": ["developer"],
"slack_comments_hat": ["developer"],
"github_commits_hat": ["developer"],
"time_since_joined": ["developer"],
},
)
idata_orig = az.from_cmdstanpy(prior=prior_fit, **idata_kwargs).stack(
prior_draw=["chain", "draw"], groups="prior_groups"
)
idata_orig
arviz.InferenceData
-
<xarray.Dataset> Dimensions: (prior_draw: 200) Coordinates: * prior_draw (prior_draw) object MultiIndex * chain (prior_draw) int64 0 0 0 0 0 0 0 0 0 0 ... 1 1 1 1 1 1 1 1 1 1 * draw (prior_draw) int64 0 1 2 3 4 5 6 7 ... 92 93 94 95 96 97 98 99 Data variables: b0 (prior_draw) float64 104.4 -239.1 -249.9 ... 222.8 -46.17 b1 (prior_draw) float64 116.8 -175.4 -71.92 ... -162.4 7.715 274.3 log_b_sigma (prior_draw) float64 6.163 6.122 5.205 ... 3.633 6.172 6.076 b_sigma (prior_draw) float64 474.6 455.6 182.3 ... 37.84 479.3 435.3 c0 (prior_draw) float64 -2.87 -6.738 11.82 ... -10.68 -11.76 c1 (prior_draw) float64 18.08 -7.793 4.934 ... -2.836 -14.52 log_c_sigma (prior_draw) float64 6.163 6.122 5.205 ... 3.633 6.172 6.076 c_sigma (prior_draw) float64 9.529 6.93 6.605 ... 1.642 4.487 3.449 Attributes: created_at: 2022-11-10T02:19:07.951878 arviz_version: 0.13.0 inference_library: cmdstanpy inference_library_version: 1.0.8
-
<xarray.Dataset> Dimensions: (developer: 5, prior_draw: 200) Coordinates: * developer (developer) object 'Alice' 'Bob' ... 'Danielle' 'Erika' * prior_draw (prior_draw) object MultiIndex * chain (prior_draw) int64 0 0 0 0 0 0 0 0 0 ... 1 1 1 1 1 1 1 1 * draw (prior_draw) int64 0 1 2 3 4 5 6 ... 94 95 96 97 98 99 Data variables: slack_comments_hat (developer, prior_draw) float64 701.6 ... 4.755e+03 github_commits_hat (developer, prior_draw) float64 82.57 -39.29 ... -270.4 Attributes: created_at: 2022-11-10T02:19:07.963278 arviz_version: 0.13.0 inference_library: cmdstanpy inference_library_version: 1.0.8
-
<xarray.Dataset> Dimensions: (prior_draw: 200) Coordinates: * prior_draw (prior_draw) object MultiIndex * chain (prior_draw) int64 0 0 0 0 0 0 0 0 0 ... 1 1 1 1 1 1 1 1 1 * draw (prior_draw) int64 0 1 2 3 4 5 6 7 ... 93 94 95 96 97 98 99 Data variables: lp (prior_draw) float64 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 acceptance_rate (prior_draw) float64 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 Attributes: created_at: 2022-11-10T02:19:07.958479 arviz_version: 0.13.0 inference_library: cmdstanpy inference_library_version: 1.0.8
model = CmdStanModel(stan_file="linreg_model.stan")
linreg_base_data = {
"N": N,
"time_since_joined": time_since_joined,
}
prior_pred = idata_orig.prior_predictive
S = prior_pred.dims["prior_draw"]
idata_list = []
for i in range(S):
data_s = prior_pred.isel(prior_draw=i)
data_dict = {
"slack_comments": data_s["slack_comments_hat"].values,
"github_commits": data_s["github_commits_hat"].values,
**linreg_base_data,
}
write_stan_json("linreg_data.json", data_dict)
fit = model.sample(data="linreg_data.json")
idata = az.from_cmdstanpy(posterior=fit, **idata_kwargs)
idata_list.append(idata)
03:19:08 - cmdstanpy - INFO - CmdStan start processing
03:19:08 - cmdstanpy - INFO - CmdStan done processing.
03:19:08 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 1 had 1 divergent transitions (0.1%)
Chain 2 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:19:08 - cmdstanpy - INFO - CmdStan start processing
03:19:08 - cmdstanpy - INFO - CmdStan done processing.
03:19:09 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 3 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:19:09 - cmdstanpy - INFO - CmdStan start processing
03:19:09 - cmdstanpy - INFO - CmdStan done processing.
03:19:09 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 4 had 2 divergent transitions (0.2%)
Use function "diagnose()" to see further information.
03:19:09 - cmdstanpy - INFO - CmdStan start processing
03:19:09 - cmdstanpy - INFO - CmdStan done processing.
03:19:10 - cmdstanpy - INFO - CmdStan start processing
03:19:10 - cmdstanpy - INFO - CmdStan done processing.
03:19:10 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 2 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:19:10 - cmdstanpy - INFO - CmdStan start processing
03:19:10 - cmdstanpy - INFO - CmdStan done processing.
03:19:10 - cmdstanpy - INFO - CmdStan start processing
03:19:11 - cmdstanpy - INFO - CmdStan done processing.
03:19:11 - cmdstanpy - WARNING - Non-fatal error during sampling:
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Consider re-running with show_console=True if the above output is unclear!
03:19:11 - cmdstanpy - INFO - CmdStan start processing
03:19:11 - cmdstanpy - INFO - CmdStan done processing.
03:19:11 - cmdstanpy - INFO - CmdStan start processing
03:19:12 - cmdstanpy - INFO - CmdStan done processing.
03:19:12 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 4 had 3 divergent transitions (0.3%)
Use function "diagnose()" to see further information.
03:19:12 - cmdstanpy - INFO - CmdStan start processing
03:19:12 - cmdstanpy - INFO - CmdStan done processing.
03:19:12 - cmdstanpy - INFO - CmdStan start processing
03:19:12 - cmdstanpy - INFO - CmdStan done processing.
03:19:13 - cmdstanpy - INFO - CmdStan start processing
03:19:13 - cmdstanpy - INFO - CmdStan done processing.
03:19:13 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 3 had 9 divergent transitions (0.9%)
Use function "diagnose()" to see further information.
03:19:13 - cmdstanpy - INFO - CmdStan start processing
03:19:13 - cmdstanpy - INFO - CmdStan done processing.
03:19:14 - cmdstanpy - INFO - CmdStan start processing
03:19:14 - cmdstanpy - INFO - CmdStan done processing.
03:19:14 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 3 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:19:14 - cmdstanpy - INFO - CmdStan start processing
03:19:14 - cmdstanpy - INFO - CmdStan done processing.
03:19:15 - cmdstanpy - INFO - CmdStan start processing
03:19:15 - cmdstanpy - INFO - CmdStan done processing.
03:19:15 - cmdstanpy - INFO - CmdStan start processing
03:19:15 - cmdstanpy - INFO - CmdStan done processing.
03:19:15 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 2 had 3 divergent transitions (0.3%)
Use function "diagnose()" to see further information.
03:19:15 - cmdstanpy - INFO - CmdStan start processing
03:19:16 - cmdstanpy - INFO - CmdStan done processing.
03:19:16 - cmdstanpy - INFO - CmdStan start processing
03:19:17 - cmdstanpy - INFO - CmdStan done processing.
03:19:17 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 3 had 1 divergent transitions (0.1%)
Chain 4 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:19:17 - cmdstanpy - INFO - CmdStan start processing
03:19:17 - cmdstanpy - INFO - CmdStan done processing.
03:19:17 - cmdstanpy - INFO - CmdStan start processing
03:19:18 - cmdstanpy - INFO - CmdStan done processing.
03:19:18 - cmdstanpy - INFO - CmdStan start processing
03:19:18 - cmdstanpy - INFO - CmdStan done processing.
03:19:18 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 1 had 3 divergent transitions (0.3%)
Chain 2 had 4 divergent transitions (0.4%)
Use function "diagnose()" to see further information.
03:19:18 - cmdstanpy - INFO - CmdStan start processing
03:19:19 - cmdstanpy - INFO - CmdStan done processing.
03:19:19 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 1 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:19:19 - cmdstanpy - INFO - CmdStan start processing
03:19:19 - cmdstanpy - INFO - CmdStan done processing.
03:19:19 - cmdstanpy - INFO - CmdStan start processing
03:19:19 - cmdstanpy - INFO - CmdStan done processing.
03:19:20 - cmdstanpy - INFO - CmdStan start processing
03:19:20 - cmdstanpy - INFO - CmdStan done processing.
03:19:20 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 2 had 4 divergent transitions (0.4%)
Use function "diagnose()" to see further information.
03:19:20 - cmdstanpy - INFO - CmdStan start processing
03:19:20 - cmdstanpy - INFO - CmdStan done processing.
03:19:20 - cmdstanpy - INFO - CmdStan start processing
03:19:21 - cmdstanpy - INFO - CmdStan done processing.
03:19:21 - cmdstanpy - INFO - CmdStan start processing
03:19:21 - cmdstanpy - INFO - CmdStan done processing.
03:19:21 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 1 had 3 divergent transitions (0.3%)
Chain 3 had 3 divergent transitions (0.3%)
Chain 4 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:19:21 - cmdstanpy - INFO - CmdStan start processing
03:19:22 - cmdstanpy - INFO - CmdStan done processing.
03:19:22 - cmdstanpy - INFO - CmdStan start processing
03:19:22 - cmdstanpy - INFO - CmdStan done processing.
03:19:22 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 4 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:19:22 - cmdstanpy - INFO - CmdStan start processing
03:19:23 - cmdstanpy - INFO - CmdStan done processing.
03:19:23 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 3 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:19:23 - cmdstanpy - INFO - CmdStan start processing
03:19:23 - cmdstanpy - INFO - CmdStan done processing.
03:19:23 - cmdstanpy - INFO - CmdStan start processing
03:19:24 - cmdstanpy - INFO - CmdStan done processing.
03:19:24 - cmdstanpy - INFO - CmdStan start processing
03:19:24 - cmdstanpy - INFO - CmdStan done processing.
03:19:24 - cmdstanpy - INFO - CmdStan start processing
03:19:25 - cmdstanpy - INFO - CmdStan done processing.
03:19:25 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 3 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:19:25 - cmdstanpy - INFO - CmdStan start processing
03:19:25 - cmdstanpy - INFO - CmdStan done processing.
03:19:25 - cmdstanpy - INFO - CmdStan start processing
03:19:26 - cmdstanpy - INFO - CmdStan done processing.
03:19:26 - cmdstanpy - INFO - CmdStan start processing
03:19:26 - cmdstanpy - INFO - CmdStan done processing.
03:19:26 - cmdstanpy - INFO - CmdStan start processing
03:19:27 - cmdstanpy - INFO - CmdStan done processing.
03:19:27 - cmdstanpy - INFO - CmdStan start processing
03:19:27 - cmdstanpy - INFO - CmdStan done processing.
03:19:27 - cmdstanpy - INFO - CmdStan start processing
03:19:28 - cmdstanpy - INFO - CmdStan done processing.
03:19:28 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 4 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:19:28 - cmdstanpy - INFO - CmdStan start processing
03:19:28 - cmdstanpy - INFO - CmdStan done processing.
03:19:28 - cmdstanpy - INFO - CmdStan start processing
03:19:28 - cmdstanpy - INFO - CmdStan done processing.
03:19:29 - cmdstanpy - INFO - CmdStan start processing
03:19:29 - cmdstanpy - INFO - CmdStan done processing.
03:19:29 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 4 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:19:29 - cmdstanpy - INFO - CmdStan start processing
03:19:29 - cmdstanpy - INFO - CmdStan done processing.
03:19:29 - cmdstanpy - INFO - CmdStan start processing
03:19:30 - cmdstanpy - INFO - CmdStan done processing.
03:19:30 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 1 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:19:30 - cmdstanpy - INFO - CmdStan start processing
03:19:30 - cmdstanpy - INFO - CmdStan done processing.
03:19:30 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 2 had 9 divergent transitions (0.9%)
Use function "diagnose()" to see further information.
03:19:30 - cmdstanpy - INFO - CmdStan start processing
03:19:31 - cmdstanpy - INFO - CmdStan done processing.
03:19:31 - cmdstanpy - INFO - CmdStan start processing
03:19:31 - cmdstanpy - INFO - CmdStan done processing.
03:19:31 - cmdstanpy - INFO - CmdStan start processing
03:19:31 - cmdstanpy - INFO - CmdStan done processing.
03:19:32 - cmdstanpy - INFO - CmdStan start processing
03:19:32 - cmdstanpy - INFO - CmdStan done processing.
03:19:32 - cmdstanpy - INFO - CmdStan start processing
03:19:32 - cmdstanpy - INFO - CmdStan done processing.
03:19:33 - cmdstanpy - INFO - CmdStan start processing
03:19:33 - cmdstanpy - INFO - CmdStan done processing.
03:19:33 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 4 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:19:33 - cmdstanpy - INFO - CmdStan start processing
03:19:33 - cmdstanpy - INFO - CmdStan done processing.
03:19:33 - cmdstanpy - INFO - CmdStan start processing
03:19:34 - cmdstanpy - INFO - CmdStan done processing.
03:19:34 - cmdstanpy - INFO - CmdStan start processing
03:19:34 - cmdstanpy - INFO - CmdStan done processing.
03:19:34 - cmdstanpy - WARNING - Non-fatal error during sampling:
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Consider re-running with show_console=True if the above output is unclear!
03:19:34 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 2 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:19:34 - cmdstanpy - INFO - CmdStan start processing
03:19:35 - cmdstanpy - INFO - CmdStan done processing.
03:19:35 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 2 had 1 divergent transitions (0.1%)
Chain 4 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:19:35 - cmdstanpy - INFO - CmdStan start processing
03:19:35 - cmdstanpy - INFO - CmdStan done processing.
03:19:35 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 3 had 2 divergent transitions (0.2%)
Use function "diagnose()" to see further information.
03:19:35 - cmdstanpy - INFO - CmdStan start processing
03:19:35 - cmdstanpy - INFO - CmdStan done processing.
03:19:35 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 2 had 18 divergent transitions (1.8%)
Chain 4 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:19:36 - cmdstanpy - INFO - CmdStan start processing
03:19:36 - cmdstanpy - INFO - CmdStan done processing.
03:19:36 - cmdstanpy - INFO - CmdStan start processing
03:19:36 - cmdstanpy - INFO - CmdStan done processing.
03:19:36 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 1 had 1 divergent transitions (0.1%)
Chain 3 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:19:36 - cmdstanpy - INFO - CmdStan start processing
03:19:37 - cmdstanpy - INFO - CmdStan done processing.
03:19:37 - cmdstanpy - INFO - CmdStan start processing
03:19:37 - cmdstanpy - INFO - CmdStan done processing.
03:19:37 - cmdstanpy - INFO - CmdStan start processing
03:19:38 - cmdstanpy - INFO - CmdStan done processing.
03:19:38 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 3 had 1 divergent transitions (0.1%)
Chain 4 had 3 divergent transitions (0.3%)
Use function "diagnose()" to see further information.
03:19:38 - cmdstanpy - INFO - CmdStan start processing
03:19:38 - cmdstanpy - INFO - CmdStan done processing.
03:19:38 - cmdstanpy - INFO - CmdStan start processing
03:19:38 - cmdstanpy - INFO - CmdStan done processing.
03:19:39 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 2 had 2 divergent transitions (0.2%)
Chain 3 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:19:39 - cmdstanpy - INFO - CmdStan start processing
03:19:39 - cmdstanpy - INFO - CmdStan done processing.
03:19:39 - cmdstanpy - INFO - CmdStan start processing
03:19:40 - cmdstanpy - INFO - CmdStan done processing.
03:19:40 - cmdstanpy - INFO - CmdStan start processing
03:19:40 - cmdstanpy - INFO - CmdStan done processing.
03:19:40 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 1 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:19:40 - cmdstanpy - INFO - CmdStan start processing
03:19:40 - cmdstanpy - INFO - CmdStan done processing.
03:19:41 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 2 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:19:41 - cmdstanpy - INFO - CmdStan start processing
03:19:41 - cmdstanpy - INFO - CmdStan done processing.
03:19:41 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 4 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:19:41 - cmdstanpy - INFO - CmdStan start processing
03:19:41 - cmdstanpy - INFO - CmdStan done processing.
03:19:42 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 1 had 3 divergent transitions (0.3%)
Chain 4 had 46 divergent transitions (4.6%)
Use function "diagnose()" to see further information.
03:19:42 - cmdstanpy - INFO - CmdStan start processing
03:19:42 - cmdstanpy - INFO - CmdStan done processing.
03:19:42 - cmdstanpy - INFO - CmdStan start processing
03:19:42 - cmdstanpy - INFO - CmdStan done processing.
03:19:42 - cmdstanpy - INFO - CmdStan start processing
03:19:43 - cmdstanpy - INFO - CmdStan done processing.
03:19:43 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 3 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:19:43 - cmdstanpy - INFO - CmdStan start processing
03:19:43 - cmdstanpy - INFO - CmdStan done processing.
03:19:43 - cmdstanpy - INFO - CmdStan start processing
03:19:44 - cmdstanpy - INFO - CmdStan done processing.
03:19:44 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 3 had 2 divergent transitions (0.2%)
Use function "diagnose()" to see further information.
03:19:44 - cmdstanpy - INFO - CmdStan start processing
03:19:44 - cmdstanpy - INFO - CmdStan done processing.
03:19:44 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 2 had 13 divergent transitions (1.3%)
Use function "diagnose()" to see further information.
03:19:44 - cmdstanpy - INFO - CmdStan start processing
03:19:45 - cmdstanpy - INFO - CmdStan done processing.
03:19:45 - cmdstanpy - INFO - CmdStan start processing
03:19:45 - cmdstanpy - INFO - CmdStan done processing.
03:19:45 - cmdstanpy - WARNING - Non-fatal error during sampling:
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Consider re-running with show_console=True if the above output is unclear!
03:19:45 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 2 had 3 divergent transitions (0.3%)
Use function "diagnose()" to see further information.
03:19:45 - cmdstanpy - INFO - CmdStan start processing
03:19:46 - cmdstanpy - INFO - CmdStan done processing.
03:19:46 - cmdstanpy - WARNING - Non-fatal error during sampling:
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Consider re-running with show_console=True if the above output is unclear!
03:19:46 - cmdstanpy - INFO - CmdStan start processing
03:19:46 - cmdstanpy - INFO - CmdStan done processing.
03:19:46 - cmdstanpy - INFO - CmdStan start processing
03:19:47 - cmdstanpy - INFO - CmdStan done processing.
03:19:47 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 1 had 6 divergent transitions (0.6%)
Chain 3 had 1 divergent transitions (0.1%)
Chain 4 had 3 divergent transitions (0.3%)
Use function "diagnose()" to see further information.
03:19:47 - cmdstanpy - INFO - CmdStan start processing
03:19:47 - cmdstanpy - INFO - CmdStan done processing.
03:19:47 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 1 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:19:47 - cmdstanpy - INFO - CmdStan start processing
03:19:48 - cmdstanpy - INFO - CmdStan done processing.
03:19:48 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 3 had 3 divergent transitions (0.3%)
Use function "diagnose()" to see further information.
03:19:48 - cmdstanpy - INFO - CmdStan start processing
03:19:48 - cmdstanpy - INFO - CmdStan done processing.
03:19:48 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 3 had 3 divergent transitions (0.3%)
Use function "diagnose()" to see further information.
03:19:49 - cmdstanpy - INFO - CmdStan start processing
03:19:49 - cmdstanpy - INFO - CmdStan done processing.
03:19:49 - cmdstanpy - INFO - CmdStan start processing
03:19:49 - cmdstanpy - INFO - CmdStan done processing.
03:19:49 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 1 had 1 divergent transitions (0.1%)
Chain 3 had 5 divergent transitions (0.5%)
Use function "diagnose()" to see further information.
03:19:49 - cmdstanpy - INFO - CmdStan start processing
03:19:50 - cmdstanpy - INFO - CmdStan done processing.
03:19:50 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 1 had 4 divergent transitions (0.4%)
Use function "diagnose()" to see further information.
03:19:50 - cmdstanpy - INFO - CmdStan start processing
03:19:50 - cmdstanpy - INFO - CmdStan done processing.
03:19:50 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 4 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:19:50 - cmdstanpy - INFO - CmdStan start processing
03:19:51 - cmdstanpy - INFO - CmdStan done processing.
03:19:51 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 2 had 2 divergent transitions (0.2%)
Use function "diagnose()" to see further information.
03:19:51 - cmdstanpy - INFO - CmdStan start processing
03:19:51 - cmdstanpy - INFO - CmdStan done processing.
03:19:51 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 4 had 8 divergent transitions (0.8%)
Use function "diagnose()" to see further information.
03:19:51 - cmdstanpy - INFO - CmdStan start processing
03:19:52 - cmdstanpy - INFO - CmdStan done processing.
03:19:52 - cmdstanpy - INFO - CmdStan start processing
03:19:52 - cmdstanpy - INFO - CmdStan done processing.
03:19:53 - cmdstanpy - INFO - CmdStan start processing
03:19:53 - cmdstanpy - INFO - CmdStan done processing.
03:19:53 - cmdstanpy - INFO - CmdStan start processing
03:19:53 - cmdstanpy - INFO - CmdStan done processing.
03:19:54 - cmdstanpy - INFO - CmdStan start processing
03:19:54 - cmdstanpy - INFO - CmdStan done processing.
03:19:54 - cmdstanpy - INFO - CmdStan start processing
03:19:54 - cmdstanpy - INFO - CmdStan done processing.
03:19:54 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 4 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:19:55 - cmdstanpy - INFO - CmdStan start processing
03:19:55 - cmdstanpy - INFO - CmdStan done processing.
03:19:55 - cmdstanpy - INFO - CmdStan start processing
03:19:55 - cmdstanpy - INFO - CmdStan done processing.
03:19:55 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 1 had 2 divergent transitions (0.2%)
Use function "diagnose()" to see further information.
03:19:55 - cmdstanpy - INFO - CmdStan start processing
03:19:56 - cmdstanpy - INFO - CmdStan done processing.
03:19:56 - cmdstanpy - INFO - CmdStan start processing
03:19:56 - cmdstanpy - INFO - CmdStan done processing.
03:19:56 - cmdstanpy - INFO - CmdStan start processing
03:19:57 - cmdstanpy - INFO - CmdStan done processing.
03:19:57 - cmdstanpy - INFO - CmdStan start processing
03:19:57 - cmdstanpy - INFO - CmdStan done processing.
03:19:57 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 4 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:19:57 - cmdstanpy - INFO - CmdStan start processing
03:19:58 - cmdstanpy - INFO - CmdStan done processing.
03:19:58 - cmdstanpy - INFO - CmdStan start processing
03:19:58 - cmdstanpy - INFO - CmdStan done processing.
03:19:58 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 2 had 2 divergent transitions (0.2%)
Use function "diagnose()" to see further information.
03:19:58 - cmdstanpy - INFO - CmdStan start processing
03:19:59 - cmdstanpy - INFO - CmdStan done processing.
03:19:59 - cmdstanpy - WARNING - Non-fatal error during sampling:
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Consider re-running with show_console=True if the above output is unclear!
03:19:59 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 1 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:19:59 - cmdstanpy - INFO - CmdStan start processing
03:19:59 - cmdstanpy - INFO - CmdStan done processing.
03:19:59 - cmdstanpy - WARNING - Non-fatal error during sampling:
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Consider re-running with show_console=True if the above output is unclear!
03:20:00 - cmdstanpy - INFO - CmdStan start processing
03:20:00 - cmdstanpy - INFO - CmdStan done processing.
03:20:00 - cmdstanpy - INFO - CmdStan start processing
03:20:00 - cmdstanpy - INFO - CmdStan done processing.
03:20:00 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 2 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:20:00 - cmdstanpy - INFO - CmdStan start processing
03:20:01 - cmdstanpy - INFO - CmdStan done processing.
03:20:01 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 3 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:20:01 - cmdstanpy - INFO - CmdStan start processing
03:20:01 - cmdstanpy - INFO - CmdStan done processing.
03:20:01 - cmdstanpy - INFO - CmdStan start processing
03:20:02 - cmdstanpy - INFO - CmdStan done processing.
03:20:02 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 4 had 7 divergent transitions (0.7%)
Use function "diagnose()" to see further information.
03:20:02 - cmdstanpy - INFO - CmdStan start processing
03:20:02 - cmdstanpy - INFO - CmdStan done processing.
03:20:02 - cmdstanpy - INFO - CmdStan start processing
03:20:03 - cmdstanpy - INFO - CmdStan done processing.
03:20:03 - cmdstanpy - INFO - CmdStan start processing
03:20:03 - cmdstanpy - INFO - CmdStan done processing.
03:20:03 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 2 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:20:03 - cmdstanpy - INFO - CmdStan start processing
03:20:04 - cmdstanpy - INFO - CmdStan done processing.
03:20:04 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 1 had 2 divergent transitions (0.2%)
Use function "diagnose()" to see further information.
03:20:04 - cmdstanpy - INFO - CmdStan start processing
03:20:04 - cmdstanpy - INFO - CmdStan done processing.
03:20:05 - cmdstanpy - INFO - CmdStan start processing
03:20:05 - cmdstanpy - INFO - CmdStan done processing.
03:20:05 - cmdstanpy - INFO - CmdStan start processing
03:20:05 - cmdstanpy - INFO - CmdStan done processing.
03:20:05 - cmdstanpy - INFO - CmdStan start processing
03:20:06 - cmdstanpy - INFO - CmdStan done processing.
03:20:06 - cmdstanpy - INFO - CmdStan start processing
03:20:06 - cmdstanpy - INFO - CmdStan done processing.
03:20:06 - cmdstanpy - INFO - CmdStan start processing
03:20:07 - cmdstanpy - INFO - CmdStan done processing.
03:20:07 - cmdstanpy - INFO - CmdStan start processing
03:20:07 - cmdstanpy - INFO - CmdStan done processing.
03:20:07 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 2 had 4 divergent transitions (0.4%)
Use function "diagnose()" to see further information.
03:20:07 - cmdstanpy - INFO - CmdStan start processing
03:20:08 - cmdstanpy - INFO - CmdStan done processing.
03:20:08 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 1 had 1 divergent transitions (0.1%)
Chain 4 had 8 divergent transitions (0.8%)
Use function "diagnose()" to see further information.
03:20:08 - cmdstanpy - INFO - CmdStan start processing
03:20:08 - cmdstanpy - INFO - CmdStan done processing.
03:20:08 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 2 had 6 divergent transitions (0.6%)
Use function "diagnose()" to see further information.
03:20:08 - cmdstanpy - INFO - CmdStan start processing
03:20:09 - cmdstanpy - INFO - CmdStan done processing.
03:20:09 - cmdstanpy - INFO - CmdStan start processing
03:20:09 - cmdstanpy - INFO - CmdStan done processing.
03:20:09 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 4 had 2 divergent transitions (0.2%)
Use function "diagnose()" to see further information.
03:20:09 - cmdstanpy - INFO - CmdStan start processing
03:20:10 - cmdstanpy - INFO - CmdStan done processing.
03:20:10 - cmdstanpy - INFO - CmdStan start processing
03:20:10 - cmdstanpy - INFO - CmdStan done processing.
03:20:10 - cmdstanpy - INFO - CmdStan start processing
03:20:11 - cmdstanpy - INFO - CmdStan done processing.
03:20:11 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 1 had 3 divergent transitions (0.3%)
Use function "diagnose()" to see further information.
03:20:11 - cmdstanpy - INFO - CmdStan start processing
03:20:11 - cmdstanpy - INFO - CmdStan done processing.
03:20:11 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 2 had 1 divergent transitions (0.1%)
Chain 3 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:20:11 - cmdstanpy - INFO - CmdStan start processing
03:20:12 - cmdstanpy - INFO - CmdStan done processing.
03:20:12 - cmdstanpy - WARNING - Non-fatal error during sampling:
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Consider re-running with show_console=True if the above output is unclear!
03:20:12 - cmdstanpy - INFO - CmdStan start processing
03:20:12 - cmdstanpy - INFO - CmdStan done processing.
03:20:12 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 3 had 2 divergent transitions (0.2%)
Use function "diagnose()" to see further information.
03:20:12 - cmdstanpy - INFO - CmdStan start processing
03:20:13 - cmdstanpy - INFO - CmdStan done processing.
03:20:13 - cmdstanpy - INFO - CmdStan start processing
03:20:13 - cmdstanpy - INFO - CmdStan done processing.
03:20:13 - cmdstanpy - INFO - CmdStan start processing
03:20:14 - cmdstanpy - INFO - CmdStan done processing.
03:20:14 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 3 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:20:14 - cmdstanpy - INFO - CmdStan start processing
03:20:14 - cmdstanpy - INFO - CmdStan done processing.
03:20:14 - cmdstanpy - WARNING - Non-fatal error during sampling:
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Consider re-running with show_console=True if the above output is unclear!
03:20:14 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 1 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:20:14 - cmdstanpy - INFO - CmdStan start processing
03:20:15 - cmdstanpy - INFO - CmdStan done processing.
03:20:15 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 2 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:20:15 - cmdstanpy - INFO - CmdStan start processing
03:20:15 - cmdstanpy - INFO - CmdStan done processing.
03:20:15 - cmdstanpy - INFO - CmdStan start processing
03:20:16 - cmdstanpy - INFO - CmdStan done processing.
03:20:16 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 3 had 2 divergent transitions (0.2%)
Chain 4 had 9 divergent transitions (0.9%)
Use function "diagnose()" to see further information.
03:20:16 - cmdstanpy - INFO - CmdStan start processing
03:20:16 - cmdstanpy - INFO - CmdStan done processing.
03:20:17 - cmdstanpy - INFO - CmdStan start processing
03:20:17 - cmdstanpy - INFO - CmdStan done processing.
03:20:17 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 1 had 7 divergent transitions (0.7%)
Use function "diagnose()" to see further information.
03:20:17 - cmdstanpy - INFO - CmdStan start processing
03:20:17 - cmdstanpy - INFO - CmdStan done processing.
03:20:17 - cmdstanpy - INFO - CmdStan start processing
03:20:18 - cmdstanpy - INFO - CmdStan done processing.
03:20:18 - cmdstanpy - INFO - CmdStan start processing
03:20:18 - cmdstanpy - INFO - CmdStan done processing.
03:20:18 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 2 had 4 divergent transitions (0.4%)
Use function "diagnose()" to see further information.
03:20:18 - cmdstanpy - INFO - CmdStan start processing
03:20:19 - cmdstanpy - INFO - CmdStan done processing.
03:20:19 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 3 had 23 divergent transitions (2.3%)
Chain 4 had 3 divergent transitions (0.3%)
Use function "diagnose()" to see further information.
03:20:19 - cmdstanpy - INFO - CmdStan start processing
03:20:19 - cmdstanpy - INFO - CmdStan done processing.
03:20:19 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 3 had 2 divergent transitions (0.2%)
Use function "diagnose()" to see further information.
03:20:19 - cmdstanpy - INFO - CmdStan start processing
03:20:20 - cmdstanpy - INFO - CmdStan done processing.
03:20:20 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 1 had 3 divergent transitions (0.3%)
Chain 3 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:20:20 - cmdstanpy - INFO - CmdStan start processing
03:20:20 - cmdstanpy - INFO - CmdStan done processing.
03:20:20 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 1 had 1 divergent transitions (0.1%)
Chain 3 had 9 divergent transitions (0.9%)
Use function "diagnose()" to see further information.
03:20:20 - cmdstanpy - INFO - CmdStan start processing
03:20:21 - cmdstanpy - INFO - CmdStan done processing.
03:20:21 - cmdstanpy - INFO - CmdStan start processing
03:20:21 - cmdstanpy - INFO - CmdStan done processing.
03:20:21 - cmdstanpy - INFO - CmdStan start processing
03:20:22 - cmdstanpy - INFO - CmdStan done processing.
03:20:22 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 3 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:20:22 - cmdstanpy - INFO - CmdStan start processing
03:20:22 - cmdstanpy - INFO - CmdStan done processing.
03:20:22 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 4 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:20:22 - cmdstanpy - INFO - CmdStan start processing
03:20:23 - cmdstanpy - INFO - CmdStan done processing.
03:20:23 - cmdstanpy - INFO - CmdStan start processing
03:20:23 - cmdstanpy - INFO - CmdStan done processing.
03:20:23 - cmdstanpy - INFO - CmdStan start processing
03:20:24 - cmdstanpy - INFO - CmdStan done processing.
03:20:24 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 3 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:20:24 - cmdstanpy - INFO - CmdStan start processing
03:20:24 - cmdstanpy - INFO - CmdStan done processing.
03:20:24 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 1 had 4 divergent transitions (0.4%)
Chain 2 had 11 divergent transitions (1.1%)
Chain 4 had 37 divergent transitions (3.7%)
Use function "diagnose()" to see further information.
03:20:24 - cmdstanpy - INFO - CmdStan start processing
03:20:25 - cmdstanpy - INFO - CmdStan done processing.
03:20:25 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 4 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:20:25 - cmdstanpy - INFO - CmdStan start processing
03:20:25 - cmdstanpy - INFO - CmdStan done processing.
03:20:25 - cmdstanpy - INFO - CmdStan start processing
03:20:26 - cmdstanpy - INFO - CmdStan done processing.
03:20:26 - cmdstanpy - WARNING - Non-fatal error during sampling:
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Consider re-running with show_console=True if the above output is unclear!
03:20:26 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 1 had 3 divergent transitions (0.3%)
Use function "diagnose()" to see further information.
03:20:26 - cmdstanpy - INFO - CmdStan start processing
03:20:26 - cmdstanpy - INFO - CmdStan done processing.
03:20:26 - cmdstanpy - WARNING - Non-fatal error during sampling:
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Consider re-running with show_console=True if the above output is unclear!
03:20:26 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 1 had 2 divergent transitions (0.2%)
Use function "diagnose()" to see further information.
03:20:27 - cmdstanpy - INFO - CmdStan start processing
03:20:27 - cmdstanpy - INFO - CmdStan done processing.
03:20:27 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 1 had 2 divergent transitions (0.2%)
Chain 4 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:20:27 - cmdstanpy - INFO - CmdStan start processing
03:20:27 - cmdstanpy - INFO - CmdStan done processing.
03:20:27 - cmdstanpy - INFO - CmdStan start processing
03:20:28 - cmdstanpy - INFO - CmdStan done processing.
03:20:28 - cmdstanpy - INFO - CmdStan start processing
03:20:28 - cmdstanpy - INFO - CmdStan done processing.
03:20:29 - cmdstanpy - INFO - CmdStan start processing
03:20:29 - cmdstanpy - INFO - CmdStan done processing.
03:20:29 - cmdstanpy - INFO - CmdStan start processing
03:20:30 - cmdstanpy - INFO - CmdStan done processing.
03:20:30 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 3 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:20:30 - cmdstanpy - INFO - CmdStan start processing
03:20:30 - cmdstanpy - INFO - CmdStan done processing.
03:20:30 - cmdstanpy - INFO - CmdStan start processing
03:20:31 - cmdstanpy - INFO - CmdStan done processing.
03:20:31 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 4 had 2 divergent transitions (0.2%)
Use function "diagnose()" to see further information.
03:20:31 - cmdstanpy - INFO - CmdStan start processing
03:20:31 - cmdstanpy - INFO - CmdStan done processing.
03:20:31 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 2 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:20:31 - cmdstanpy - INFO - CmdStan start processing
03:20:32 - cmdstanpy - INFO - CmdStan done processing.
03:20:32 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 2 had 3 divergent transitions (0.3%)
Use function "diagnose()" to see further information.
03:20:32 - cmdstanpy - INFO - CmdStan start processing
03:20:33 - cmdstanpy - INFO - CmdStan done processing.
03:20:33 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 3 had 3 divergent transitions (0.3%)
Use function "diagnose()" to see further information.
03:20:33 - cmdstanpy - INFO - CmdStan start processing
03:20:33 - cmdstanpy - INFO - CmdStan done processing.
03:20:33 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 1 had 1 divergent transitions (0.1%)
Chain 4 had 4 divergent transitions (0.4%)
Use function "diagnose()" to see further information.
03:20:33 - cmdstanpy - INFO - CmdStan start processing
03:20:34 - cmdstanpy - INFO - CmdStan done processing.
03:20:34 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 3 had 9 divergent transitions (0.9%)
Use function "diagnose()" to see further information.
03:20:34 - cmdstanpy - INFO - CmdStan start processing
03:20:34 - cmdstanpy - INFO - CmdStan done processing.
03:20:34 - cmdstanpy - INFO - CmdStan start processing
03:20:34 - cmdstanpy - INFO - CmdStan done processing.
03:20:35 - cmdstanpy - INFO - CmdStan start processing
03:20:35 - cmdstanpy - INFO - CmdStan done processing.
03:20:35 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 4 had 3 divergent transitions (0.3%)
Use function "diagnose()" to see further information.
03:20:35 - cmdstanpy - INFO - CmdStan start processing
03:20:35 - cmdstanpy - INFO - CmdStan done processing.
03:20:35 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 2 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:20:36 - cmdstanpy - INFO - CmdStan start processing
03:20:36 - cmdstanpy - INFO - CmdStan done processing.
03:20:36 - cmdstanpy - INFO - CmdStan start processing
03:20:36 - cmdstanpy - INFO - CmdStan done processing.
03:20:36 - cmdstanpy - WARNING - Non-fatal error during sampling:
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Consider re-running with show_console=True if the above output is unclear!
03:20:36 - cmdstanpy - INFO - CmdStan start processing
03:20:37 - cmdstanpy - INFO - CmdStan done processing.
03:20:37 - cmdstanpy - WARNING - Non-fatal error during sampling:
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Consider re-running with show_console=True if the above output is unclear!
03:20:37 - cmdstanpy - INFO - CmdStan start processing
03:20:37 - cmdstanpy - INFO - CmdStan done processing.
03:20:37 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 2 had 6 divergent transitions (0.6%)
Use function "diagnose()" to see further information.
03:20:37 - cmdstanpy - INFO - CmdStan start processing
03:20:38 - cmdstanpy - INFO - CmdStan done processing.
03:20:38 - cmdstanpy - INFO - CmdStan start processing
03:20:38 - cmdstanpy - INFO - CmdStan done processing.
03:20:38 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 3 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:20:38 - cmdstanpy - INFO - CmdStan start processing
03:20:39 - cmdstanpy - INFO - CmdStan done processing.
03:20:39 - cmdstanpy - WARNING - Non-fatal error during sampling:
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Exception: normal_lpdf: Scale parameter is 0, but must be positive! (in '/home/oriol/Public/arviz/doc/source/user_guide/wrappers/linreg_model.stan', line 27, column 2 to column 64)
Consider re-running with show_console=True if the above output is unclear!
03:20:39 - cmdstanpy - INFO - CmdStan start processing
03:20:39 - cmdstanpy - INFO - CmdStan done processing.
03:20:39 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 3 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:20:39 - cmdstanpy - INFO - CmdStan start processing
03:20:40 - cmdstanpy - INFO - CmdStan done processing.
03:20:40 - cmdstanpy - INFO - CmdStan start processing
03:20:40 - cmdstanpy - INFO - CmdStan done processing.
03:20:41 - cmdstanpy - INFO - CmdStan start processing
03:20:41 - cmdstanpy - INFO - CmdStan done processing.
03:20:41 - cmdstanpy - INFO - CmdStan start processing
03:20:41 - cmdstanpy - INFO - CmdStan done processing.
03:20:41 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 1 had 5 divergent transitions (0.5%)
Use function "diagnose()" to see further information.
03:20:42 - cmdstanpy - INFO - CmdStan start processing
03:20:42 - cmdstanpy - INFO - CmdStan done processing.
03:20:42 - cmdstanpy - INFO - CmdStan start processing
03:20:42 - cmdstanpy - INFO - CmdStan done processing.
03:20:42 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 2 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:20:43 - cmdstanpy - INFO - CmdStan start processing
03:20:43 - cmdstanpy - INFO - CmdStan done processing.
03:20:43 - cmdstanpy - INFO - CmdStan start processing
03:20:43 - cmdstanpy - INFO - CmdStan done processing.
03:20:44 - cmdstanpy - INFO - CmdStan start processing
03:20:44 - cmdstanpy - INFO - CmdStan done processing.
03:20:44 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 4 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:20:44 - cmdstanpy - INFO - CmdStan start processing
03:20:44 - cmdstanpy - INFO - CmdStan done processing.
03:20:44 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 3 had 19 divergent transitions (1.9%)
Chain 4 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:20:45 - cmdstanpy - INFO - CmdStan start processing
03:20:45 - cmdstanpy - INFO - CmdStan done processing.
03:20:45 - cmdstanpy - WARNING - Some chains may have failed to converge.
Chain 1 had 3 divergent transitions (0.3%)
Chain 2 had 1 divergent transitions (0.1%)
Chain 3 had 1 divergent transitions (0.1%)
Chain 4 had 1 divergent transitions (0.1%)
Use function "diagnose()" to see further information.
03:20:45 - cmdstanpy - INFO - CmdStan start processing
03:20:45 - cmdstanpy - INFO - CmdStan done processing.
/home/oriol/Public/arviz/arviz/data/inference_data.py:1427: UserWarning: The group posterior_preditive is not defined in the InferenceData scheme
warnings.warn(
idata_orig
arviz.InferenceData
-
<xarray.Dataset> Dimensions: (chain: 4, draw: 1000, prior_draws: 200) Coordinates: * chain (chain) int64 0 1 2 3 * draw (draw) int64 0 1 2 3 4 5 6 7 ... 993 994 995 996 997 998 999 Dimensions without coordinates: prior_draws Data variables: b0 (prior_draws, chain, draw) float64 -142.3 188.5 ... -84.47 b1 (prior_draws, chain, draw) float64 108.3 100.7 ... 272.0 264.0 log_b_sigma (prior_draws, chain, draw) float64 6.262 6.204 ... 6.04 5.991 c0 (prior_draws, chain, draw) float64 -5.887 -6.946 ... -21.11 c1 (prior_draws, chain, draw) float64 18.71 18.55 ... -13.56 log_c_sigma (prior_draws, chain, draw) float64 1.287 1.423 ... 1.255 1.213 b_sigma (prior_draws, chain, draw) float64 524.5 494.7 ... 420.0 399.8 c_sigma (prior_draws, chain, draw) float64 3.62 4.15 ... 3.508 3.362 Attributes: created_at: 2022-11-10T02:19:08.656243 arviz_version: 0.13.0 inference_library: cmdstanpy inference_library_version: 1.0.8
-
<xarray.Dataset> Dimensions: (prior_draw: 200) Coordinates: * prior_draw (prior_draw) object MultiIndex * chain (prior_draw) int64 0 0 0 0 0 0 0 0 0 0 ... 1 1 1 1 1 1 1 1 1 1 * draw (prior_draw) int64 0 1 2 3 4 5 6 7 ... 92 93 94 95 96 97 98 99 Data variables: b0 (prior_draw) float64 104.4 -239.1 -249.9 ... 222.8 -46.17 b1 (prior_draw) float64 116.8 -175.4 -71.92 ... -162.4 7.715 274.3 log_b_sigma (prior_draw) float64 6.163 6.122 5.205 ... 3.633 6.172 6.076 b_sigma (prior_draw) float64 474.6 455.6 182.3 ... 37.84 479.3 435.3 c0 (prior_draw) float64 -2.87 -6.738 11.82 ... -10.68 -11.76 c1 (prior_draw) float64 18.08 -7.793 4.934 ... -2.836 -14.52 log_c_sigma (prior_draw) float64 6.163 6.122 5.205 ... 3.633 6.172 6.076 c_sigma (prior_draw) float64 9.529 6.93 6.605 ... 1.642 4.487 3.449 Attributes: created_at: 2022-11-10T02:19:07.951878 arviz_version: 0.13.0 inference_library: cmdstanpy inference_library_version: 1.0.8
-
<xarray.Dataset> Dimensions: (developer: 5, prior_draw: 200) Coordinates: * developer (developer) object 'Alice' 'Bob' ... 'Danielle' 'Erika' * prior_draw (prior_draw) object MultiIndex * chain (prior_draw) int64 0 0 0 0 0 0 0 0 0 ... 1 1 1 1 1 1 1 1 * draw (prior_draw) int64 0 1 2 3 4 5 6 ... 94 95 96 97 98 99 Data variables: slack_comments_hat (developer, prior_draw) float64 701.6 ... 4.755e+03 github_commits_hat (developer, prior_draw) float64 82.57 -39.29 ... -270.4 Attributes: created_at: 2022-11-10T02:19:07.963278 arviz_version: 0.13.0 inference_library: cmdstanpy inference_library_version: 1.0.8
-
<xarray.Dataset> Dimensions: (prior_draw: 200) Coordinates: * prior_draw (prior_draw) object MultiIndex * chain (prior_draw) int64 0 0 0 0 0 0 0 0 0 ... 1 1 1 1 1 1 1 1 1 * draw (prior_draw) int64 0 1 2 3 4 5 6 7 ... 93 94 95 96 97 98 99 Data variables: lp (prior_draw) float64 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 acceptance_rate (prior_draw) float64 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 Attributes: created_at: 2022-11-10T02:19:07.958479 arviz_version: 0.13.0 inference_library: cmdstanpy inference_library_version: 1.0.8
-
<xarray.Dataset> Dimensions: (chain: 4, draw: 1000, developer: 5, prior_draws: 200) Coordinates: * chain (chain) int64 0 1 2 3 * draw (draw) int64 0 1 2 3 4 5 6 ... 994 995 996 997 998 999 * developer (developer) object 'Alice' 'Bob' ... 'Danielle' 'Erika' Dimensions without coordinates: prior_draws Data variables: slack_comments_hat (prior_draws, chain, draw, developer) float64 -60.35 ... github_commits_hat (prior_draws, chain, draw, developer) float64 73.82 .... Attributes: created_at: 2022-11-10T02:19:08.671296 arviz_version: 0.13.0 inference_library: cmdstanpy inference_library_version: 1.0.8
The prior sampling code is wrong because it doesn’t take the positive constraint into account, so to get things working quickly I removed the constraint in the data block. I think it is good enough for the proof of concept here.