Deterministic sampling

33 views
Skip to first unread message

Shizhen Yu

unread,
Jun 21, 2024, 9:38:48 PM6/21/24
to INL RAVEN Users Group
Dear Raven developers 

I’d like to know if there’s a way to apply deterministic sampling in Raven? Or do you plan to add this functionality? 

Thanks for the help!

Best regards 
Shizhen Yu

Joshua J. Cogliati

unread,
Jun 24, 2024, 10:07:48 AM6/24/24
to Shizhen Yu, INL RAVEN Users Group
There are several ways to do deterministic sampling.  Depending on what you need Grid (Section 10.1.2 in the user manual) sampling might be easiest.

Joshua

From: inl-rav...@googlegroups.com <inl-rav...@googlegroups.com> on behalf of Shizhen Yu <shizh...@gmail.com>
Sent: Friday, June 21, 2024 7:38 PM
To: INL RAVEN Users Group <inl-rav...@googlegroups.com>
Subject: [EXTERNAL] Deterministic sampling
 
--
You received this message because you are subscribed to the Google Groups "INL RAVEN Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to inl-raven-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/inl-raven-users/CALi8KDPLGSsSj_bxx6md-QkFP9W37juWbO%3DKFYgOi-935YPHQg%40mail.gmail.com.

Diego Mandelli

unread,
Jun 24, 2024, 1:39:30 PM6/24/24
to Joshua J. Cogliati, Shizhen Yu, INL RAVEN Users Group

Shizhen,

Which kind of deterministic sampling are you referring to?

If you can give us a context for this need, it would help us to better answer your query.

Diego

 

Shizhen Yu

unread,
Jun 25, 2024, 4:57:17 AM6/25/24
to Diego Mandelli, INL RAVEN Users Group, Joshua J. Cogliati
Hi Diego and Joshua,
 
Thanks for the reply. 

I intend to apply the standard, simplex and Hadamard deterministic sampling approaches, to compare with the random sampling (Wilks for instance). Btw, I use Relap5 with Raven.

If you have any example input file, that would be very helpful!

Best regard,
Shizhen 

Diego Mandelli

unread,
Jun 26, 2024, 11:57:47 AM6/26/24
to Shizhen Yu, INL RAVEN Users Group, Joshua J. Cogliati

Shizen,

Unfortunately, as of now we do not have this class of sampling strategies.

I am not sure when this feature can be added to RAVEN.

The closest approach available in RAVERN is to use sparse grid collocation method based sampler.

 

A possible way to perform deterministic sampling in RAVEN for your application is to follow these steps:

  1. generate outside RAVEN the set of samples of the input variables based on your deterministic sampling scheme
  2. pass this array of values in RAVEN through the custom sampler so that RELAP5 can be run in a RAVEN step based on the input coordinates generate in 1.

 

Lastly note that deterministic sampling strategies needs that all simulation runs are performed correctly, i.e., no code crashes are observed.

 

Hope it helps,

Diego

Konyu Godwin

unread,
Aug 5, 2024, 3:33:50 AM8/5/24
to INL RAVEN Users Group
Website..👉 https://t.me/EgUNSNP43FY3MDJk .
There is a growing number of people who wish to buy shrooms online. It is often hard to tell which form of products to buy since you cannot see it physically. This is sometimes peculiar to newbies who haven’t tried shrooms before. They just don’t know how to go about it. Shroom Edibles are not so popularly discussed as often as you think. A lot of experienced shroom users have not even had a taste of these Psilonauts Psilocybin Chocolate Bar goodness that offer a premium psychedelic trip.
Website..👉 https://t.me/EgUNSNP43FY3MDJk
Shop..👉 https://t.me/EgUNSNP43FY3MDJk
https://t.me/EgUNSNP43FY3MDJk
Buy Albino Penis Envy Mushrooms, or “APE,” is a genetically isolated, non-pigmented strain of the famous Polkadot chocolate. But the lack of pigment gives the albino penile envy mushroom a bright white appearance.
https://t.me/EgUNSNP43FY3MDJk
https://t.me/EgUNSNP43FY3MDJk
https://t.me/EgUNSNP43FY3MDJk
Your best online shop to get platinum quality microdosing psychedelics products online, pain,anxiety pills, and research chemicals.
Be 100% assured about the quality and genuineness of the product, and you will also be able to buy quality psychedelics products at a fair price.
https://t.me/EgUNSNP43FY3MDJk
https://t.me/EgUNSNP43FY3MDJk
Website..👉 https://t.me/EgUNSNP43FY3MDJk

Konyu Godwin

unread,
Aug 5, 2024, 3:35:12 AM8/5/24
to INL RAVEN Users Group

Shizhen Yu

unread,
Dec 26, 2024, 4:33:54 AM12/26/24
to Diego Mandelli, INL RAVEN Users Group, Joshua J. Cogliati
Hi Diego,
First of all, I wish you together with the RAVEN team all the best for the coming 2025!
Thanks for your last email, I've indeed tried to generate the samples outside RAVEN, then pass them through the custom sampler. I combined the later one with a grid sampler to form an ensemble sampler as you can see in the .xml in the zip file. When I run the .xml, I see from PowerShell (copied in errorMessage.txt in the zip file) that all samples are correctly generated (both from custom and grid), but RAVEN fails to insert them into the RELAP input files, and shows an error about formatting (see screen capture below). 
Could you have a look and let me know if anything I should correct in .xml please?
Thanks in advance!
Best regards,
Shizhen
image.png
filename.inl.zip

Diego Mandelli

unread,
Jan 2, 2025, 1:27:16 PMJan 2
to Shizhen Yu, INL RAVEN Users Group, Joshua J. Cogliati

Shizhen,

At a first look there is an issue with the information being passed from the custom sampler to the RELAP5 interface.

I have created this branch to test it: mandd/editsCustomRelap5.

While I am doing some more testing feel free to test if this branch solves your issue.

Diego

 

From: Shizhen Yu <shizh...@gmail.com>
Date: Thursday, December 26, 2024 at 2:34
AM
To: Diego Mandelli <diego.m...@inl.gov>
Cc: INL RAVEN Users Group <inl-rav...@googlegroups.com>, Joshua J. Cogliati <joshua....@inl.gov>
Subject: Re: [EXTERNAL] Deterministic sampling

Hi Diego,

First of all, I wish you together with the RAVEN team all the best for the coming 2025!

Thanks for your last email, I've indeed tried to generate the samples outside RAVEN, then pass them through the custom sampler. I combined the later one with a grid sampler to form an ensemble sampler as you can see in the .xml in the zip file. When I run the .xml, I see from PowerShell (copied in errorMessage.txt in the zip file) that all samples are correctly generated (both from custom and grid), but RAVEN fails to insert them into the RELAP input files, and shows an error about formatting (see screen capture below). 

Could you have a look and let me know if anything I should correct in .xml please?

Thanks in advance!

Best regards,

Shizhen

Shizhen Yu

unread,
Jan 4, 2025, 3:41:38 PMJan 4
to Diego Mandelli, INL RAVEN Users Group, Joshua J. Cogliati
Diego,
I've tried with your CustomSampler.py file, and I got the following error message. I attached the error message as well in a .txt file. Hope this helps with the debugging. Thanks in advance for the help!
Best regards,
Shizhen
image.png
errorMessage_2.txt

Diego Mandelli

unread,
Jan 10, 2025, 12:51:06 PMJan 10
to Shizhen Yu, INL RAVEN Users Group, Joshua J. Cogliati

Hi Shizhen,

I am running a modified version of your input file (see attache) on the branch I have indicated earlier and I do not get the same error you mentioned.

Diego

 

From: Shizhen Yu <shizh...@gmail.com>
Date: Thursday, December 26, 2024 at 2:34
AM
To: Diego Mandelli <diego.m...@inl.gov>
Cc: INL RAVEN Users Group <inl-rav...@googlegroups.com>, Joshua J. Cogliati <joshua....@inl.gov>
Subject: Re: [EXTERNAL] Deterministic sampling

Hi Diego,

First of all, I wish you together with the RAVEN team all the best for the coming 2025!

Thanks for your last email, I've indeed tried to generate the samples outside RAVEN, then pass them through the custom sampler. I combined the later one with a grid sampler to form an ensemble sampler as you can see in the .xml in the zip file. When I run the .xml, I see from PowerShell (copied in errorMessage.txt in the zip file) that all samples are correctly generated (both from custom and grid), but RAVEN fails to insert them into the RELAP input files, and shows an error about formatting (see screen capture below). 

Could you have a look and let me know if anything I should correct in .xml please?

Thanks in advance!

Best regards,

Shizhen

Ensemble_1HPSI.xml

Shizhen Yu

unread,
Jan 13, 2025, 2:53:33 PMJan 13
to Diego Mandelli, INL RAVEN Users Group, Joshua J. Cogliati
Hi Diego,
I rerun it, with line 168 commented in CustomSampler.py, and it went to the end, with results seem to be correct:
#self._evaluateFunctionsOrder()
Best regards,
Shizhen

Diego Mandelli

unread,
Jan 14, 2025, 10:44:54 AMJan 14
to Shizhen Yu, INL RAVEN Users Group, Joshua J. Cogliati

Shizhen,

That element of the code should stay in there.

Bases on your insights let me see if I can recreate the same issue on my machine.

Diego Mandelli

unread,
Feb 21, 2025, 12:31:55 PMFeb 21
to Shizhen Yu, INL RAVEN Users Group

Shizhen,

For some reason I cannot duplicate your error in my machine.

Let me discuss it with the rest of the team next Monday.

Diego

 

Reply all
Reply to author
Forward
0 new messages