# LearnDistribution, use RandomSeeding and seedrandom in randomvariate

Posted 4 months ago
345 Views
|
0 Replies
|
0 Total Likes
|
 HelloMy name is Decha. I have question again with how to use RandomSeeding in methods of seedrandom in randomvariate by LearnDistribution.Form Wolfram document for LearnDistribution ld = LearnDistribution[{1.2, 2.5, 3.2, 4.6}] RandomVariate[ld] I would like to use Seedrandom with 5 method 1. data={0,7,0,4,2,0,0,6,6,9,0,8,3,7,8,0,6,8,6,5,3,3,5,4,9,3,3,9,5,2,0,2,6,7,5,2}; Table[SeedRandom[2,Method -> k]; RandomVariate[LearnDistribution[data]], {k, {"ExtendedCA", "Legacy", "MersenneTwister", "MKL", "Rule30CA"}}] 2. A = LearnDistribution[{0, 7, 0, 4, 2, 0, 0, 6, 6, 9, 0, 8, 3, 7, 8, 0, 6, 8, 6, 5, 3, 3, 5, 4, 9, 3, 3, 9, 5, 2, 0, 2, 6, 7, 5, 2}] Table[SeedRandom[2, Method -> k]; RandomVariate[A], {k, {"ExtendedCA", "Legacy", "MersenneTwister", "MKL", "Rule30CA"}}] 3. data = {0, 7, 0, 4, 2, 0, 0, 6, 6, 9, 0, 8, 3, 7, 8, 0, 6, 8, 6, 5, 3, 3, 5, 4, 9, 3, 3, 9, 5, 2, 0, 2, 6, 7, 5, 2}; Table[SeedRandom[2, Method -> k]; RandomVariate[LearnDistribution[data, RandomSeeding -> Inherited]], {k, {"ExtendedCA", "Legacy", "MersenneTwister", "MKL", "Rule30CA"}}] but it is not correct because if i rerun it again, random result will change. Seedrandom change. I think for must use " RandomSeeding -> Inherited" ( fix seed in LearnDistribution). How to input RandomSeeding -> Inherited in my problem.Thank you for your answer.Decha