编程语言与软件工程2019cs.uoregon.edu
面向终端用户的概率编程
End-User Probabilistic Programming
进阶 · 约 60 分钟读完前置知识:概率编程基础、贝叶斯推断、编程语言设计
导读
这篇论文讨论如何让非专业程序员(如电子表格用户)也能使用概率编程:把不确定性建模与推断能力嵌入他们熟悉的工具中,而不必掌握完整的概率编程语言和推断细节。论文由相关领域研究者撰写,评论者提到它引用了 Guesstimate 这类面向普通用户的概率建模工具。
HN 关注点:“让终端用户直接用概率模型”这一愿景与现有工具抽象严重泄漏的现实之间的落差,以及电子表格+Python/Monte Carlo 等已有实践。
HN 评论精选
这几条评论里:质疑 1 补充 2 亲历 1
补充推荐 Guesstimate,并指出“一键推断”的愿景与 pymc3 等现有工具的实际体验差距很大。
Guesstimate(论文脚注 6 引用过,之前也在 HN 讨论过)是对其中一些想法非常好的实现。有人见过其他好的实现吗?顺便说一句,我最近用 pymc3 做概率编程越来越多,抽象泄漏得相当厉害。我不是说能有更好的做法,只是目前“推断按钮”的美好愿景和现有工具之间还有巨大鸿沟。
exp1orer查看英文原文
Guesstimate [1] (cited in this paper in footnote 6 and previously discussed on HN [2]) is a really nice implementation of some of these ideas. Has anyone come across other good implementations? As a side note, I've been doing more probabilistic programming with pymc3 recently, and it's pretty incredible how leaky the abstractions can be. I'm not saying there's a way to do better, just that at present there's a huge gap between the beautiful vision of "the inference button" and the current tools. [1] https://www.getguesstimate.com/ [2] https://news.ycombinator.com/item?id=18785371
亲历作者分享自制的电子表格蒙特卡洛工具,可顺带用 ML 模型替代复杂表格。
没这篇这么复杂,但我写了个小工具,用 Python 和 Xlwings 对电子表格模型做蒙特卡洛分析(链接)。额外好处是:既然表格模型被暴露为 Python 函数,用简单 ML 模型(决策树等)来模拟复杂表格也很容易。
thanatropism查看英文原文
It's nowhere as sophisticated as this, but I wrote a little utility for Monte Carlo analysis of spreadsheet models with Python and Xlwing: https://github.com/asemic-horizon/stanton As a bonus, since the spreadsheet model is exposed as a Python function, emulating complex spreadsheets with simple ML models (decision trees...) is easy.
质疑质疑新颖性:电子表格概率建模已存在数十年,真正瓶颈是建模与沟通的知识门槛。
有意思但算不上新颖。在某些领域,“终端用户”几十年来一直通过 Excel 等电子表格使用概率工具。更广泛普及受限的原因是所需知识门槛:要么能自信地建这类模型,要么能把概率结果讲给利益相关者。@Risk 和 CrystalBall 是早期简化电子表格模拟开发的 Excel 插件。如别人所说,Excel/Python 组合非常强大但偏底层,DataNitro 以及 Resolver Systems(?)一个 IronPython 驱动的表格界面都是例子。
floki999查看英文原文
Interesting but hardly novel. In certain fields, ‘end users’ have routinely employed probabilistic tools via Excel or other spreadsheets for decades. Wider adoption has been limited due to the knowledge base that is required to either (a) confidently build such models, (b) communicate probabilistic results to stakeholders. @Risk and CrystalBall were some of the earlier Excel add-ins which simplified simulation-based spreadsheet development. As someone else mentioned, the Excel/Python combination is really powerful, although lower-level. DataNitro comes to mind, as well as a product by Resolver Systems (?) which was essentially an IronPython powered spreadsheet interface.
补充指出原 PDF 链接失效,提供 Wayback Machine 存档。
链接不知为何失效了,这是存档版本(web.archive.org 链接)。
lgessler查看英文原文
Dead link for some reason: https://web.archive.org/web/20190619190008/https://www.cs.uoregon.edu/research/summerschool/summer19/lecture_notes/DRAFT___Probabilistic_Programming_for_End_Users.pdf
相关资源
从这篇论文所有 HN 讨论帖的全部评论里整理出来的链接。
历次讨论
- 2019Hacker News 讨论帖167 分 · 15 评
同领域还值得读
Google 的软件工程(2017)
Software Engineering at Google (2017)
介绍了 Google 的软件工程实践,包括其单一代码库(monorepo)、几乎全部开发在主干进行而非分支、代码审查、构建系统 Blaze、协议缓冲区等工具与流程,并讨论了频繁重…
编程语言与软件工程2017 · 1,127 分 · 465 评 · 引用 15入门 · 约 45 分钟编辑精选Peter Naur:编程作为理论构建 (1985)
Peter Naur – Programming as Theory Building (1985)
Peter Naur 1985 年的经典论文《Programming as Theory Building》提出:编程的本质不是写代码或文档,而是在程序员头脑中构建对程序及其运行…
编程语言与软件工程2016 · 629 分 · 74 评入门 · 约 45 分钟编辑精选SciPy 1.0:Python 科学计算的基础算法
SciPy 1.0: fundamental algorithms for scientific computing in Python
这篇发表于 Nature Methods 的论文介绍了 SciPy 1.0——Python 科学计算生态的基石库,涵盖其核心算法模块(优化、积分、插值、线性代数等)、软件架构与社…
编程语言与软件工程2020 · 387 分 · 98 评入门 · 约 45 分钟编辑精选Lisp 的历史(1979)
History of Lisp (1979)
这是 Lisp 发明者 John McCarthy 于 1979 年为 HOPL(编程语言史)会议撰写的回顾文章,讲述 Lisp 的起源、设计动机与早期演进,文中也涉及 if 表…
编程语言与软件工程2018 · 352 分 · 44 评入门 · 约 45 分钟编辑精选使用 NumPy 进行数组编程
Array Programming with NumPy
这篇 Nature 文章介绍 NumPy 的数组编程模型及其在科学计算中的核心作用:以 ndarray 为中心,通过向量化操作让 Python 高效处理多维数组。
编程语言与软件工程2020 · 318 分 · 134 评入门 · 约 40 分钟编辑精选