em

MLE MAP EM

泄露秘密 提交于 2019-11-26 11:35:58
1.最大似然估计 (MLE): 什么是最大似然估计? 问题:给定一组观察数据还有一个参数待定的模型,如何来估计这个未知参数呢? 观察数据(x 1, y 1 )......(x n, y n ) 待定模型参数为θ,模型为f(x;θ)。这时候可以借助观察数据来估计这个θ。 这就是最大似然函数估计。 举个例子: 假设我们有一个袋子,里面装着白球和黑球,但是我们不知道他们分别有多少个,这时候需要我们估计每次取出一个球是白球的概率是多少?如何估计呢? 可以通过连续有放回的从袋子里面取一百次,看看是白球还是黑球。假设取100次里面 白球占70次,黑球30次。设抽取是白球的概率为P。 那么一百次抽取的总概率为 p(x;p) p(x;p)=p(x 1, x 2....... x 100;θ )=p(x 1 ; θ )* p(x 2 ; θ )........ p(x 100 ; θ ) =p 70 *(1-p) 30 那么这时候我们希望可以使这个概率最大。 求导: logp(x;p)=log p 70 *(1-p) 30 另导数为0则可以求出p=0.7(同理可以用到连续变量里面,这时候就是概率密度函数的乘积so easy) 是不是很简单,对!就是这么简单!其实最大似然估计就是在 给定一组数据和一个待定参数模型,如何确定这个模型未知参数,使得这个确定后的参数模型产生的已知数据概率最大

MLE MAP EM

喜欢而已 提交于 2019-11-26 11:35:51
1.最大似然估计 (MLE): 什么是最大似然估计? 问题:给定一组观察数据还有一个参数待定的模型,如何来估计这个未知参数呢? 观察数据(x 1, y 1 )......(x n, y n ) 待定模型参数为θ,模型为f(x;θ)。这时候可以借助观察数据来估计这个θ。 这就是最大似然函数估计。 举个例子: 假设我们有一个袋子,里面装着白球和黑球,但是我们不知道他们分别有多少个,这时候需要我们估计每次取出一个球是白球的概率是多少?如何估计呢? 可以通过连续有放回的从袋子里面取一百次,看看是白球还是黑球。假设取100次里面 白球占70次,黑球30次。设抽取是白球的概率为P。 那么一百次抽取的总概率为 p(x;p) p(x;p)=p(x 1, x 2....... x 100;θ )=p(x 1 ; θ )* p(x 2 ; θ )........ p(x 100 ; θ ) =p 70 *(1-p) 30 那么这时候我们希望可以使这个概率最大。 求导: logp(x;p)=log p 70 *(1-p) 30 另导数为0则可以求出p=0.7(同理可以用到连续变量里面,这时候就是概率密度函数的乘积so easy) 是不是很简单,对!就是这么简单!其实最大似然估计就是在 给定一组数据和一个待定参数模型,如何确定这个模型未知参数,使得这个确定后的参数模型产生的已知数据概率最大

Why em instead of px?

亡梦爱人 提交于 2019-11-25 23:16:06
问题 I heard you should define sizes and distances in your stylesheet with em instead of in pixels. So the question is why should I use em instead of px when defining styles in css? Is there a good example that illustrates this? 回答1: It is wrong to say that one is a better choice than the other (or both wouldn't have been given their own purpose in the spec). It may even be worth noting that StackOverflow makes extensive use of px units. It is not the poor choice Spoike was told it was. Definition

Responsive font size in CSS

亡梦爱人 提交于 2019-11-25 23:12:43
问题 I\'ve created a site using the Zurb Foundation 3 grid. Each page has a large h1 : body { font-size: 100% } /* Headers */ h1 { font-size: 6.2em; font-weight: 500; } <div class=\"row\"> <div class=\"twelve columns text-center\"> <h1> LARGE HEADER TAGLINE </h1> </div> <!-- End Tagline --> </div> <!-- End Row --> When I resize the browser to mobile size the large font doesn\'t adjust and causes the browser to include a horizontal scroll to accommodate for the large text. I\'ve noticed that on the