Skip to content

Commit

Permalink
fixing long running example issue
Browse files Browse the repository at this point in the history
  • Loading branch information
osorensen committed Dec 5, 2023
1 parent c3ebd6e commit 1ff0978
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions inst/examples/compute_mallows_mixtures_example.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ set.seed(1)
n_clusters <- seq(from = 1, to = 5)
models <- compute_mallows_mixtures(
n_clusters = n_clusters, data = setup_rank_data(cluster_data),
compute_options = set_compute_options(nmc = 10000, include_wcd = TRUE))
compute_options = set_compute_options(nmc = 2000, include_wcd = TRUE))

# There is good convergence for 1, 2, and 3 cluster, but not for 4 or 5.
# There is good convergence for 1, 2, and 3 cluster, but not for 5.
# Also note that there seems to be label switching around the 7000th iteration
# for the 2-cluster solution.
assess_convergence(models)
Expand All @@ -17,7 +17,7 @@ plot_elbow(models, burnin = 1000)
mixture_model <- compute_mallows(
data = setup_rank_data(cluster_data),
model_options = set_model_options(n_clusters = 3),
compute_options = set_compute_options(nmc = 5000))
compute_options = set_compute_options(nmc = 2000))

# The trace plot for this model looks good. It seems to converge quickly.
assess_convergence(mixture_model)
Expand Down
6 changes: 3 additions & 3 deletions man/compute_mallows_mixtures.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions man/plot_elbow.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1ff0978

Please sign in to comment.