SDSC6007 课程 1-动态规划算法简介
#sdsc6007 English / 中文 简介 离散时间动态系统 (The Discrete-Time Dynamic System) 该系统具有以下形式: xk+1=fk(xk,uk,wk),k=0,1,…,N−1,x_{k + 1} = f_{k} (x_k, u_k, w_k ), \quad k = 0, 1, \ldots , N − 1, xk+1=fk(xk,uk,wk),k=0,1,…,N−1, 其中: kkk:离散时间索引 NNN:时间范围(Horizon)或控制被应用的次数 xkx_kxk:系统的状态,属于状态集合 SkS_kSk uku_kuk:在时间 kkk 需要选择的控制变量/决策变量/动作(control/decision variable/action),从集合 Uk(xk)U_k (x_k )Uk(xk) 中选择 wkw_kwk:一个随机参数(也称为扰动 disturbance) fkf_kfk:描述状态如何更新的函数 假设 (Assumption) wkw_kwk 是相互独立的。其概率分布...
SDSC6007 Course 4-Markov Decision Processes(MDPS)
#sdsc6007 English / 中文 Elements of Reinforcement Learning Reinforcement learning includes the following five core elements: Agent and Environment: The agent performs actions, and the environment returns observations and rewards. Reward Signal: A scalar feedback signal indicating the agent’s performance at time t. Policy: Describes the agent’s behavior, mapping from states to actions. Value Function: Predicts the expected future reward (under a specific policy). Model: Predicts the b...
SDSC6012 - Question of Assignment 1
#assignment #sdsc6012 Question 1 趋势成分提取(移动平均法) 趋势成分通过中心化移动平均法提取: Trendt=1k∑i=t−mt+mxi\text{Trend}_t = \frac{1}{k} \sum_{i=t-m}^{t+m} x_i Trendt=k1i=t−m∑t+mxi 其中: kkk 为窗口大小(此处取12,对应年度周期) m=⌊k/2⌋m = \lfloor k/2 \rfloorm=⌊k/2⌋(中心化移动平均的半窗宽) 边界处理:当t<mt < mt<m或t>n−mt > n-mt>n−m时,使用可用数据计算均值 季节性成分提取(周期平均法) 计算去趋势序列:dt=xt−Trendtd_t = x_t - \text{Trend}_tdt=xt−Trendt 对每个周期位置jjj(j=0,1,…,11j=0,1,\ldots,11j=0,1,…,11)计算平均值: sj=1Nj∑k=0Nj−1dj+12ks_j = \f...
SDSC6015 Course 1-Introduction / Preliminaries of Stochastic Optimization
#sdsc6015 English / Chinese Course Introduction and Preliminary Stochastic Optimization Main Problem Given labeled training data (x1,y1),…,(xn,yn)∈Rd×Y(x_1, y_1), \dots, (x_n, y_n) \in \mathbb{R}^d \times \mathcal{Y}(x1,y1),…,(xn,yn)∈Rd×Y, find weights θ\thetaθ to minimize: minθf(θ)=1n∑i=1nℓ(θ,(xi,yi)),n extremely large\min_{\theta} f(\theta) = \frac{1}{n} \sum_{i=1}^{n} \ell(\theta, (x_i, y_i)), \quad n \text{ extremely large} θminf(θ)=n1i=1∑nℓ(θ,(xi,yi)),n extremely large Object...
SDSC6015 课程 5
Mirror Descent 点击展开 Mirror Descent 复习内容 动机 考虑单纯形约束优化问题: minx∈△df(x)\min_{x \in \triangle_d} f(x) x∈△dminf(x) 其中单纯形 △d:={x∈Rd:∑i=1dxi=1,xi≥0,∀i}\triangle_d := \{x \in \mathbb{R}^d : \sum_{i=1}^d x_i = 1, x_i \geq 0, \forall i\}△d:={x∈Rd:∑i=1dxi=1,xi≥0,∀i}。假设梯度无穷范数有界:∥∇f(x)∥∞=maxi=1,…,d∣[∇f(x)]i∣≤1\|\nabla f(x)\|_\infty = \max_{i=1,\ldots,d} |[\nabla f(x)]_i| \leq 1∥∇f(x)∥∞=maxi=1,…,d∣[∇f(x)]i∣≤1。 符号说明:xxx 是优化变量,ddd 是维度,△d\triangle_d△d 是概率单纯形。 几何意义:单纯形是概率分布空间,约束优化要求解在概率约束下最小化损失...
SDSC6015 课程 4
#sdsc6015 English / 中文 投影梯度下降 (Projected Gradient Descent) 投影梯度下降是处理约束优化问题的算法,通过梯度步后投影回可行集来确保约束满足。 约束优化问题定义 约束优化问题形式化定义为: minf(x)subject tox∈X\begin{aligned} &\min f(x) \\ &\text{subject to}\quad x \in X \end{aligned} minf(x)subject tox∈X 其中: f:Rd→Rf: \mathbb{R}^d \rightarrow \mathbb{R}f:Rd→R 是目标函数 X⊆RdX \subseteq \mathbb{R}^dX⊆Rd 是一个闭凸集(closed convex set) x∈Rdx \in \mathbb{R}^dx∈Rd 是优化变量 几何意义:在满足约束 x∈Xx \in Xx∈X 的前提下,寻找使 f(x)f(x)f(x) 最小的点。 算法描述 投影梯度下降迭代步骤: For t=0,1,2,… ...
SDSC6015 课程 3-最速梯度下降与次梯度下降
#sdsc6015 English / 中文 回顾 点击展开 凸优化问题 凸优化问题的一般形式为: minx∈Rdf(x)\min_{x \in \mathbb{R}^d} f(x) x∈Rdminf(x) 其中 fff 是凸函数,Rd\mathbb{R}^dRd 是凸集,x∗x^*x∗ 是其最小化点: x∗=argminx∈Rdf(x)x^* = \arg\min_{x \in \mathbb{R}^d} f(x) x∗=argx∈Rdminf(x) 梯度下降(Gradient Descent, GD)的更新规则为: xk+1=xk−ηk+1∇f(xk)x_{k+1} = x_k - \eta_{k+1} \nabla f(x_k) xk+1=xk−ηk+1∇f(xk) xkx_kxk:当前参数点 ηk>0\eta_k > 0ηk>0:步长(学习率) xk+1x_{k+1}xk+1:更新后的参数点 平滑函数(Smooth Functions) 定义: 若函数 f:dom(f)→Rf: \text{dom}(f) \to...
SDSC6012 Course 5-Autoregressive models
#sdsc6012 English / 中文 Autoregressive Model (AR(p)) Definition and Form A p-th order autoregressive model, denoted as AR(p), has the form: xt=ϕ1xt−1+ϕ2xt−2+⋯+ϕpxt−p+wtx_t = \phi_1 x_{t-1} + \phi_2 x_{t-2} + \cdots + \phi_p x_{t-p} + w_t xt=ϕ1xt−1+ϕ2xt−2+⋯+ϕpxt−p+wt where: wt∼wn(0,σw2)w_t \sim \text{wn}(0, \sigma_w^2)wt∼wn(0,σw2) is white noise with mean 0 and variance σw2\sigma_w^2σw2. ϕ1,ϕ2,…,ϕp\phi_1, \phi_2, \ldots, \phi_pϕ1,ϕ2,…,ϕp (with ϕp≠0\phi_p \neq 0ϕp=0) are the ...
SDSC6012 课程 5-自回归移动平均模型
#sdsc6012 English / 中文 自回归模型(AR(p)) 定义与形式 一个 ppp 阶自回归模型,记为 AR(p)AR(p)AR(p),其形式为: xt=ϕ1xt−1+ϕ2xt−2+⋯+ϕpxt−p+wtx_t = \phi_1 x_{t-1} + \phi_2 x_{t-2} + \cdots + \phi_p x_{t-p} + w_t xt=ϕ1xt−1+ϕ2xt−2+⋯+ϕpxt−p+wt 其中: wt∼wn(0,σw2)w_t \sim \text{wn}(0, \sigma_w^2)wt∼wn(0,σw2) 是均值为0、方差为 σw2\sigma_w^2σw2 的白噪声。 ϕ1,ϕ2,…,ϕp\phi_1, \phi_2, \ldots, \phi_pϕ1,ϕ2,…,ϕp(且 ϕp≠0\phi_p \neq 0ϕp=0)是自回归系数。 直观理解:当前值 xtx_txt 是其自身过去 ppp 个历史值的线性组合,再加上一个随机扰动。它捕捉的是序列的“惯性”或“记忆”,即序列自身历史对其当前状态的影响。 平稳...
SDSC6007 - Assignment 1
SDSC6007 - Assignment 1 #assignment #sdsc6007 Question 1 Ash Ketchum is preparing his next trip and packing up. His backpack has maximum weight capacity is z and he wants to fill it up with different quantities of N different items. Denote viv_{i}vi : the value of the i th type of item wiw_{i}wi : the weight of i th item xix_{i}xi : the number of items of type i that are loaded in the backpack Ash Ketchum is trying to maximize the total value of all the items in his backpack, i.e. t...
SDSC6012 Course 4-Autoregressive models
#sdsc6012 English / 中文 Stationarity Strict Stationarity A time series {xt}\{x_t\}{xt} is strictly stationary if and only if for any kkk, any time points t1,t2,…,tkt_1, t_2, \ldots, t_kt1,t2,…,tk, and any time shift hhh, we have: P{xt1≤c1,…,xtk≤ck}=P{xt1+h≤c1,…,xtk+h≤ck}P\{x_{t_1} \leq c_1, \ldots, x_{t_k} \leq c_k\} = P\{x_{t_1+h} \leq c_1, \ldots, x_{t_k+h} \leq c_k\} P{xt1≤c1,…,xtk≤ck}=P{xt1+h≤c1,…,xtk+h≤ck} Core Meaning: Strict stationarity implies that the complete probab...
SDSC6012 课程 4-自回归模型
#sdsc6012 English / 中文 平稳性(Stationarity) 严格平稳性(Strict Stationarity) 时间序列 {xt}\{x_t\}{xt} 是严格平稳的,当且仅当对于任意 kkk、任意时间点 t1,t2,…,tkt_1, t_2, \ldots, t_kt1,t2,…,tk 和任意时间偏移量 hhh,都有: P{xt1≤c1,…,xtk≤ck}=P{xt1+h≤c1,…,xtk+h≤ck}P\{x_{t_1} \leq c_1, \ldots, x_{t_k} \leq c_k\} = P\{x_{t_1+h} \leq c_1, \ldots, x_{t_k+h} \leq c_k\} P{xt1≤c1,…,xtk≤ck}=P{xt1+h≤c1,…,xtk+h≤ck} 核心意义:严格平稳性意味着时间序列的完整概率分布不随时间变化。无论选择哪个时间窗口,其联合分布特性保持不变。这使得从单个时间序列样本中获取的统计量能够成为总体性质的有效估计。 弱平稳性(Weak Stationarity) 时间序列 {xt...
SDSC6007 课程 4-马尔可夫决策过程
#sdsc6007 English / 中文 强化学习的元素 强化学习包含以下五个核心元素: 智能体与环境:智能体执行动作,环境返回观测和奖励 奖励信号:标量反馈信号,指示智能体在时间t的表现 策略:描述智能体行为,是从状态到动作的映射 价值函数:预测预期未来奖励(在特定策略下) 模型:预测环境的行为/回报 智能体与环境的交互 在每个时间步t: 智能体执行动作 AtA_tAt,接收观测 OtO_tOt 和标量奖励 RtR_tRt 环境接收动作 AtA_tAt,发出观测 Ot+1O_{t+1}Ot+1 和标量奖励 Rt+1R_{t+1}Rt+1 历史是观测、动作和奖励的序列: Ht=O1,R1,A1,…,At−1,Ot,RtH_t = O_1, R_1, A_1, \ldots, A_{t-1}, O_t, R_t Ht=O1,R1,A1,…,At−1,Ot,Rt 状态的定义 状态 StS_tSt 是马尔可夫的,当且仅当它包含历史中的所有有用信息: P(St+1∣St)=P(St+1∣S1,…,St)P(S_{t+1}...
SDSC6015 - Question of Assignment 1
#assignment #sdsc6015 作业初稿 SDSC6015 - Assignment 1 Problem 1: Jensen’s inequality Let f be convex, x1,…,xm∈dom(f),λ1,…,λm∈R+x_{1},\ldots, x_{m}\in\operatorname{dom}(f),\lambda_{1},\ldots,\lambda_{m}\in R_{+}x1,…,xm∈dom(f),λ1,…,λm∈R+ such that ∑i=1mλi=1\sum_{i=1}^{m}\lambda_{i}=1∑i=1mλi=1 . Show that f(∑i=1mλixi)≤∑i=1mλif(xi)f\left( \sum_{i=1}^m \lambda_i x_i \right) \leq \sum_{i=1}^m \lambda_i f(x_i) f(i=1∑mλixi)≤i=1∑mλif(xi) Proof. 对于m=2m=2m=2: 令 λ1+λ2=1\lambd...
SDSC6015 - Assignment 1
SDSC6015 - Assignment 1 #assignment #sdsc6015 Problem 1: Jensen’s inequality Let f be convex, x1,…,xm∈dom(f),λ1,…,λm∈R+x_{1},\ldots, x_{m}\in\operatorname{dom}(f),\lambda_{1},\ldots,\lambda_{m}\in R_{+}x1,…,xm∈dom(f),λ1,…,λm∈R+ such that ∑i=1mλi=1\sum_{i=1}^{m}\lambda_{i}=1∑i=1mλi=1 . Show that f(∑i=1mλixi)≤∑i=1mλif(xi)f\left( \sum_{i=1}^m \lambda_i x_i \right) \leq \sum_{i=1}^m \lambda_i f(x_i) f(i=1∑mλixi)≤i=1∑mλif(xi) Proof. For m=2m=2m=2: Let λ1+λ2=1\lambda_1 + \lambda_2 =...
SDSC6007 - Question of Assignment 1
#assignment #sdsc6007
SDSC5003 - Question of Assignment 1
#assignment #sdsc5003 原文 NOTE: The university policy on academic dishonesty and plagiarism (cheating) will be taken very seriously in this course. Everything submitted should be your own writing or coding. You must not let other students copy your work. Discussions of the assignment are okay, e.g. understanding the concepts involved. This assignment is an individual one. Upload your work as a single archive file with name A1-XXXX-YYYY.zip where XXXX is your name and YYYY is your student ID. ...
SDSC5003 - Assignment 1
SDSC5003 - Assignment1 #assignment #sdsc5003 Part I. ER Modelling Part II: Creating Relational Schemas in SQL for Part I SQL scripts 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273-- Create customer tableCREATE TABLE Customer ( cid TEXT PRIMARY KEY NOT NULL, cname TEXT NOT NULL);-- Create company customer tableCREATE TABLE Company ( cid TEXT PRIMARY KEY NOT NULL, street TEXT NOT NULL, ci...
SDSDC5002 - Question of Assignment 1
#assignment #sdsc5002
SDSC5001 - Assignment 1
SDSC5001 - Assignment 1 #assignment #sdsc5001 1. For each of parts(a) through(d), indicate whether we would generally expect the performance of a flexible statistical learning method to be better or worse than an inflexible method. Justify your answer. (a) The sample size n is extremely large, and the number of predictors p is small. Better. With a large amount of data, complex models (flexible methods) have a lower risk of overfitting and can better learn the underlying patterns. (b) The nu...
SDSC5001 - Question of Assignment 1
#assignment #sdsc5001
SDSC6007 Course Information
#sdsc6007 #course information English / 中文 Course Overview Course Code: SDSC6007 & SDSC8006 Course Name: Dynamic Programming and Reinforcement Learning Semester: First Semester, 2025 Academic Year Instructor: Clint Chin Pang Ho Email: client.ho@cityu.edu.hk Office: LAU-16-228 Consultation Hours: By appointment Teaching Assistants (TAs): Yanbo He (yanbohe3-c@my.cityu.edu.hk) Ellen Yi Wong (ywong692-c@my.cityu.edu.hk) Yuqi Zha (charlie.yqzha@my.cityu.edu.hk) Assessment Component ...
SDSC6007 课程信息
#SDSC6007 #course information English / 中文 课程概览 课程代码: SDSC6007 & SDSC8006 课程名称: 动态规划与强化学习 学期: 2025学年第一学期 授课教师: Clint Chin Pang Ho 邮箱: client.ho@cityu.edu.hk 办公室: LAU-16-228 答疑时间: 需预约 助教 (TAs): Yanbo He (yanbohe3-c@my.cityu.edu.hk) Ellen Yi Wong (ywong692-c@my.cityu.edu.hk) Yuqi Zha (charlie.yqzha@my.cityu.edu.hk) 考核方式 组成部分 权重 详情 作业 20% 两次作业(每次10%)。通过Canvas在线提交,格式为.pdf、.py、.mp4、.txt。 期中考试 20% 闭卷考试。 小组项目 30% 一个小组项目。详情见下文。 期末考试 30% 闭卷考试。 逾期提交政策: 若逾期 ( ttt ) 天 (( t&g...
SDSC5003 课程信息
#sdsc5003 #course information English / 中文 课程概览 课程代码: SDSC5003 课程名称: 数据库系统导论 学期: 2025/26 学年第一学期 授课教师: Yu Yang (yuyang@cityu.edu.hk) Terence Chan (terenceChan@cityu.edu.hk) 教学模式: 面授 答疑时间: 待定 (TBA) 助教: 未指定 考核方式 考核组成部分 权重 说明 个人作业 30% 独立完成的作业任务 期末考试 50% 考试时间为12月8日至20日 小组项目 20% 3-5人一组,分为Track 1(应用开发)或Track 2(论文复现) ↳ 源代码 30%* 项目代码、数据库 schema、测试脚本等(提交至GitHub) ↳ 视频演示 20%* 5-8分钟视频演示应用功能或论文复现过程 ↳ 书面报告 50%* PDF报告,包含小组信息、技术设计、评估结果等 时间安排与教学 周数 日期 (示例) 活动 内容 截止日期 1 2025-09-...
SDSC5002 Course Information
#sdsc5002 #course information English / 中文 Course Overview Course Code: SDSC5002C61 Course Name: Exploratory Data Analysis and Visualization Semester: First Semester, 2025/26 Academic Year Instructor: Professor Wang Lijia Email: lijiwang@cityu.edu.hk Office: Room 16-272, Lau Pak Here Building Lecture Time: To be specified (please check Canvas for updates) Office Hours: To be specified Teaching Mode: Face-to-face Teaching Assistants: Li Minghe (mingheli2-c@my.cityu.edu.hk) responsible for T...
