《Practical Statistics for Data Scientists》书籍英文版
《面向数据科学家的实用统计学》中文版书籍

第 3 章 统计实验与显著性检验

实验设计是统计实践的基石,在几乎所有研究领域都有应用。其目标是设计实验以确认或拒绝某个假设。数据科学家往往需要持续进行实验,尤其是关于用户界面和产品营销方面的实验。本章回顾了传统实验设计,并讨论了数据科学中常见的一些挑战;还介绍了一些统计推断中经常被引用的概念,并解释了它们的含义及其与数据科学的相关性(或不相关性)。

F3.1

当你看到统计显著性、t 检验或 p 值等术语时,通常是在经典统计推断“流水线”的上下文中(见图 3-1)。这个过程从一个假设开始(例如“药物 A 优于现有标准药物”或“价格 A 比现有价格 B 更有利可图”)。然后设计实验(可能是 A/B 测试)以检验这个假设——设计得尽可能能够得出结论性结果。接着收集并分析数据,然后得出结论。术语“推断”体现了这样一种意图:将涉及有限数据集的实验结果,应用到更大的过程或总体上。

阅读全文 »

《Practical Statistics for Data Scientists》书籍英文版
《面向数据科学家的实用统计学》中文版书籍

第 2 章 数据与抽样分布

人们常见的一个误解是,大数据时代意味着不再需要抽样。事实上,数据在质量和相关性上呈现爆炸式增长,反而强化了抽样作为高效处理各种数据并最小化偏差的工具的重要性。即使在大数据项目中,预测模型通常也是用样本开发和试运行的。样本还用于各种测试(例如,比较不同网页设计对点击率的影响)。

F2.1

图 2-1 展示了支撑本章所讨论概念——数据与抽样分布——的示意图。左侧表示总体,在统计学中假定总体遵循某个潜在但未知的分布。我们唯一能获取的是右侧所示的样本数据及其经验分布。要从左侧到达右侧,需要一个抽样过程(由箭头表示)。传统统计学非常注重左侧,依赖于对总体作出强假设的理论。现代统计学则更多地转向右侧,不再需要这些假设。

总体而言,数据科学家不必担心左侧的理论性质,而应关注抽样过程和手头的数据。不过也有一些显著例外。有时数据源自可以建模的物理过程。最简单的例子是掷硬币:它服从二项分布。任何现实中的二项情境(购买或不购买、欺诈或非欺诈、点击或不点击)都可以有效地用一枚硬币来建模(当然,硬币正面出现的概率可调整)。在这些情况下,我们可以通过理解总体获得更多洞见。

阅读全文 »

《Practical Statistics for Data Scientists》书籍英文版
《面向数据科学家的实用统计学》中文版书籍

前言

本书旨在帮助对 R 和/或 Python 编程语言有一定熟悉度、并对统计学有过一些前期(可能零星或短暂的)接触的数据科学家。两位作者从统计学领域进入数据科学世界,对统计学能为数据科学这门艺术所做的贡献心怀感激。与此同时,我们深知传统统计学教学的局限性:统计学作为一门学科已有一个半世纪的历史,大多数统计学教科书和课程都承载着巨轮般的动量和惯性。本书中的所有方法都与统计学这门学科有着某种联系——无论是历史上的还是方法论上的。那些主要从计算机科学演变而来的方法,比如神经网络,则不包括在内。

本书的两个目标是:

  • 以易于消化、导航和参考的形式,列出与数据科学相关的关键统计概念
  • 从数据科学的角度解释哪些概念是重要且有用的,哪些则不那么重要,以及原因何在
阅读全文 »

ChatGPT、Gemini等大语言模型(LLM)是大脑,但就如同人一样,除了大脑之外,还需要相应的手脚去和外部世界交互,而Agent(智能体)至于LLM也是如此。

本书的全名是《Agentic Design Patterns: A Hands-On Guide to Building Intelligent Systems》,本读书笔记使用的是GitHub的翻译资料。

以下是读书的一些摘要。

  • 使人类能将更多精力投入于构思和批判性分析。

  • Transformers(变换器):变换器是现代大语言模型的基础神经网络架构。其核心创 新是自注意力机制,能高效处理长文本序列并捕捉词语间复杂关系。

  • Google Gems 使用 Google AI“Gems”是 Gemini 架构下的用户可配置特性,每个 Gem 是专用 AI 实例, 针对特定任务定制。用户通过指令集定义 Gem 用途、响应风格和知识领域,模型在整 个会话中始终遵循这些指令。 可创建专用智能体,如仅引用特定库的代码解释器、只生成摘要的分析助手、遵循特定 风格的翻译器等。Gem 为 AI 建立持久、任务专用上下文,避免重复设定,提高效率和 一致性,实现细粒度、持久化用户指令。

阅读全文 »

Chapter 21: Exploration and Discovery | 第二十一章:探索与发现

This chapter explores patterns that enable intelligent agents to actively seek out novel information, uncover new possibilities, and identify unknown unknowns within their operational environment. Exploration and discovery differ from reactive behaviors or optimization within a predefined solution space. Instead, they focus on agents proactively venturing into unfamiliar territories, experimenting with new approaches, and generating new knowledge or understanding. This pattern is crucial for agents operating in open-ended, complex, or rapidly evolving domains where static knowledge or pre-programmed solutions are insufficient. It emphasizes the agent's capacity to expand its understanding and capabilities.

阅读全文 »

Chapter 20: Prioritization | 第二十章:优先级排序

In complex, dynamic environments, Agents frequently encounter numerous potential actions, conflicting goals, and limited resources. Without a defined process for determining the subsequent action, the agents may experience reduced efficiency, operational delays, or failures to achieve key objectives. The prioritization pattern addresses this issue by enabling agents to assess and rank tasks, objectives, or actions based on their significance, urgency, dependencies, and established criteria. This ensures the agents concentrate efforts on the most critical tasks, resulting in enhanced effectiveness and goal alignment.

阅读全文 »

Chapter 19: Evaluation and Monitoring | 第 19 章:评估与监控

This chapter examines methodologies that allow intelligent agents to systematically assess their performance, monitor progress toward goals, and detect operational anomalies. While Chapter 11 outlines goal setting and monitoring, and Chapter 17 addresses Reasoning mechanisms, this chapter focuses on the continuous, often external, measurement of an agent's effectiveness, efficiency, and compliance with requirements. This includes defining metrics, establishing feedback loops, and implementing reporting systems to ensure agent performance aligns with expectations in operational environments (see Fig.1)

阅读全文 »

Chapter 18: Guardrails/Safety Patterns | 第十八章:护栏/安全模式

Guardrails, also referred to as safety patterns, are crucial mechanisms that ensure intelligent agents operate safely, ethically, and as intended, particularly as these agents become more autonomous and integrated into critical systems. They serve as a protective layer, guiding the agent's behavior and output to prevent harmful, biased, irrelevant, or otherwise undesirable responses. These guardrails can be implemented at various stages, including Input Validation/Sanitization to filter malicious content, Output Filtering/Post-processing to analyze generated responses for toxicity or bias, Behavioral Constraints (Prompt-level) through direct instructions, Tool Use Restrictions to limit agent capabilities, External Moderation APIs for content moderation, and Human Oversight/Intervention via "Human-in-the-Loop" mechanisms.

阅读全文 »

Chapter 17: Reasoning Techniques | 第 17 章:推理技术

This chapter delves into advanced reasoning methodologies for intelligent agents, focusing on multi-step logical inferences and problem-solving. These techniques go beyond simple sequential operations, making the agent's internal reasoning explicit. This allows agents to break down problems, consider intermediate steps, and reach more robust and accurate conclusions. A core principle among these advanced methods is the allocation of increased computational resources during inference. This means granting the agent, or the underlying LLM, more processing time or steps to process a query and generate a response. Rather than a quick, single pass, the agent can engage in iterative refinement, explore multiple solution paths, or utilize external tools. This extended processing time during inference often significantly enhances accuracy, coherence, and robustness, especially for complex problems requiring deeper analysis and deliberation.

阅读全文 »

Chapter 16: Resource-Aware Optimization | 第 16 章:资源感知优化

Resource-Aware Optimization enables intelligent agents to dynamically monitor and manage computational, temporal, and financial resources during operation. This differs from simple planning, which primarily focuses on action sequencing. Resource-Aware Optimization requires agents to make decisions regarding action execution to achieve goals within specified resource budgets or to optimize efficiency. This involves choosing between more accurate but expensive models and faster, lower-cost ones, or deciding whether to allocate additional compute for a more refined response versus returning a quicker, less detailed answer.

阅读全文 »
0%