Inverse transform sampling反变换采样法

感谢上海交大黄晨博士的博客:https://blog.csdn.net/doublehhcc/article/details/81166502
亦感谢上海交大博士生许志钦(现为纽约大学克朗研究院博士后)为直观解释所作的贡献,令博主与黄晨同学恍然大悟。

Goal:

Let X X be a random variable whose distribution can be described by the cumulative distribution function FX F X .
We want to generate values of X X which are distributed according to this distribution.

Algorithm:

The inverse transform sampling method works as follows:

  • Generate a random number u u from the standard uniform distribution in the interval [0,1] [ 0 , 1 ] e.g. from UUnif[0,1]. U ∼ U n i f [ 0 , 1 ] .
  • Find the inverse of the desired CDF, e.g. F1X(x) F X − 1 ( x ) .
  • Compute X=F1X(u) X = F X − 1 ( u ) . This random variablel X X computed has distribution FX F X .

Expressed differently, given a continuous uniform variable U U in [0,1] [ 0 , 1 ] and an invertible cumulative distribution function FX F X , the random variable X=F1X(U) X = F X − 1 ( U ) has distribution FX F X (or, X X is distributed FX F X ).

逆变换采样的直观解释:

Inverse transform sampling反变换采样法_第1张图片

参考链接:https://en.wikipedia.org/wiki/Inverse_transform_sampling

你可能感兴趣的:(机器学习)