精算屋-熊猫论坛

精算屋熊猫论坛

本论坛旨在为精算师及未来精算师提供交流平台.
在这里我们提倡平等,开放,互助,创新
或许你还不是精算师,来到这里,你已经成为了我们的一员.

人气 4106

[Prophet模型] 重要性采样(Importance Sampling) [复制链接]

zhizhizhi 2021-3-10 21:41:20

知乎看到的一篇介绍重要性采样的文章,分享给大家

原文链接:https://zhuanlan.zhihu.com/p/41217212

蒙特卡洛积分
重要性采样是蒙特卡洛积分的一种采样策略,所以在介绍重要性采样之前我们先来介绍一下蒙特卡洛积分的一些基本内容。
首先,当我们想要求一个函数 在区间 上的积分 时有可能会面临一个问题,那就是积分曲线难以解析,无法直接求积分。这时候我们可以采用一种估计的方式,即在区间 上进行采样: ,值为
如果采样是均匀的,即如下图所示:
均匀采样
那么显然可以得到这样的估计: ,在这里 可以看作是上面小长方形的底部的“宽”,而 则是竖直的“长”。
重要性采样
上述的估计方法随着取样数的增长而越发精确,那么有什么方法能够在一定的抽样数量基础上来增加准确度,减少方差呢?这就需要我们人为地对抽样的分布进行干预,首先我们看下图:
很明显在圆形区域的函数值对积分的贡献比方形区域要大很多,所以我们可以在抽样的时候以更大的概率抽取圆形区域的样本,这样一来就能够提高估计的准确度。假设我们以分布 在原函数上进行采样:
依照这个分布进行采样我们一定程度上可以使得在原函数对积分贡献大的区域获得更多的采样机会。但这时我们不能对 进行简单的求和平均来获得估计值,因为此时采样不是均匀分布的,小矩形的“宽”并不等长,所以我们要对其进行加权,这个权重就是重要性权重。
在得到重要性权重之前我们要重新思考一个问题:为什么我们要引入一个新的分布
原因就是原函数 也许本身就是定义在一个分布之上的,我们定义这个分布为 ,我们无法直接从 上进行采样,所以另辟蹊径重新找到一个更加简明的分布 ,从它进行取样,希望间接地求出 在分布 下的期望。
搞清楚了这一点我们可以继续分析了。首先我们知道函数 在概率分布 下的期望为: ,但是这个期望的值我们无法直接得到,因此我们需要借助 来进行采样,当我们在 上采样 后可以估计 在分布 下的期望为:
接着我们可以对式子进行改写,即: ,所以我们可以得到:
这个式子我们可以看作是函数 定义在分布 上的期望,当我们在 上采样 后可以估计 的期望 ,在这里 就是重要性权重。

回复

使用道具 举报

bothbest 2026-1-15 16:09:43
本帖最后由 bothbest 于 2026-4-14 09:05 编辑

https://bothbest.simdif.com/
https://bothbest.simdif.com/blog.html
https://bothbest.simdif.com/contact.html
https://shor.by/C7o0
https://www.adsfare.com/usa/miami/wpc-decking-problems-you-should-know-before-buying-138069
https://prismo.fedibird.com/@bothbest
https://prismo.fedibird.com/posts/3c688a39-d576-43e2-b272-1abaeedd27bb
https://quick-limpet.pikapod.net/s/gMTWmOriby
https://www.in-pocasi.cz/uzivatele/bothbest-167877/
https://bothbest.aqulas.me/
https://ritualwell.org/author/bothbest/
https://ssn.so/forums/munpia-contest/topic/214508/
https://codoc.jp/sites/bothbest/entries/SKPmyv4gsg
https://beatsaver.com/playlists/1174585
https://bsky.app/profile/bothbest.bsky.social/post/3mjbb3hcxok2l
https://www.thefreeadforum.com/postclassifieds/for-sale/home-furniture-garden/classifieds_for_free/bamboo-acoustic-panels-the-natural-way-to-control-noise_i6348540/classifieds-for-free/seattle
https://escrever.coletivos.org/s/HyFJfYunWx
https://circle-book.com/circles/16446/blogs/115514
https://pad.cloud.abilian.com/s/KX0MmQMHJ
https://sites.google.com/view/bothbest/bamboo-cutting-boards-what-importers-should-look-for-in-quality-grades
https://md.sigma2.no/s/tuwOXSDTD
https://www.frenchwomenorg.com/read-blog/36040
https://zumpadpro.zum.de/s/rJRrcKOnbl
https://graph.org/Click-Lock-Bamboo-Floors-Are-They-Really-Waterproof-04-12
https://md.coredump.ch/s/2GAP9VEH8
https://comunidad.espoesia.com/bothbest/bamboo-shower-benches-a-practical-addition-for-wet-zones/
https://doc.cisti.org/s/keK3WC9RU
https://graphcommons.com/graphs/685a18fc-ce17-4cbc-b270-c2330b8753a9
https://japaneseclass.jp/notes/open/113898
https://kingschat.online/post/dWFMa2N
https://jsfiddle.net/bothbest/prevajd0/
https://pad.koeln.ccc.de/s/UqfkZ4pP5
https://pad.degrowth.net/s/C25z0K806
https://pad.interhop.org/s/re1puUDbzt
https://scrapbox.io/hssolar/The_Shift_Toward_Flexible_Solar_Modules_in_Niche_Installations
https://scrapbox.io/china-solar-panels-suppl/Bamboo_Shower_Benches_A_Practical_Addition_for_Wet_Zones
https://scrapbox.io/bothbest/How_to_Pick_the_Perfect_Decking_Without_Wasting_Thousands
https://www.hamqth.com/VU4CDF
https://www.hamqth.com/PE6MFT
https://cal.com/chinabamboo/how-to-pick-the-perfect-decking-without-wasting-thousands
https://2all.co.il/web/Sites20/bothbest/Article1.asp?ArticleRowID=21631
https://chinasolar.blog.shinobi.jp/solar/bamboo-shower-benches
https://bothbest.blog.shinobi.jp/bamboo/solar-modules-in-niche-ins
https://bambooflooring.blog.shinobi.jp/bamboo/how-to-pick-the-perfect-decking
https://hssolar.blog.shinobi.jp/bamboo/why-microinverters-are-a
https://safechat.com/post/3481098728346176713
https://www.guildquality.com/crew/post/76182
https://www.srujanee.in/view/comparing-topcon-vs-hjt-panels-ovizG4Qt
https://official.link/What-Makes-Glass-Glass-Solar-Modules-More-Durable/
https://official.link/How-Bamboo-Panels-Are-Changing-Interior-Design-Standards
https://official.link/Bamboo-Cutting-Boards-What-Importers-Should-Look-for-in-Quality-Grades
https://getfoureyes.com/s/6R457/
https://mooc.ifro.edu.br/mod/forum/discuss.php?d=52537
https://bothbest.exblog.jp/36428526/
https://bamboochopsticks.storeinfo.jp/posts/58737064
https://bamboodecking.themedia.jp/posts/58737093
https://chinabamboo.therestaurant.jp/posts/58737105
https://bambooflooring.shopinfo.jp/posts/58737137
https://bambooflooring.theblog.me/posts/58737143
https://japanbamboo.storeinfo.jp/posts/58737153
https://bambooplywood.localinfo.jp/posts/58737170
https://bothbest.amebaownd.com/posts/58737175
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

Archiver|手机版|小黑屋|精算屋

GMT+8, 2026-4-20 21:20 , Processed in 0.126518 second(s), 29 queries .

Powered by Discuz! X3.4  © 2001-2017 Comsenz Inc.