-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reproducible kmeans segmentation #51
Comments
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 ***@***.***> 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
<#51 (comment)>, 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 |
After the discussion we had about registration randomness (ANTsX/ANTsR#226 (comment)), which includes ANTsX/ANTsR#210 and ANTsX/ANTs#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.Sys.getenv("ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS")
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?The text was updated successfully, but these errors were encountered: