精华内容
下载资源
问答
  • 粒子滤波 机器学习Choosing the right thesis topic can be a struggle. Approximately eighteen months ago I had to pick my bachelor thesis assignment and my intention was to work on something new and ...

    粒子滤波 机器学习

    Choosing the right thesis topic can be a struggle. Approximately eighteen months ago I had to pick my bachelor thesis assignment and my intention was to work on something new and fresh that could help at least a small area of people, and not just to repeat already existing processes. While browsing the offered topics, one stood out for me as a physics fan. The focus of the assignment was the analysis of data from CERN with the application of machine learning algorithms, that could lead to a discovery of a new particle. Needless to say, I applied immediately. Even though physics is not the main focus of my studies, the work on the thesis was very satisfying in numerous aspects and definitely enriched my understanding of physics and scientific processes overall.

    选择正确的论文主题可能会很困难。 大约18个月前,我不得不选择学士学位论文,我的目的是研究一些新事物,这些新事物至少可以帮助一小部分人,而不仅仅是重复已经存在的过程。 浏览提供的主题时,一个人对我来说是物理迷。 任务的重点是使用机器学习算法对CERN的数据进行分析,这可能会导致发现新的粒子。 不用说,我立即申请。 尽管物理不是我研究的重点,但论文的工作却在许多方面都非常令人满意,并且无疑丰富了我对物理学和科学过程的整体理解。

    背景 (Background)

    Looking at the technological achievements in recent history, one definitely stands out. It is the construction of Large Hadron Collider at CERN, in which scientists are able to accelerate particles almost up to the speed of light and cause them to collide. When two particles collide, they release immense amounts of energy and scatter into quarks and gluons from which they are made of. These processes can lead to a creation of a new particle that only exists for a very brief period of time before it decays into other particles. Therefore the problem physicists face is how to observe and study such particles, when their lifetime is so short.

    纵观近代史上的技术成就,无疑是很突出的。 它是欧洲核子研究组织(CERN)的大型强子对撞机的建造,科学家可以在其中加速粒子直至达到光速并使其碰撞。 当两个粒子碰撞时,它们释放出大量能量,并散布到由它们构成的夸克和胶子中。 这些过程可以导致产生一个新的粒子,该粒子仅在很短的时间内就存在,然后才分解为其他粒子。 因此,物理学家们面临的问题是,当它们的寿命很短时,如何观察和研究这些颗粒。

    One of the approaches is to use the detectors at LHC to observe photons scattered during the interactions in the accelerator. These photons have varying invariant mass and by analysing its distribution the physicists observed that it follows a smooth falling line, which is called background. If the conditions for creating a new particle are met during the collisions, the photons into which the newly created particle decays inherit its mass, and therefore the invariant mass distribution shows a peak above the background at that certain mass. If the peak is significant enough, it could signify a production of a new particle. (For example, this approach was applied in search for the Higgs boson and the process can be seen on the following figure.)

    一种方法是使用LHC处的检测器观察在加速器相互作用期间散射的光子。 这些光子具有不变的质量,通过分析其分布,物理学家观察到它遵循一条平滑的下降线,这称为背景。 如果在碰撞过程中满足了创建新粒子的条件,则新创建的粒子会衰减到其中的光子会继承其质量,因此不变质量分布会在该质量下在背景上方显示一个峰值。 如果峰值足够显着,则可能表示产生了新粒子。 (例如,此方法被用于搜索希格斯玻色子,其过程如下图所示。)

    Image for post
    Animation showing ATLAS evidence for the Higgs boson during Run 1 of the LHC. The blue line shows the background and the red peak around 125 GeV signifies the Higgs boson signal. The bars in the lower plot show the significance of measured deviations from the background (i.e. the estimated distribution without the signal). Image courtesy of ATLAS/CERN.
    动画展示了LHC的运行1中希格斯玻色子的ATLAS证据。 蓝线表示背景,125 GeV附近的红色峰值表示希格斯玻色子信号。 下部图中的条形图显示了与背景的测量偏差(即没有信号的估计分布)的重要性。 图片由ATLAS / CERN提供。

    One of the particles that is currently being searched for is the axion-like particle [1] that could be mediated by the emitted photons in proton ultra-peripheral collisions [2]. In these collision the beam particles do not collide head-on, but get into an interaction range (very close proximity to each other) in which the clouds of photons that surround the protons travelling almost at the speed of light interact and create a new particle that later decays into another set of photons. This interaction is called light-by-light scattering. The beam protons lose a fraction of their energy which can be observed by the detectors on both sides relative to the interaction point as they are almost intact.

    当前正在寻找的粒子之一是质子超外围碰撞中可能由发射的光子介导的类似轴突的粒子[1]。 在这些碰撞中,束粒子不会正面碰撞,而是进入相互作用范围(彼此非常接近),在该相互作用范围内,围绕质子的光子云几乎以光速行进,相互作用并生成一个新粒子后来衰减成另一组光子。 这种相互作用称为逐光散射。 光束质子损失了一部分能量,相对于相互作用点,两侧的探测器可以观察到它们的能量,因为它们几乎完好无损。

    The purpose of the thesis was to simulate how the peak above the background would look like if the axion-like particle production was observed, and to analyse the measured data from CERN and model the background using machine learning methods as precisely as possible, as the current models do not achieve the desired precision.

    本文的目的是模拟在观察到轴突样颗粒产生时背景上方的峰的样子,并分析来自CERN的测量数据并使用机器学习方法尽可能精确地模拟背景。当前模型无法达到所需的精度。

    分析 (Analysis)

    The work started with performing simulation runs with the SuperChic-3 Monte Carlo event generator [3]. Apart from the production of axion-like particle, the productions of photons, muons and electrons were simulated as well, and their observational probabilities, energies and invariant mass distributions were compared. This analysis showed how much the axion-like particle production differs from the already observed events. The most important observation from the analysis was that with lower coupling (the strength of the ultra-peripheral interaction between the emitted photons), the peak above the background becomes more sharper, and therefore more easily detectable. In other words, to observe a significant peak above the background, the number of events in which the axion-like particle is produced can be lower with lower coupling.

    该工作开始于使用SuperChic-3 Monte Carlo事件生成器进行仿真运行[3]。 除了产生轴状粒子外,还模拟了光子,μ子和电子的产生,并比较了它们的观测概率,能量和不变质量分布。 该分析表明,类似轴突的颗粒产生与已经观察到的事件有多少不同。 分析中最重要的观察结果是,在较低的耦合(发射的光子之间的超外围相互作用的强度)下,背景上方的峰变得更加尖锐,因此更易于检测。 换句话说,为了观察到本底以上的显着峰,可以以较低的耦合来减少产生轴突状颗粒的事件的数量。

    Image for post
    Image courtesy of ATLAS/CERN图片由ATLAS / CERN提供

    Once the events were simulated, the real experimental data from CERN was imported and validated. By applying multiple restrictions on the observed events, the dataset was modified and three subsets corresponding to different observational strategies were extracted. The strategies are dependent on the beam proton energy loss that is observable by the detectors. The first strategy, called no AFP matching, does not consider any limitations on the event selection. Strategy called A or C considers events in which at least one of the detectors observed a proton with relative energy loss between 2% to 10%, and A and C matching requires both protons from the event to be in that specific range. Understandably, these restrictions significantly reduce the number of analysed events and increase the modelling difficulty.

    模拟事件后,将导入并验证来自CERN的真实实验数据。 通过对观察到的事件施加多个限制,可以修改数据集并提取与不同观察策略相对应的三个子集。 这些策略取决于检测器可观察到的束质子能量损失。 第一种策略称为无AFP匹配,它不考虑事件选择的任何限制。 称为A或C的策略考虑事件,其中至少一个检测器观察到质子的相对能量损失在2%至10%之间,并且A和C匹配要求事件中的两个质子都在该特定范围内。 可以理解,这些限制大大减少了分析事件的数量并增加了建模难度。

    Based on these subsets, three backgrounds were modelled using the widely-used curve fitting method with the formula physicist already used in previous analyses of photon backgrounds, which was optimised by the the Levenberg–Marquardt algorithm [4,5]. By measuring the precision of the fit it was clear that the curve does not achieve the required precision, and therefore additional regression analysis was made with the Gaussian Process [6]. The Gaussian Process does not use a fixed parametric function to describe the data, but instead it lets the data to pick the functional form itself, and therefore it is a powerful tool in terms of machine learning. The process is formally defined as an infinite collection of random functions, where any finite subset of which creates a joint Gaussian distribution. This approach is gaining in popularity in particle physics and was already applied in numerous data explorations. The results of the Gaussian Process were then compared to the standard fit and it showed a significant improvement.

    基于这些子集,使用广泛使用的曲线拟合方法对三个背景进行了建模,其中公式物理学家已在以前的光子背景分析中使用,并通过Levenberg-Marquardt算法进行了优化[4,5]。 通过测量拟合的精度,很明显该曲线没有达到所需的精度,因此使用高斯过程[6]进行了额外的回归分析。 高斯过程不使用固定的参数函数来描述数据,而是让数据自行选择功能形式,因此它是机器学习方面的强大工具。 该过程被正式定义为随机函数的无限集合,其中随机函数的任何有限子集都会产生联合高斯分布。 这种方法在粒子物理学中越来越流行,并且已经在许多数据探索中得到应用。 然后将高斯过程的结果与标准拟合进行比较,结果显示出显着改善。

    Image for post
    Overview of the goodness of fit metrics for the Gaussian Process fit and the function fit for each data subset. It is clear, that the Gaussian Process strongly outperforms the standard curve fit.
    高斯过程拟合和每个数据子集的函数拟合优度度量的概述。 显然,高斯过程大大优于标准曲线拟合。

    The backgrounds were then used together with the observational probabilities calculated from the simulator runs to determine how many events are needed to be observed anywhere on top of the background to observe a significant peak. For those events, the required coupling was calculated (separately for each matching strategy). As mentioned above, with lower coupling, the peak becomes sharper (i.e. it is both higher and not as wide for the same amount of events), and therefore the number of events needed to be observed is lower, because the deviation from background is achieved more easily. This means that when searching for the hypothetical axion-like particle, with lower coupling it does not need to be produced as often in order to be potentially discovered.

    然后将背景与从模拟器运行中计算出的观察概率一起使用,以确定需要在背景顶部的任何位置观察多少事件才能观察到明显的峰。 对于这些事件,计算了所需的耦合(针对每个匹配策略分别计算)。 如上所述,在较低耦合的情况下,峰变得更尖锐(即,对于相同数量的事件,它既较高又不那么宽),因此需要观察的事件数较少,因为实现了与背景的偏离更容易。 这意味着,在搜索假设的轴突状颗粒时,如果偶合程度较低,则不需要频繁地生产该颗粒以便被潜在地发现。

    The analysis showed that the best approach to detect the particle is to combine to detection strategies based on the axion-like particle mass. For lower masses up to 800 GeV, A and C matching should be applied. In range between 800 GeV and 1600 GeV, A or C seems as the most promising, and for even higher masses, no AFP matching appears to be the best option.

    分析表明,检测颗粒的最佳方法是结合基于轴突样颗粒质量的检测策略。 对于质量不超过800 GeV的较小质量,应采用A和C匹配。 在800 GeV和1600 GeV之间的范围内,A或C似乎是最有前途的,对于更高的质量,没有AFP匹配似乎是最佳选择。

    Image for post
    Image courtesy of ATLAS/CERN图片由ATLAS / CERN提供

    结论(Conclusion)

    The past year and a half was very challenging since diving into a completely different area of research required a lot of learning and understanding. However, thanks to the kind and patient approach of the members from the international ATLAS Collaboration, and mainly my supervisor doc. Dr. André Sopczak, working on the thesis was very fulfilling. I am glad that I had the opportunity to contribute to the ongoing research in particle physics and also that my thesis was classified by CERN as relevant to their research.

    过去的一年半是非常艰巨的,因为要进入一个完全不同的研究领域需要大量的学习和理解。 但是,由于国际ATLAS协作组织成员的热情和耐心的对待,主要是我的主管文件。 AndréSopczak博士从事论文的工作非常令人满意。 我很高兴有机会为正在进行的粒子物理学研究做出贡献,而且我的论文被CERN归类为与他们的研究相关。

    The full thesis Study of light-by-light scattering with the ATLAS Forward Proton (AFP) Detector at CERN can be found in the official CTU digital library or at the CERN Document Server.

    在CERN上使用ATLAS前向质子(AFP)检测器进行的逐光散射的完整论文研究可在官方CTU数字图书馆CERN文档服务器中找到

    翻译自: https://medium.com/student-success-stories/studying-open-questions-in-particle-physics-with-machine-learning-683db234963

    粒子滤波 机器学习

    展开全文
  • Kalman 滤波根据线性高斯模型可求得解析解,但是在非线性、非高斯的情况下无法得到解析解,对这类一般的情况,则要采用粒子滤波的方法 对于复杂的概率分布,可以通过一个简单的概率分布 q(z)q(z)q(z) 作为桥梁进行...

    Particle Filter

    Kalman 滤波根据线性高斯模型可求得解析解,但是在非线性、非高斯的情况下无法得到解析解,对这类一般的情况,则要采用粒子滤波的方法

    对于复杂的概率分布,可以通过一个简单的概率分布 q(z)q(z) 作为桥梁进行采样(重要性采样),求得概率分布函数积分值(期望):
    E[f(z)]=zf(z)p(z)dz=zf(z)p(z)q(z)q(z)dz=1Ni=1Nf(zi)p(zi)q(zi)weight\begin{aligned} \mathbb{E}[f(z)]&=\int_zf(z)p(z)dz=\int_zf(z)\frac{p(z)}{q(z)}q(z)dz\\&=\frac1N\sum\limits_{i=1}^Nf(z_i)\boxed{\frac{p(z_i)}{q(z_i)} }\color{blue}\to weight \end{aligned}

    通过对 q(z)q(z) 采样,然后对每一个采样的样本应用权重就得到了期望的近似,为了概率分布的特性,还需要对权重进行归一化。

    在滤波问题中,需要求解 p(ztx1:t)p(z_t|x_{1:t}),其权重为:
    wti=p(ztix1:t)q(ztix1:t),i=1,2,,N w_t^i=\frac{p(z_t^i|x_{1:t})}{q(z_t^i|x_{1:t})},i=1,2,\cdots,N

    若每一个时刻 tt 都需要采样 NN 个点,则每个时刻都要计算NN个权重,使得计算较为繁杂,希望找到一个关于权重的递推公式,于是就引入了序列重要性采样(SIS)。

    SIS

    在 SIS (sequential importance sampling filter)中,解决的问题是 p(z1:tx1:t)p(z_{1:t}|x_{1:t})wtip(z1:tx1:t)q(z1:tx1:t) w_t^i\propto\frac{p(z_{1:t}|x_{1:t})}{q(z_{1:t}|x_{1:t})}

    根据 LDS 中的推导可以得到上式分子的递推式:
    p(z1:tx1:t)p(x1:t,z1:t)=p(xtz1:t,x1:t1)p(z1:t,x1:t1)=p(xtzt)p(ztx1:t1,z1:t1)p(x1:t1,z1:t1)=p(xtzt)p(ztzt1)p(x1:t1,z1:t1)p(xtzt)p(ztzt1)p(z1:t1x1:t1) \begin{aligned}{\color{blue}p(z_{1:t}|x_{1:t})}\propto p(x_{1:t},z_{1:t})&=p(x_t|z_{1:t},x_{1:t-1})p(z_{1:t},x_{1:t-1})\\ &=p(x_t|z_t)p(z_t|x_{1:t-1},z_{1:t-1})p(x_{1:t-1},z_{1:t-1})\\ &=p(x_t|z_t)p(z_t|z_{t-1})p(x_{1:t-1},z_{1:t-1})\\ &\propto p(x_t|z_t)p(z_t|z_{t-1})\color{blue}p(z_{1:t-1}|x_{1:t-1}) \end{aligned}

    对于分母(指定的提议分布),直接分解为:
    q(z1:tx1:t)=q(ztz1:t1,x1:t)q(z1:t1x1:t1) q(z_{1:t}|x_{1:t})=q(z_t|z_{1:t-1},x_{1:t})q(z_{1:t-1}|x_{1:t-1}) 所以有: wtip(z1:tx1:t)q(z1:tx1:t)p(xtzt)p(ztzt1)p(z1:t1x1:t1)q(ztz1:t1,x1:t)q(z1:t1x1:t1)=p(xtzt)p(ztzt1)q(ztz1:t1,x1:t)wt1i {\color{blue}w_t^i}\propto\frac{p(z_{1:t}|x_{1:t})}{q(z_{1:t}|x_{1:t})}\propto \frac{p(x_t|z_t)p(z_t|z_{t-1})\color{blue}p(z_{1:t-1}|x_{1:t-1})}{q(z_t|z_{1:t-1},x_{1:t})\color{blue}q(z_{1:t-1}|x_{1:t-1})}=\frac{p(x_t|z_t)p(z_t|z_{t-1})}{q(z_t|z_{1:t-1},x_{1:t})}\color{blue}w_{t-1}^i

    得到计算权重的的步骤

    • t1t-1 时刻,采样完成并计算得到权重
    • tt 时刻,根据 q(ztz1:t1,x1:t)q(z_t|z_{1:t-1},x_{1:t}) 进行采样得到 ztiz_t^i,然后计算得到 NN 个权重
    • 最后对权重归一化

    SIS 算法会出现权值退化的情况,在一定时间后,可能会出现大部分权重很小,极少数较大,这是高维空间容易出现的情况,解决方法:

    • 重采样,以权重作为概率分布,重新在已经采样的样本中采样,然所有样本赋予相同权重。这个方法的思路是将权重作为概率分布,然后得到累积密度函数,在累积密度上取点(阶梯函数)
    • 选择合适的提议分布q(ztz1:t1,x1:t)=p(ztzt1)q(z_t|z_{1:t-1},x_{1:t})=p(z_t|z_{t-1}),即:直接选择其状态转移概率分布,粒子ztip(ztzt1i)z^{i}_t\sim p(z_t|z^{i}_{t-1}),这也称为生成与测试方法:wtip(xtzt)p(ztzt1)p(ztzt1)wt1i=p(xtzt)wt1i w_t^i\propto\frac{p(x_t|z_t)\cancel{p(z_t|z_{t-1})}}{\cancel{p(z_t|z_{t-1})}}{\color{blue}w_{t-1}^i }=p(x_t|z_t){\color{blue}w_{t-1}^i }

    采用重采样的 SIS 算法就是基本的粒子滤波算法。若选择上述提议分布,则称之为 SIR 算法。

    参考文献

    【1】粒子滤波
    【2】粒子滤波算法
    【3】Particle Filter Tutorial 粒子滤波:从推导到应用(四)
    【4】粒子滤波(Particle filter)算法简介及MATLAB实现
    【5】Particle Filter Tutorial 粒子滤波:从推导到应用(一)到( 四 )

    展开全文
  • HMM 模型适用于隐变量是离散的值的时候,对于连续隐变量的 HMM,常用卡尔曼滤波(Kalman Filtering)描述线性高斯模型的态变量,使用粒子滤波(Particle Filter)来表述非高斯非线性的态变量。 线性体现在上一时刻和...

    一、概述

    HMM 模型适用于隐变量是离散的值的时候,对于连续隐变量的 HMM,常用卡尔曼滤波(Kalman Filtering)描述线性高斯模型的态变量,使用粒子滤波(Particle Filter)来表述非高斯非线性的态变量。

    线性体现在上一时刻和这一时刻的隐变量以及隐变量和观测变量之间,它们的关系可以表示为:

    zt=Azt1+B+εxt=Czt+D+δεN(0,Q)δN(0,R)z_{t}=A\cdot z_{t-1}+B+\varepsilon \\ x_{t}=C\cdot z_{t}+D+\delta \\ \varepsilon \sim N(0,Q)\\ \delta \sim N(0,R)

    类比HMM中几个参数,我们也可以写出类似初始概率、转移概率或发射概率的形式:

    P(ztzt1)N(Azt1+B,Q)P(xtzt)N(Czt+D,R)z1N(μ1,Σ1)P(z_{t}|z_{t-1})\sim N(A\cdot z_{t-1}+B,Q)\\ P(x_{t}|z_{t})\sim N(C\cdot z_{t}+D,R)\\ z_{1}\sim N(\mu _{1},\Sigma _{1})

    所有的参数为:

    θ=(A,B,C,D,Q,R,μ1,Σ1)\theta =(A,B,C,D,Q,R,\mu _{1},\Sigma _{1})

    二、Filtering问题

    在多个inference问题中,卡尔曼滤波更关心Filtering问题,即求边缘概率:

    P(ztx1,x2,,xt)P(z_{t}|x_{1},x_{2},\cdots ,x_{t})

    类似HMM的前向算法,我们需要找到一个递推关系:

    P(ztx1,x2,,xt)=P(x1,x2,,xt,zt)P(x1,x2,,xt)P(x1,x2,,xt,zt)=P(xtx1,x2,,xt1,zt)P(xtzt)P(x1,x2,,xt1,zt)=P(xtzt)P(x1,x2,,xt1,zt)=P(xtzt)P(ztx1,x2,,xt1)predictionP(x1,x2,,xt1)P(xtzt)P(ztx1,x2,,xt1)P(z_{t}|x_{1},x_{2},\cdots ,x_{t})\\ =\frac{P(x_{1},x_{2},\cdots ,x_{t},z_{t})}{P(x_{1},x_{2},\cdots ,x_{t})}\\ \propto P(x_{1},x_{2},\cdots ,x_{t},z_{t})\\ =\underset{P(x_{t}|z_{t})}{\underbrace{P(x_{t}|x_{1},x_{2},\cdots ,x_{t-1},z_{t})}}\cdot P(x_{1},x_{2},\cdots ,x_{t-1},z_{t})\\ =P(x_{t}|z_{t})\cdot P(x_{1},x_{2},\cdots ,x_{t-1},z_{t})\\ =P(x_{t}|z_{t})\cdot \underset{prediction问题} {\underbrace{P(z_{t}|x_{1},x_{2},\cdots ,x_{t-1})}}\cdot P(x_{1},x_{2},\cdots ,x_{t-1})\\ \propto P(x_{t}|z_{t})\cdot P(z_{t}|x_{1},x_{2},\cdots ,x_{t-1})

    上式结果中,P(xtzt)P(x_{t}|z_{t})已知,而另一项可做以下转化:

    P(ztx1,x2,,xt1)=zt1P(zt,zt1x1,x2,,xt1)dzt1=zt1P(ztzt1,x1,x2,,xt1)P(ztzt1)P(zt1x1,x2,,xt1)Filteringdzt1=zt1P(ztzt1)P(zt1x1,x2,,xt1)dzt1P(z_{t}|x_{1},x_{2},\cdots ,x_{t-1})\\ =\int _{z_{t-1}}P(z_{t},z_{t-1}|x_{1},x_{2},\cdots ,x_{t-1})\mathrm{d}z_{t-1}\\ =\int _{z_{t-1}}\underset{P(z_{t}|z_{t-1})}{\underbrace{P(z_{t}|z_{t-1},x_{1},x_{2},\cdots ,x_{t-1})}}\cdot \underset{Filtering问题}{\underbrace{P(z_{t-1}|x_{1},x_{2},\cdots ,x_{t-1})}}\mathrm{d}z_{t-1}\\ =\int _{z_{t-1}}P(z_{t}|z_{t-1})\cdot P(z_{t-1}|x_{1},x_{2},\cdots ,x_{t-1})\mathrm{d}z_{t-1}

    因此,我们找到了Filtering问题的递推式:

    P(ztx1,x2,,xt)=CP(xtzt)zt1P(ztzt1)P(zt1x1,x2,,xt1)dzt1{\color{Red}{P(z_{t}|x_{1},x_{2},\cdots ,x_{t})}}=C\cdot P(x_{t}|z_{t})\cdot \int _{z_{t-1}}P(z_{t}|z_{t-1})\cdot {\color{Red}{P(z_{t-1}|x_{1},x_{2},\cdots ,x_{t-1})}}\mathrm{d}z_{t-1}

    因此,我们可以确定求解Filtering问题的步骤如下:

    t=1{P(z1x1)updateP(z2x1)predictiont=2{P(z2x1,x2)updateP(z3x1,x2)predictiont{P(ztx1,x2,,xt)updateP(zt+1x1,x2,,xt)predictiont=1\left\{\begin{matrix} P(z_{1}|x_{1})\rightarrow update\\ P(z_{2}|x_{1})\rightarrow prediction \end{matrix}\right.\\ t=2\left\{\begin{matrix} P(z_{2}|x_{1},x_{2})\rightarrow update\\ P(z_{3}|x_{1},x_{2})\rightarrow prediction \end{matrix}\right.\\ \vdots \\ t\left\{\begin{matrix} P(z_{t}|x_{1},x_{2},\cdots ,x_{t})\rightarrow update\\ P(z_{t+1}|x_{1},x_{2},\cdots ,x_{t})\rightarrow prediction \end{matrix}\right.

    很明显这是一个online的过程。

    三、Filtering问题求解

    通过上述转化我们可以确定Filtering问题的计算是通过以下两步迭代计算进行的:

    Step1 Prediction:
    P(ztx1,x2,,xt1)=zt1P(ztzt1)P(zt1x1,x2,,xt1)dzt1P(z_{t}|x_{1},x_{2},\cdots ,x_{t-1})=\int _{z_{t-1}}P(z_{t}|z_{t-1})\cdot P(z_{t-1}|x_{1},x_{2},\cdots ,x_{t-1})\mathrm{d}z_{t-1}
    Step2 Update:
    P(ztx1,x2,,xt)=CP(xtzt)P(ztx1,x2,,xt1)P(z_{t}|x_{1},x_{2},\cdots ,x_{t})=C\cdot P(x_{t}|z_{t})\cdot P(z_{t}|x_{1},x_{2},\cdots ,x_{t-1})

    我们可以确定的是几个高斯分布经过相乘或者积分运算后仍然是高斯分布,所以我们假设:

    Prediction:P(ztx1,x2,,xt1)=N(ztμt,Σt)Update:P(ztx1,x2,,xt)=N(ztμt,Σt)Prediction:P(z_{t}|x_{1},x_{2},\cdots ,x_{t-1})=N(z_{t}|\mu _{t}^{*},\Sigma _{t}^{*})\\ Update:P(z_{t}|x_{1},x_{2},\cdots ,x_{t})=N(z_{t}|\mu _{t},\Sigma _{t})

    代入高斯分布的形式可以得到:

    Prediction:N(ztμt,Σt)=zt1N(ztAzt1+B,Q)N(zt1μt1,Σt1)dzt1Update:N(ztμt,Σt)=CN(xtCzt+D,R)N(ztμt,Σt)Prediction:N(z_{t}|\mu _{t}^{*},\Sigma _{t}^{*})=\int _{z_{t-1}}N(z_{t}|A\cdot z_{t-1}+B,Q)\cdot N(z_{t-1}|\mu _{t-1},\Sigma _{t-1})\cdot \mathrm{d}z_{t-1} \\ Update:N(z_{t}|\mu _{t},\Sigma _{t})=C\cdot N(x_{t}|C\cdot z_{t}+D,R)\cdot N(z_{t}|\mu _{t}^{*},\Sigma _{t}^{*})

    接下来的求解需要用到高斯分布|机器学习推导系列(二)第六部分内容中我们得到的结论,即已知P(x)P(x)P(yx)P(y|x)来求P(y)P(y)P(xy)P(x|y),这里我们直接套用公式即可。

    首先,在Prediction过程中:

    P(ztx1,x2,,xt1)P(y)=zt1P(ztzt1)P(yx)P(zt1x1,x2,,xt1)P(x)dzt1\underset{P(y)}{\underbrace{P(z_{t}|x_{1},x_{2},\cdots ,x_{t-1})}}=\int _{z_{t-1}}\underset{P(y|x)}{\underbrace{P(z_{t}|z_{t-1})}}\cdot \underset{P(x)}{\underbrace{P(z_{t-1}|x_{1},x_{2},\cdots ,x_{t-1})}}\mathrm{d}z_{t-1}

    代入计算P(y)P(y)的公式可得:

    μt=Aμt1+BΣt=Q+AΣt1AT\mu _{t}^{*}=A\mu _{t-1}+B\\ \Sigma _{t}^{*}=Q+A\Sigma _{t-1}A^{T}

    在update过程中:

    P(ztx1,x2,,xt)P(xy)=CP(xtzt)P(yx)P(ztx1,x2,,xt1)P(x)\underset{P(x|y)}{\underbrace{P(z_{t}|x_{1},x_{2},\cdots ,x_{t})}}=C\cdot \underset{P(y|x)}{\underbrace{P(x_{t}|z_{t})}}\cdot \underset{P(x)}{\underbrace{P(z_{t}|x_{1},x_{2},\cdots ,x_{t-1})}}

    代入计算P(xy)P(x|y)的的公式也可以得出结果,过程比较复杂,所以省略。

    注意这里将x1,x2,,xt1x_{1},x_{2},\cdots ,x_{t-1}看做已知即可,然后再套用p(x)p(x)p(yx)p(y|x)等形式。

    另外这里只需要根据公式直接套用得出结果即可,具体的得出的Prediction和Update计算公式并没有用到。

    展开全文
  • 学习卡尔曼滤波有感

    2018-05-20 19:57:07
    卡尔曼滤波真是个用于驱动自我学习非常好的的切入点,尤其是想入门机器学习或者SLAM这类当前比较火的技术或者行业,理解和应用卡尔曼滤波既要求有概率统计相关的基础知识,又要对状态方程、矩阵相关的运算方式非常...

        卡尔曼滤波真是个用于驱动自我学习非常好的的切入点,尤其是想入门机器学习或者SLAM这类当前比较火的技术或者行业,理解和应用卡尔曼滤波既要求有概率统计相关的基础知识,又要对状态方程、矩阵相关的运算方式非常熟悉,虽然还没有完全理解推导过程,但是通过学习,把概率统计中相关的概念:方差、协方差、标准差、无偏估计、贝叶斯准则、高斯分布等含义和来龙去脉重新熟悉了一遍。


          当前学习和参考的材料:
    1、Understanding the Basis of the Kalman Filter;
    2、How a Kalman filter works, in pictures;
    3、卡尔曼滤波与组合导航原理;
    4、https://www.zhihu.com/question/20099757;
    5、https://www.zhihu.com/topic/20016366/hot;
    6、https://www.zhihu.com/search?type=content&q=%E5%8D%A1%E5%B0%94%E6%9B%BC

        特此记录作为学习笔记,后续将继续就结合具体的应用实例来加深理解,熟悉应用场景,真正融会贯通。
    PS:不得不说知乎还是有不少愿意耐心分享知识的牛人以及辛苦翻译的文献搬运工~感谢!
    展开全文
  • 滤波相关学习

    2020-10-11 17:16:28
    文章目录滤波基本概念状态状态转移概率测量概率置信度贝叶斯滤波高斯滤波卡尔曼滤波扩展卡尔曼滤波UKF滤波信息滤波非参数滤波直方图滤波粒子滤波 滤波 为什么叫做滤波滤波一词来源于通信理论,它是从含有干扰的...
  • 粒子滤波(Particle Filter)是动态模型的非线性,非高斯的版本,也就是说ztz_tzt​和zt−1z_{t-1}zt−1​、xtx_txt​和ztz_tzt​的关系是非线性的,其噪声也是非高斯的: zt=g(zt−1,μ,ε)xt=h(zt,μ,δ)z_{t}=g...
  • 粒子滤波算法学习

    2018-07-08 21:38:06
    粒子滤波作为前期信号和数据处理的需要,能使得机器学习的数据更加精确
  • 基本理论图像滤波的目的:去除图像噪声,修复图像损坏,改变图像分布。 均值滤波(Mean Filter)求取NxN像素范围内的均值作为中心点的像素值,N为核大小 例:核为3 核越大,噪声消除效果越好,但图像也会越...
  • 与卡曼滤波不同的是,粒子滤波假设隐变量之间(隐变量与观测变量之间)是非线性的,并且不满足高斯分布,可以是任意的关系。 求解的还是和卡曼滤波一样,但由于分布不明确,所以需要用采样的方法求解。 二、...
  • 相比上两篇文章的逆滤波解法,tensorflow的最优化解法更加高效、简明,往往构建出滤波最优化公式就可以让tensorflow自动最优化,逆向得到目标逆滤波图像。tensorflow逆滤波的实现原理可以参考【图像处理】时域最小...
  • HMM 模型适用于隐变量是离散的值的时候,对于连续隐变量的 HMM,常用线性动态系统描述线性高斯模型的态变量,使用粒子滤波来表述非高斯非线性变量。 LDS 又叫卡尔曼滤波,其中,线性体现在上一时刻和这一时刻的隐...
  • 简单说,时间是有序的量,构成了时序模式识别任务中学习过程的重要成分。 对于动态神经网络来说,它必须以一种或另一种形式给定短期记忆。完成这已修改的一个简单途径是利用时间延迟,时间延迟可以在网络内部的突触...
  • 形态学滤波(Morphological Filter)变形操作: a,b为位置,a+b为向量操作 - 膨胀(Dilation) A为图像: B为结构原素: 则A被B膨胀定义如下: 膨胀操作会使原本图像目标变粗。 - 腐蚀...
  • 此文章主要是结合哔站shuhuai008大佬的白板推导视频:卡曼滤波_59min 一、背景介绍 线性动态系统,也称为卡曼滤波(Kalman Filter),是一种线性高斯模型。 线性体现在上一时刻和这一时刻的隐变量以及隐变量和观测...
  • 此文章主要是结合哔站shuhuai008大佬的白板推导视频:粒子滤波_98min 一、背景介绍 动态模型是在概率图模型中加入一个时间序列的标记,样本之间不再是独立同分布,而是有了依赖关系。动态模型其实质是一个混合模型,...
  • 颜色直方图调整(Histogram Modification)图像增强即增强图象中的有用信息,它可以是一个失真的过程。其目的是要改善图像的视觉效果,针对给定图像的应用场合,有目的地强调图像的整体或局部特性,将原来不清晰的...
  • 一、背景 动态模型 = 图 + 时间 动态模型有三种:HMM、线性动态系统(kalman filter)、particle filter 线性动态系统与HMM的区别是假设相邻隐变量之间满足线性高斯分布,观测变量与隐变量之间满足线性高斯分布...
  • 在开始这个博客之前,首先要感谢一下徐老师。... 言归正传,该博文里面的所有符号体系都是徐老师所用的符号,在此记录一下徐老师最后留下的作业,并且根据徐老师给出的demo,结合kalman的推导进行简单的分析。...
  • 1.机器学习方法原理及编程实现–01.K近邻法(实现MNIST数据分类). 2.机器学习方法原理及编程实现–02.决策树. 3.机器学习方法原理及编程实现–03.朴素贝叶斯分类器(实现MNIST数据分类) . 4.机器学习方法原理及编程...
  • 例如:随着人工智能的不断发展,机器学习这门技术也越来越重要,很多人都开启了学习机器学习,本文就介绍了机器学习的基础内容。 一、同态滤波原理 1.处理原理 (1)认为图像f(x,y)由两部分组成:照射分量i(x,y),...
  • 1.cv2.blur(img, (3, 3)) 进行均值滤波 参数说明:img表示输入的图片, (3, 3) 表示进行均值滤波的方框大小 2. cv2.boxfilter(img, -1, (3, 3), normalize=True) 表示进行方框滤波, 参数说明当normalize=True时...
  • 一、前言 着实好久没有写博客了,回来填坑,不过opencv4已经出来很久了,我的教程...如果你想了解更多有关于计算机视觉、OpenCV、机器学习、深度学习等相关技术的内容,想与更多大佬一起沟通,那就扫描下方二维码加入我

空空如也

空空如也

1 2 3 4 5 ... 18
收藏数 359
精华内容 143
关键字:

机器学习滤波