← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 6537.c · 生成模型:GPT-6

概率程序可以包含动态控制流

理解等级:中级

概率程序可在采样后使用循环或分支决定下一步,例如先得到计数x,再累加x次Bernoulli结果。这能表达固定表格不易直接展示的模型,但每条执行路径的随机变量、支持和返回值仍需清楚定义。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      Implementing a random function with a programming language lets us use nuanced conditional control flow. Consider the following pseudocode: z ~ P(Z) x ~ P(X|Z=z) y = 0 for i in range(0, x){ #1 y_i ~ P(Y|X=x) #1 y += y_i #2 } #1 We can use control flow, like this for loop, to generate values. #2 y is the sum of the values generated

    参考来源

    - 位置:《Causal AI》第02章《概率生成建模入门》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Causal AI/_epub-src/OEBPS/Text/chapter-2.xhtml) - 结论依据:摘录中关于概率程序可以包含动态控制流的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。 - 原始内容:Implementing a random function with a programming language lets us use nuanced conditional control flow. Consider the following pseudocode: z ~ P(Z) x ~ P(X|Z=z) y = 0 for i in range(0, x){ #1 y_i ~ P(Y|X=x) #1 y += y_i #2 } #1 We can use control flow, like this for loop, to generate values. #2 y is the sum of the values generated