李宏毅ml note
Intro Traning Function 使用 model: y=b+wx1y = b+wx_{1}y=b+wx1 其中,www 表示 weight,bbb 表示 bias Loss function 表示: L(b,w)L(b,w)L(b,w) Optimization 一般性方法: 梯度下降法(gradient descent) 选择起始点 w0w_0w0 计算梯度 η∂L∂w∣w=w0\eta\frac{\partial L}{\partial w}|_{w = w^0}η∂w∂L∣w=w0 (η\etaη 表示学习率 learning rate) 更新 w: w1←w0−η∂L∂w∣w=w0w_1 \leftarrow w_{0 }-\eta\frac{\partial L}{\partial w}|_{w = w^0}w1←w0−η∂w∂L∣w=w0 b 作同样操作使 L 最小 More sophisticated models 多个 model 叠加 线性叠加 使用多个线性 model 叠加即可得到更为复杂的函数拟合曲线 Sigmoid...
AI基础 笔记II
CSP 概述 组成 A special subset of search problems. State is defined by variables XiX_iXi with values from a domain DDD (sometimes D depends on i). Goal test is a set of constraints specifying allowable combinations of values for subsets of variables 分类 Binary CSP: each constraint relates (at most) two variables. Binary constraint graph: nodes are variables, arcs show constraints. General-purpose CSP algorithms use the graph structure to speed up...
CS188 Notes II
BN Inference Inference by enumeration Select the entries consisitent with the evidence. Sum out H (Hidden variables) to get joint of Query and evidence Normalize Variable Elimination Op 1: Join Factors Op 2: Eliminiate (Marginalizing Early) Op 3: Normalize Sampling Prior sampling 根据贝叶斯网络的拓扑排序,从根节点开始,按照条件概率分布逐步生成样本。 适用于贝叶斯网络的联合分布抽样,但可能导致低效样本(例如,许多样本不符合证据)。 Rejection sampling 先按照直接采样生成样本,然后拒绝不符合证据变量的样本。 适用于查询条件概率 P(X∣E)P(X | E)P(X∣E), Likelilhood weighting 固定证据变量 E,只对非证据变量进行采样。 E...
CS188 Notes I
intro CS188作为Berkeley的人工智能基础课,你交将其精简移植后变成AU3323,课程内容大打折扣但课时并未减少多少。相比于原课程,缺失的内容——RL, Bayes’Nets, Decision Networks的课程笔记将在这里记录。 课程link:CS188 RL 概述 Still assume a Markov decision process (MDP), but we don’t know T or R. Model-based learning Learn an approximate model based on experiences. Solve for values as if the learned model were correct Learn empirical MDP model Solve the learned MDP Run the learned policy Model-free learning Learner is “along for the ride”. No choice about what actions...
AI基础 笔记I
Intro Search: Formulation and Solution (s) Agent categories Rational agent Reflex agent Planning agent Have the model of how the world evolves. Optimal and replannning. Formulation Basic Elements of Search Problem State Space world state search state Successor Function Start state (to start the search) and goal test (to terminate the search) Solution Search graph A mathematical formulation of Search Problem: G={V, E} Nodes V: States IN State Space Edges/Arcs E: Successor Functions...
Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub. Quick Start Create a new post 1$ hexo new "My New Post" More info: Writing Run server 1$ hexo server More info: Server Generate static files 1$ hexo generate More info: Generating Deploy to remote sites 1$ hexo deploy More info: Deployment
概统大作业-draft
摘要: 大数定律在计算机科学中的一个重要应用是随机模拟,也称蒙特卡洛算法。蒙特卡罗积分(Monte Carlo integration)是一种使用随机数进行数值积分的技术。它是一种特殊的蒙特卡罗方法,可实现对定积分进行数值计算。本文将对蒙特卡洛算法的计算原理进行阐述,探讨在函数积分估计中如何利用蒙特卡洛方法生成符合均匀分布的随机数,并通过数值模拟和理论分析验证该方法的有效性。 关键词: 大数定律;蒙特卡洛算法;计算机模拟;定积分;随机数。 1 引言 1.1问题背景 在处理诸如 I=∫011−sinx2dxI = \int_0^1 \sqrt{1-\sin{x^2}} \mathrm dxI=∫011−sinx2dx 的积分时,当目标函数无法不属于初等函数,无法写成出等形式,或者积分区间越来越复杂,无法直接计算出其积分值时,我们需要考量新的积分方法。这时,我们可以引入蒙特卡洛算法。 ...






