Skip to content

Commit 2a42154

Browse files
Fix summary bug
Precompute Vignette models, use data in vignette specification Fix to edge prior class
1 parent 16bf413 commit 2a42154

20 files changed

+23
-18
lines changed

NEWS.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,21 @@
22

33
## New features
44

5-
* NUTS and HMC options are not provided for sampling the bgm and bgmCompare model
5+
* NUTS and HMC options are now provided for sampling the bgm and bgmCompare model
66
* Sampling for multiple chains can now be done in parallel
77
* Markov chain diagnostics are now offered for the sampled parameters
88

99
## Other changes
1010

1111
* Improved progress bar for parallel sampling
1212
* User interrupt for parallel sampling
13-
* More extensive summary and print options are provided
13+
* More extensive summary and print options are provided; integrates summary_SBM
14+
* Removed the options for modeling the main differences; main differences are now always estimated or selected similar to the old `main_difference_model = "collapse"` option.
1415

1516
## Bug fixes
1617

17-
* Fixed a bug in the bgmCompare function with missing data handling
18-
* Fixed a bug in the SBM prior handling
18+
* Fixed an out-of-bounds bug in the bgmCompare function with missing data handling
19+
* Fixed a bug in the SBM prior computation
1920

2021
# bgms 0.1.5.0
2122

R/bgms-methods.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ print.summary.bgms <- function(x, digits = 3, ...) {
117117
cat("Inclusion probabilities:\n")
118118
ind <- head(x$indicator, 6)
119119
ind[] <- lapply(ind, function(col) ifelse(is.na(col), "", round(col, digits)))
120-
print(ind, row.names = FALSE)
120+
print(ind)
121121
if (nrow(x$indicator) > 6)
122122
cat("... (use `summary(fit)$indicator` to see full output)\n")
123123
cat("Note: NA values are suppressed in the print table. They occur when an indicator\n")

inst/extdata/fit_5items.rds

863 KB
Binary file not shown.

inst/extdata/fit_boredom.rds

1.25 MB
Binary file not shown.

src/common_helpers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ inline UpdateMethod update_method_from_string(const std::string& update_method)
4444
enum EdgePrior { Stochastic_Block, Beta_Bernoulli, Bernoulli, Not_Applicable };
4545

4646
inline EdgePrior edge_prior_from_string(const std::string& edge_prior) {
47-
if (edge_prior == "stochastic-block")
47+
if (edge_prior == "Stochastic-Block")
4848
return Stochastic_Block;
4949

5050
if (edge_prior == "Beta-Bernoulli")

vignettes/comparison.Rmd

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ data_english = data_english[, 1:5]
4141
```
4242

4343
# Fitting a model
44-
45-
```{r, cache=TRUE, results = "hide"}
44+
```{r, include=FALSE}
45+
fit <- readRDS(system.file("extdata", "fit_boredom.rds", package = "bgms"))
46+
```
47+
```{r, eval = FALSE}
4648
fit = bgmCompare(x = data_french, y = data_english, seed = 1234)
4749
```
4850
Note: During fitting, progress bars are shown in interactive sessions.

vignettes/comparison_cache/html/__packages

Lines changed: 0 additions & 1 deletion
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)