Displaying 6 results from an estimated 6 matches for "init_vars".
Did you mean:
init_var
2020 Jul 30
2
Seeding non-R RNG with numbers from R's RNG stream
Hi,
I am constructing a function that does sampling in C++ using a non-R RNG
stream for thread safety reasons. This C++ function is wrapped by an R
function, which is user facing. The R wrapper does some sampling itself to
initialize some variables before passing them off to C++. So that my users
do not have to manage two mechanisms to set random seeds, I've constructed
a solution (shown
2020 Jul 30
3
Seeding non-R RNG with numbers from R's RNG stream
Thank you for this. I'd like to be sure I understand the
intuition correctly. Is the following true from what you said?
I can just fix the seed at the C++ level and the results will still be
(pseudo) random because the initialization at the R level is (pseudo)
random.
On Thu, Jul 30, 2020 at 3:36 PM Duncan Murdoch <murdoch.duncan at gmail.com>
wrote:
> I wouldn't trust the C++
2020 Jul 30
0
Seeding non-R RNG with numbers from R's RNG stream
I wouldn't trust the C++ generator to be as good if you seed it this way
as if you just seeded it once with your phone number (or any other fixed
value) and let it run, because it's probably never been tested to be
good when run this way. Is it good enough for the way you plan to use
it? Maybe.
Duncan Murdoch
On 30/07/2020 3:05 p.m., Tommy Jones wrote:
> Hi,
>
> I am
2020 Jul 30
0
Seeding non-R RNG with numbers from R's RNG stream
On 30/07/2020 4:30 p.m., Tommy Jones wrote:
> Thank you for this. I'd like to be sure I understand the
> intuition?correctly. Is the following true from what you said?
>
> I can just fix the seed at the C++ level and the results will still be
> (pseudo) random because the initialization at the R level is (pseudo)
> random.
No, that's not quite right. Let me try
2020 Jul 30
2
Seeding non-R RNG with numbers from R's RNG stream
Thank you Duncan and Gabriel.
I think that my trivial example was a little too trivial and is causing
some confusion. What's happening in the real function I'm writing is...
1. In R: Draw tens-of-thousands of times from a handful to Gamma RVs with
different parameters to initialize some variables. (Technically, I'm
calling gtools::rdirichlet which calls stats::rgamma)
2. Transfer the
2006 Jun 19
3
Strange behavior of :through association.
...s.rb:876:in
`new''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/associations.rb:876:in
`hosts''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/associations.rb:871:in
`hosts''
#{RAILS_ROOT}/app/controllers/tinklo_controller.rb:17:in `init_vars''
#{RAILS_ROOT}/app/controllers/tinklo_controller.rb:3:in `index''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:910:in
`send''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:910:in
`perform_action_without_filters&...