楼主: snowrain
2924 2

[FRM考试] 求教关于LDA 损失分布图的问题 [推广有奖]

  • 0关注
  • 0粉丝

小学生

78%

还不是VIP/贵宾

-

威望
0
论坛币
256 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
107 点
帖子
11
精华
0
在线时间
4 小时
注册时间
2006-2-16
最后登录
2013-7-18

楼主
snowrain 发表于 2013-7-16 12:19:54 |AI写论文
3论坛币

O.png
有一题关于LDA用概率算损失的题如上。下面是用概率计算各种损失。

LOSS.png
我的问题是:计算LOSS 为2000时,概率为 0.2*0.6*0.6, 意思是2次损失都为1000。计算11,000时,概率为 0.2*0.6*0.3+0.2*0.3*0.6, 意思是2次损失的顺序不一样么?
那么都是2次损失,为什么2000概率不是 0.2*0.6*0.6+0.2*0.6*0.6 (同样有2次机会阿)

思绪有点混乱,希望各位大虾明白我的困惑。。。
真心求解。。

关键词:LDA 分布图 loss 我的问题 OSS 分布图

沙发
snowrain 发表于 2013-7-18 15:01:00
没人。。。。5555

藤椅
Waterloo19 发表于 2015-5-30 09:11:19
Let
s1 = 1000 and f(s1) = 0.6
s2 = 10000 and f(s2) = 0.3
s3 = 100000 and f(s3) = 0.1

Think of s1, s2, and s3 as three types of events. When loss = 11000, it has to be that both s1 and s2 happened, and there are two combinations, either s1 took place first then s2, or s2 took place first and then s1. When loss = 2000, it has to be that s1 happened twice, that is, s1 took place first then s1 again, which is only one combination.

# simulation in R below
x <- NULL
z <- NULL

r <- runif(100000)
x <- ifelse(r<=0.5, 0, ifelse(r<=0.8, 1, 2))
table(x)

for (i in (1:length(x))) {
  if (x[i]==0) {
    z[i] <- 0
  } else if (x[i]==1) {
    u <- runif(1)
    z[i] <- ifelse(u<=0.6, 1000, ifelse(u<=0.9, 10000, 100000))  
  } else if (x[i]==2) {
    u <- runif(1)
    y1 <- ifelse(u<=0.6, 1000, ifelse(u<=0.9, 10000, 100000))  
    u <- runif(1)
    y2 <- ifelse(u<=0.6, 1000, ifelse(u<=0.9, 10000, 100000))  
    z[i] <- y1 + y2
  }
}
table(z)/length(x)

## z
##      0    1000    2000   10000   11000   20000   1e+05  101000  110000   2e+05
## 0.49896 0.18187 0.07184 0.08981 0.07050 0.01867 0.03028 0.02429 0.01178 0.00200

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

本版微信群
加好友,备注jr
拉您进交流群
GMT+8, 2025-12-9 03:39