Changes how the set is set in the ParameterizedNode. Seeds are still determined by a combination of a graph_base_seed (which is initially set to completely random) and the node's string. The node's string has been expanded to include its position in the graph (if known).
Why? The previous approach of just using the node’s identifier (and not the position in the graph) was easy to make a mistake when using two of the same nodes in the graph. This makes it more difficult for a user to make such a mistake.
Other changes:
sample_iteration has been replaced by using a depth-first search and passing along the seen nodes. This will allow us to sample a subset of the graph while keeping the rest fixed. This means we can also get rid of check_resample().
_node_id has been added to provide a unique numeric ID to each node in the graph.
graph_base_seed is no longer passed into the constructor of ParameterizedNode.
A single set_seed() function takes care of setting the node's seed.
A update_graph_information() function takes care of both numbering the graph nodes (using DFS ordering) and setting a new global seed if there is one.
sample_parameters() now does node labeling if needed and validity checking.
WhiteNoise effect nodes have a random number generator that is updated the same way as other graph nodes.
The functions sample_ra and sample_dec in GaussianGalaxy were replaced by just using the numpy random functions that already exist.
Changes how the set is set in the
ParameterizedNode
. Seeds are still determined by a combination of agraph_base_seed
(which is initially set to completely random) and the node's string. The node's string has been expanded to include its position in the graph (if known).Why? The previous approach of just using the node’s identifier (and not the position in the graph) was easy to make a mistake when using two of the same nodes in the graph. This makes it more difficult for a user to make such a mistake.
Other changes:
sample_iteration
has been replaced by using a depth-first search and passing along the seen nodes. This will allow us to sample a subset of the graph while keeping the rest fixed. This means we can also get rid ofcheck_resample()
._node_id
has been added to provide a unique numeric ID to each node in the graph.graph_base_seed
is no longer passed into the constructor ofParameterizedNode
.set_seed()
function takes care of setting the node's seed.update_graph_information()
function takes care of both numbering the graph nodes (using DFS ordering) and setting a new global seed if there is one.sample_parameters()
now does node labeling if needed and validity checking.WhiteNoise
effect nodes have a random number generator that is updated the same way as other graph nodes.sample_ra
andsample_dec
inGaussianGalaxy
were replaced by just using the numpy random functions that already exist.