The `sampler_net_attr` class is a simple R6 container used within the `sampler.iglm` class. It holds the MCMC sampling parameters for a single component of the `iglm` model, such as one attribute (e.g., `x_attribute`) or a part of the network (e.g., `z_network` within the overlap). It primarily stores the number of proposals and a random seed.
n_proposals(`integer`) Read-only. The number of MCMC proposals per sampling step.
seed(`integer`) Read-only. The random seed used for this component's sampler.
new()Create a new `sampler_net_attr` object. Validates inputs and sets a random seed if none is provided.
sampler.net.attr.generator$new(n_proposals = 10000, seed = NA, file = NULL)n_proposals(integer) The number of MCMC proposals (iterations) to perform for this specific component during each sampling step. Default is 10000. Must be a non-negative integer.
seed(integer or `NA`) An integer seed for the random number generator to ensure reproducibility for this component's sampling. If `NA` (default), a random seed is generated automatically.
file(character or `NULL`) If provided, loads the sampler state from the specified .rds file instead of initializing from parameters.
A new `sampler_net_attr` object.
print()Print a summary of the sampler settings for this component.
sampler.net.attr.generator$print(indent = " ")indent(character) A string used for indentation (e.g., spaces) when printing, useful for nested structures. Default is " ".
The object itself, invisibly. Called for side effect.
gather()Gathers all data from private fields into a list.
sampler.net.attr.generator$gather()A list containing all information of the sampler.
set_n_proposals()Sets the number of MCMC proposals for this component.
sampler.net.attr.generator$set_n_proposals(n_proposals)n_proposals(integer) The number of proposals to set.
None.
set_seed()Sets the random seed for this component's sampler.
sampler.net.attr.generator$set_seed(seed)seed(integer) The random seed to set.
None.
file(character) The file file where the state will be saved.
The object itself, invisibly.
clone()The objects of this class are cloneable with this method.
sampler.net.attr.generator$clone(deep = FALSE)deepWhether to make a deep clone.