@@ -83,12 +83,11 @@ plot.BayesMallowsSMC2 <- function(x, parameter = "alpha", items = NULL, ...) {
8383}
8484
8585
86- # ' @keywords internal
87- # ' Helper function to create weighted samples from parameter values
88- # ' @param values Numeric vector of parameter values
89- # ' @param weights Numeric vector of importance weights
90- # ' @param n_samples Number of samples to draw (default 10000)
91- # ' @return Numeric vector of weighted samples
86+ # Helper function to create weighted samples from parameter values
87+ # @param values Numeric vector of parameter values
88+ # @param weights Numeric vector of importance weights
89+ # @param n_samples Number of samples to draw (default 10000)
90+ # @return Numeric vector of weighted samples
9291create_weighted_samples <- function (values , weights , n_samples = 10000 ) {
9392 sample_probs <- weights / sum(weights )
9493 sampled_indices <- sample(seq_along(values ), size = n_samples ,
@@ -97,7 +96,7 @@ create_weighted_samples <- function(values, weights, n_samples = 10000) {
9796}
9897
9998
100- # ' @keywords internal
99+ # Internal function to plot alpha parameter
101100plot_alpha_smc <- function (x ) {
102101 # Extract alpha values and weights
103102 # alpha is a matrix: [n_clusters, n_particles]
@@ -142,7 +141,7 @@ plot_alpha_smc <- function(x) {
142141}
143142
144143
145- # ' @keywords internal
144+ # Internal function to plot tau parameter
146145plot_tau_smc <- function (x ) {
147146 # Extract tau values and weights
148147 # tau is a matrix: [n_clusters, n_particles]
@@ -186,7 +185,7 @@ plot_tau_smc <- function(x) {
186185}
187186
188187
189- # ' @keywords internal
188+ # Internal function to plot rho parameter
190189plot_rho_smc <- function (x , items = NULL ) {
191190 # Extract rho array and weights
192191 # rho is a 3D array: [n_items, n_clusters, n_particles]
0 commit comments