Closed muschellij2 closed 6 years ago
We should likely use the recommending RNGState variables: https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Random-number-generation, but Rcpp could offer something a bit more elegant: http://gallery.rcpp.org/articles/random-number-generation/
really appreciate your attention to this.
happy to go with whatever you like as long as it follows some precedence similar to what's defined in ANTs.
brian
On Mon, Jul 16, 2018 at 7:01 PM, John Muschelli notifications@github.com wrote:
We should likely use the recommending RNGState variables: https://cran.r-project.org/doc/manuals/r-release/R-exts. html#Random-number-generation, but Rcpp could offer something a bit more elegant: http://gallery.rcpp.org/articles/random-number-generation/
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ANTsX/ANTsRCore/issues/51#issuecomment-405407100, or mute the thread https://github.com/notifications/unsubscribe-auth/AATyfoMqv0Apm_rtlL27bNCh02BriKKMks5uHRs2gaJpZM4VR5qR .
There is different default behavior (aka be reproducible by default). I mean different from Atropos
in ANTs default. If that's not OK, please set the default in https://github.com/ANTsX/ANTsRCore/blob/master/R/atropos.R#L57 to TRUE
.
After the discussion we had about registration randomness (https://github.com/ANTsX/ANTsR/issues/226#issuecomment-404512924), which includes https://github.com/ANTsX/ANTsR/issues/210 and https://github.com/ANTsX/ANTs/issues/444, I wanted to look at other randomness and reproducibility weaknesses.
I understand that Atropos relies on a k-means segmentation and like all other k-means segs, it requires random initializations. I think we should have the ability to have this implementation of Atropos to have reproducible output. As you can see below, it is not reproducible, even when
ANTS_RANDOM_SEED
is set.Atropos documentation
In the documentation for
Atropos
, there is the option for using a random seed:But that is not clear in the
atropos
documentation or a standard option. I would like to add inrandom_seed
to be a boolean that we pass into ther
argument, but looking at this line https://github.com/ANTsX/ANTs/blob/6a428f6fabda42aaa2af595dbc97a9d74668a702/Examples/Atropos.cxx#L762 it seems as though it will use some arbitrary fixed random seed (that may not be right). Is it possible to set this seed usingSys.setenv
or is-r 0
the best we can do at the moment?