Rejection sampling: Can the proposal distribution be the prior?

Suppose I have a target distribution πœ‹(πœƒ|π‘₯)βˆπ‘ƒ(π‘₯|πœƒ)𝑃(πœƒ) (e.g. the unnormalized posterior). I would like to use rejection sampling to obtain many samples {πœƒπ‘–} from the posterior. Rejection sampling requires the use of a proposal distribution, 𝑔(πœƒ), such that 𝑐⋅𝑔(πœƒ)β‰₯πœ‹(πœƒ|π‘₯), βˆ€ πœƒ (so 𝑐⋅𝑔(πœƒ)cβ‹…g(ΞΈ) envelopes the unnormalized posterior).

My question is: Can I get samples from πœ‹(πœƒ|π‘₯)by setting 𝑔(πœƒ)=𝑃(πœƒ)? In other words, can my proposal distribution be my prior (times a constant), which I then compare to the likelihood 𝑃(π‘₯|πœƒ)? e.g. my proposed algorithm is as follows:

  1. Sample πœƒπ‘– from 𝑃(πœƒ)
  2. Sample π‘ˆπ‘– from π‘ˆπ‘›π‘–π‘“(0,1)
  3. If π‘ˆπ‘–β‹…(𝐢⋅𝑃(πœƒπ‘–))≀𝑃(π‘₯|πœƒπ‘–)), accept πœƒπ‘–. Otherwise reject.
  4. Repeat many times

Will the resulting samples follow the posterior πœ‹(πœƒ|π‘₯)? Thank you!

πŸ‘︎ 10
πŸ’¬︎
πŸ‘€︎ u/s98574
πŸ“…︎ Aug 11 2021
🚨︎ report
Rejection sampling - python

Given this dataset:

https://preview.redd.it/xxedsq3ae8k61.png?width=1610&format=png&auto=webp&s=f4032971afb79d88f2c0153fa38de7b04af8fbb1

And this set up: https://imgur.com/LX0L6Sp

***And these questions:***https://imgur.com/MK4iVtq

  1. How do I even approach defining the MLE
  2. How do I create the sampling distribution for theta using python in order to do the rejection sampling?

Thanks for any help

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/dliske
πŸ“…︎ Feb 28 2021
🚨︎ report
Have I understood rejection sampling correctly in the context of NTRU?

https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.25.8422&rep=rep1&type=pdf

I’m trying to understand NTRU signatures. My understanding goes something like this:

In RSA you work with prime numbers. ECC you work with modular elliptic curve points with a peculiar addition rule.

In NTRU you work with polynomials (e.g. f(x)= x^3 - 2x) except everything is modulo (x^N -1). N is a parameter, a number, e.g. 503.

You never specify x, but conceptually for any given value of x, your polynomials evaluate to integers and you are just adding and multiplying modulo some concrete integer x_i ^N - 1.

You encrypt a message m by calculating:

3φ·h + m (mod q)

Ο† is a random polynomial, h is the public key polynomial. q is a fixed parameter, also a number, maybe 2048.

Now for key exchange you’re good to go. But for digital signatures there’s some known attack.

This is where I think I need correcting:

Instead of accepting any random Ο†, you try lots of random Ο† polynomials until it satsifies some β€˜secure’ property.

Is this generally correct? Is Ο† the thing we’re trying to randomly sample from a better distribution? Or does rejection sampling add an entirely new layer to the problem that I haven’t appreciated?

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/XiPingTing
πŸ“…︎ Dec 26 2020
🚨︎ report
[Q] Monte Carlo sampling ellipse without rejections? /r/statistics/comments/fi…
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/imshivaaaaa
πŸ“…︎ Mar 14 2020
🚨︎ report
When you're in the rejection region of a sampling distribution:
πŸ‘︎ 17
πŸ’¬︎
πŸ‘€︎ u/wolfchaldo
πŸ“…︎ Mar 11 2019
🚨︎ report
[R] Discriminator Rejection Sampling
πŸ‘︎ 17
πŸ’¬︎
πŸ‘€︎ u/donatas_repecka
πŸ“…︎ Oct 22 2018
🚨︎ report
Rejection Sampling with Perl 6 mempko.wordpress.com/2017…
πŸ‘︎ 6
πŸ’¬︎
πŸ‘€︎ u/okpmem
πŸ“…︎ Jul 27 2017
🚨︎ report
Monte Carlo Methods: Rejection Sampling thexbar.me/2014/11/07/rej…
πŸ‘︎ 18
πŸ’¬︎
πŸ‘€︎ u/JHonaker
πŸ“…︎ Nov 10 2014
🚨︎ report
[Research] [1610.05683] Rejection Sampling Variational Inference arxiv.org/abs/1610.05683
πŸ‘︎ 13
πŸ’¬︎
πŸ‘€︎ u/hardmaru
πŸ“…︎ Oct 20 2016
🚨︎ report
Generating Random Numbers From a Specific Distribution With Rejection Sampling blog.demofox.org/2017/08/…
πŸ‘︎ 6
πŸ’¬︎
πŸ‘€︎ u/Atrix256
πŸ“…︎ Aug 08 2017
🚨︎ report
Environmental Sampling in Iran--A clear rejection of George Jahn's AP Article on the "danger" of Iranian "self inspection" of nuclear facilities armscontrol.org/blog/Arms…
πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/wbeeman
πŸ“…︎ Aug 20 2015
🚨︎ report
Transformed density rejection sampling (Mir Blog) blog.mir.dlang.io/random/…
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/bachmeier
πŸ“…︎ Aug 24 2016
🚨︎ report
Environmental Sampling in Iran--A clear rejection of George Jahn's AP Article on the "danger" of Iranian "self inspection" of nuclear facilities armscontrol.org/blog/Arms…
πŸ‘︎ 6
πŸ’¬︎
πŸ‘€︎ u/wbeeman
πŸ“…︎ Aug 20 2015
🚨︎ report
He said NO to the prick and got fully vaccinated by the blood of Jesus instead. He rejected precautions for Thanksgiving and probably got infected around that time. He died today. This is just a small sample of his Facebook posts. reddit.com/gallery/rg84he
πŸ‘︎ 17k
πŸ’¬︎
πŸ‘€︎ u/bloody_hell
πŸ“…︎ Dec 14 2021
🚨︎ report
The First Stop in Monte Carlo (Methods): Rejection Sampling Β· The X Bar thexbar.me/2014/11/07/rej…
πŸ‘︎ 6
πŸ’¬︎
πŸ‘€︎ u/JHonaker
πŸ“…︎ Nov 07 2014
🚨︎ report
Environmental Sampling in Iran--A clear rejection of George Jahn's AP Article on the "danger" of Iranian "self inspection" of nuclear facilities armscontrol.org/blog/Arms…
πŸ‘︎ 6
πŸ’¬︎
πŸ‘€︎ u/wbeeman
πŸ“…︎ Aug 20 2015
🚨︎ report
Environmental Sampling in Iran--A clear rejection of George Jahn's AP Article on the "danger" of Iranian "self inspection" of nuclear facilities armscontrol.org/blog/Arms…
πŸ‘︎ 4
πŸ’¬︎
πŸ‘€︎ u/wbeeman
πŸ“…︎ Aug 20 2015
🚨︎ report
The First Stop in Monte Carlo (Methods): Rejection Sampling Β· The X Bar thexbar.me/2014/11/07/rej…
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/JHonaker
πŸ“…︎ Nov 07 2014
🚨︎ report
Release Rejected: Unable to determine if file is a sample

i've been getting a lot of these errors lately. What's going on or how do i fix it? It's been happening more and more lately.

If i look in the logs i'll see errors like this:

2021-12-19T18:44:38.247958889Z [Error] VideoFileInfoReader: Unable to parse media info from file: /downloads/complete/Movies-4k/Skyfall.2012.UHD.BluRay.2160p.DTS-HD.MA.5.1.DV.HEVC.REMUX-FraMeSToR.mkv-xpost/Skyfall.2012.UHD.BluRay.2160p.DTS-HD.MA.5.1.DV.HEVC.REMUX-FraMeSToR.mkv 
2021-12-19T18:44:38.248023094Z 
2021-12-19T18:44:38.248036148Z [v4.0.0.5607] FFMpegCore.Exceptions.FFMpegException: ffprobe exited with non-zero exit-code (1 - [matroska,webm @ 0x34ac780] 0x00 at pos 0 (0x0) invalid as first byte of an EBML number
2021-12-19T18:44:38.248045430Z [matroska,webm @ 0x34ac780] EBML header parsing failed
2021-12-19T18:44:38.248054283Z /downloads/complete/Movies-4k/Skyfall.2012.UHD.BluRay.2160p.DTS-HD.MA.5.1.DV.HEVC.REMUX-FraMeSToR.mkv-xpost/Skyfall.2012.UHD.BluRay.2160p.DTS-HD.MA.5.1.DV.HEVC.REMUX-FraMeSToR.mkv: Invalid data found when processing input)
2021-12-19T18:44:38.248063670Z    at FFMpegCore.FFProbe.GetStreamJson(String filePath, Int32 outputCapacity, FFOptions ffOptions)
2021-12-19T18:44:38.248088694Z    at NzbDrone.Core.MediaFiles.MediaInfo.VideoFileInfoReader.GetMediaInfo(String filename) in D:\a\1\s\src\NzbDrone.Core\MediaFiles\MediaInfo\VideoFileInfoReader.cs:line 131
2021-12-19T18:44:38.248098872Z 
2021-12-19T18:44:38.248106915Z 
2021-12-19T18:44:38.249291715Z [Error] DetectSample: Failed to get runtime from the file, make sure ffprobe is available 
2021-12-19T18:44:38.402492994Z [Error] VideoFileInfoReader: Unable to parse media info from file: /downloads/complete/Movies-4k/Skyfall.2012.UHD.BluRay.2160p.DTS-HD.MA.5.1.DV.HEVC.REMUX-FraMeSToR.mkv-xpost/Skyfall.2012.UHD.BluRay.2160p.DTS-HD.MA.5.1.DV.HEVC.REMUX-FraMeSToR.mkv 
2021-12-19T18:44:38.402600306Z 
2021-12-19T18:44:38.402620502Z [v4.0.0.5607] FFMpegCore.Exceptions.FFMpegException: ffprobe exited with non-zero exit-code (1 - [matroska,webm @ 0x26bd780] 0x00 at pos 0 (0x0) invalid as first byte of an EBML number
2021-12-19T18:44:38.402632121Z [matroska,webm @ 0x26bd780] EBML header parsing failed
2021-12-19T18:44:38.402641065Z /downloads/complete/Movies-4k/Skyfall.2012.UHD.BluRay.2160p.DTS-HD.MA.5.1.DV.HEVC.REMUX-FraMeSToR.mkv-xpost/Skyfall.2012.UHD.BluRay.2160p.DTS-HD.MA.5.1.DV.HEVC.REMUX-FraMeSToR.mkv: Invalid data found when processing input)
... keep reading on reddit ➑

πŸ‘︎ 7
πŸ’¬︎
πŸ‘€︎ u/flying_unicorn
πŸ“…︎ Dec 19 2021
🚨︎ report
sample mudi ji ko bheja gaya lekin reject ho gya sorry kushaludin!!!
πŸ‘︎ 51
πŸ’¬︎
πŸ‘€︎ u/ghanta_viswa_guru
πŸ“…︎ Dec 12 2021
🚨︎ report
Any samples that you've submitted to WhoSampled that were rejected? Comment below and I can help save them!

I can create a video to send to them to prove your sample is the correct one!

πŸ‘︎ 18
πŸ’¬︎
πŸ‘€︎ u/SivleFred
πŸ“…︎ Dec 12 2021
🚨︎ report
What do you do with reject samples?

Being fairly new to frags, I've recently bought a ton of samples/discovery sets to figure out what I want to buy a bottle of down the road, and I've ended up with a lot of one and done "rejects", but it seems wasteful to just toss them e.g. a few sprays gone from a 2ml sample. Do you keep them around and revisit them later to see if your tastes changed or toss them? Curious what people who go through a lot of samples do.

πŸ‘︎ 16
πŸ’¬︎
πŸ‘€︎ u/madgraf
πŸ“…︎ Aug 27 2021
🚨︎ report
Hello, My name is Jay Benz. This song is called, "The Rejects". My music is inspired by a lot of Hip Hop / Alt. Rock / 70s R&B & Soul. This beat samples a 70s record by the Floaters called "Float On." The clips are the from the movie, "Mid90s". youtube.com/watch?v=zredA…
πŸ‘︎ 14
πŸ’¬︎
πŸ‘€︎ u/j-benz
πŸ“…︎ Jun 17 2021
🚨︎ report
An 1867 Hong Kong Tael, minted in Shanghai. As the story goes, the Shanghai mint was over equipped to handle the local coinage, and sought a government contract to mint the coinage for Hong Kong. This was a sample piece, submitted for consideration, however the Hong Kong gov't rejected it. reddit.com/gallery/ohaff1
πŸ‘︎ 48
πŸ’¬︎
πŸ“…︎ Jul 10 2021
🚨︎ report
I always wanted to make a Psy track that had a meaningful message with voice samples, then I found "Reject Authority, Trust Yourself" by Terence McKenna. Enjoy! youtube.com/watch?v=0YvLL…
πŸ‘︎ 17
πŸ’¬︎
πŸ‘€︎ u/Learistkrieg
πŸ“…︎ Jun 20 2021
🚨︎ report
Nationally representative sample (N = 520) of UK adults: Rational thinking style and rejection of COVID-19 conspiracy theories /theorists were directly associated with social distancing compliance. osf.io/nmx9w/
πŸ‘︎ 3
πŸ’¬︎
πŸ“…︎ Aug 12 2021
🚨︎ report
Samples continuously rejected?? Why??

I have sent two samples to 23andme with both being rejected. I made sure I followed their instructions without deviation. After the second rejection, I had to sign a contract that they will give me a refund if I never buy another kit from them.

I went to Ancestry and they have also rejected my samples twice even if I strictly follow the instructions. Why won’t my saliva work?!?!?

πŸ‘︎ 6
πŸ’¬︎
πŸ‘€︎ u/Sleep-Fairy
πŸ“…︎ May 10 2021
🚨︎ report
Finding a random point within a circle youtu.be/4y_nmpv-9lI
πŸ‘︎ 1k
πŸ’¬︎
πŸ“…︎ Oct 11 2021
🚨︎ report
Interesting unreleased mix of Zooropa. I doubt this is a rejected single mix as the title suggests, but I suspect it is something more than just a fan-made mix. Samples are louder, and the final section sounds substantially different. Anyone have more info? youtu.be/gLKwzL6PSDk
πŸ‘︎ 42
πŸ’¬︎
πŸ‘€︎ u/hersheybeagle
πŸ“…︎ Jan 20 2021
🚨︎ report
I always wanted to make a Psy track that had a meaningful message with voice samples, then I found "Reject Authority, Trust Yourself" by Terence McKenna. Enjoy! youtube.com/watch?v=0YvLL…
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/Learistkrieg
πŸ“…︎ Jun 20 2021
🚨︎ report
Surprise test: first sample of quick fix was rejected. Mixed real and fake for the second (accepted) sample.

I’m f/25/5’5/ 150. I recently started a new job and didn’t have any preemployment drug testing and the policy is that they only test on suspicion... so I’ve gone back to smoking pretty much every day for 3 months. I took about a month off 4 or 5 months ago but other than that I’ve been smoking almost daily for two years (and mostly pretty high quality cuz I was in a legal state). Found out an hour before today that I’d be tested for a government contractor badge (I smoked last night because I wasn’t even warned there was a possibility).

First sample I did quick fix and it was the right temperature but wasn’t accepted because it didn’t foam and didn’t smell like pee. Is it possible that I could still get in trouble for the bad first sample even though the tester didn’t say anything? Has anyone had success with mixing quick fix and real piss because that’s what I ended up doing (yes, I know the company says not to...)? When I got home I took a dollar tree thc test and it was negative (but I was a bit more hydrated than I was when I took the actual test).

Do they tell me or my employer the results first?

The test will also test positive for other things cuz of my prescribed meds: adderall, benzos, Wellbutrin, and abilify (also of course took acid only 3 days ago). Could any of these help explain positive results (I know Wellbutrin and abilify can cause false positives for amphetamines).

Any advice/ personal experiences with these things would be greatly appreciated!

πŸ‘︎ 2
πŸ’¬︎
πŸ“…︎ Feb 09 2021
🚨︎ report
If you get rejected by 100 women, How do you diagnose that problem if those 100 women never tell you why they rejected you?
πŸ‘︎ 83
πŸ’¬︎
πŸ‘€︎ u/BloodstainedAxe
πŸ“…︎ Jan 12 2022
🚨︎ report
Rejection sampling: Can the proposal distribution be the prior?

Suppose I have a target distribution πœ‹(πœƒ|π‘₯)βˆπ‘ƒ(π‘₯|πœƒ)𝑃(πœƒ) (e.g. the unnormalized posterior). I would like to use rejection sampling to obtain many samples {πœƒπ‘–} from the posterior. Rejection sampling requires the use of a proposal distribution, 𝑔(πœƒ), such that 𝑐⋅𝑔(πœƒ)β‰₯πœ‹(πœƒ|π‘₯), βˆ€ πœƒ (so 𝑐⋅𝑔(πœƒ)cβ‹…g(ΞΈ) envelopes the unnormalized posterior).

My question is: Can I get samples from πœ‹(πœƒ|π‘₯)by setting 𝑔(πœƒ)=𝑃(πœƒ)? In other words, can my proposal distribution be my prior (times a constant), which I then compare to the likelihood 𝑃(π‘₯|πœƒ)? e.g. my proposed algorithm is as follows:

  1. Sample πœƒ from 𝑃(πœƒ)
  2. Sample π‘ˆπ‘– from π‘ˆπ‘›π‘–π‘“(0,1)
  3. If π‘ˆπ‘–β‹…(𝐢⋅𝑔(π‘₯𝑖))≀𝑃(π‘₯𝑖|πœƒπ‘–), accept π‘₯𝑖. Otherwise reject.
  4. Repeat many times

Will the resulting samples follow the posterior πœ‹(πœƒ|π‘₯)? Thank you!

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/s98574
πŸ“…︎ Aug 11 2021
🚨︎ report

Please note that this site uses cookies to personalise content and adverts, to provide social media features, and to analyse web traffic. Click here for more information.