MyUbuntu 服务关机与启动流程
#Docker #btrfs #systemd #服务器运维 磁盘与挂载结构 设备 容量 类型 挂载点 说明 sda (SSD) 119G ext4 / 系统盘,已用 93% sdb (WD 4T) 3.6T exfat /smb 外部硬盘,影视/文件共享 sdc (WD 2T) 1.8T btrfs /nfs btrfs 多设备卷成员 1 sdd (2T) 1.8T btrfs —(内核接管) btrfs 多设备卷成员 2 btrfs 卷说明 sdc 与 sdd 共享同一 UUID,组成一个 btrfs 多设备卷(RAID1 镜像),挂载为 /nfs,有效容量约 1.8T。sdd 不单独显示挂载点属正常现象,umount /nfs 会同时释放两块盘。系统无软件 RAID(mdstat 为空)。 磁盘设备名(sdb/sdc/sdd)在每次启动时可能因识别顺序不同而重新分配,但 fstab 使用 UUID 挂载,不受设备名影响。 服务依赖关系 1234567/smb (sdb) ←── qbittorrent 下载目录 /smb/Downlo...
DNS 迁移到 Cloudflare 后的一系列部署问题排查
#Git #Cloudflare #acme.sh #部署 背景 博客采用如下部署架构: 123456本地 Mac ──git push──▶ 内网服务器 (hexo.git bare repo) │ post-receive hook ├─ hexo generate └─ rsync ──▶ 公网服务器 │ Nginx 对外提供服务 将域名 DNS 从阿里云迁移到 Cloudflare 后,连锁触发了三个问题:SSL 续签失败、git push 超时、hexo hook 不触发。以下记录完整排查过程。 一、SSL 续签失败 现象 123[ERROR] Le_OrderFinalize[ERROR] error code: 3[ERROR...
acme.sh SSL 证书续签:从手动 DNS 迁移到 Cloudflare 全自动续签
#SSL #acme.sh #Cloudflare #Nginx 背景 博客使用 acme.sh + Let’s Encrypt 签发 ECC 证书,原方案依赖阿里云 DNS API(dns_ali)自动验证。DNS 迁移到 Cloudflare 后需同步更新续签方式,同时记录中途遇到的一次手动续签失败的排查过程。 一、故障:续签时 Finalize 报错 错误现象 123[ERROR] Le_OrderFinalize[ERROR] Please refer to https://curl.haxx.se/libcurl/c/libcurl-errors.html for error code: 3[ERROR] Signing failed. Finalize code was not 200. 原因 libcurl 错误码 3 为 CURLE_URL_MALFORMAT,即 acme.sh 缓存的 ACME 订单状态中 Le_OrderFinalize URL 损坏,导致签名阶段失败。 解决 删除缓存的域名配置,强制重新发起订单: 123456rm -rf ~/.acme...
SDSC6015 Course 5-Mirror Descent and SDG
#sdsc6015 English / 中文 Mirror Descent Click to expand Mirror Descent review content Motivation Consider the simplex-constrained optimization problem: minx∈△df(x)\min_{x \in \triangle_d} f(x) x∈△dminf(x) where the simplex △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}. Assume the gradient’s infinity norm is bounded: ∥∇f(x)∥∞=maxi=1,…,d∣[∇f(x)]i∣≤1\|\nabla f(x)\|_\infty = \max_{i=1,\ldots,d} |[...
SDSC6015 Course 4-Projected Gradient Descent, Proximal Gradient Desent and Mirror Descent
#sdsc6015 English / 中文 Projected Gradient Descent Projected Gradient Descent is an algorithm for constrained optimization problems that ensures constraint satisfaction by projecting gradient steps back onto the feasible set. Constrained Optimization Problem Definition The constrained optimization problem is formally defined as: minf(x)subject tox∈X\begin{aligned} &\min f(x) \\ &\text{subject to}\quad x \in X \end{aligned} minf(x)subject tox∈X where: f:Rd→Rf: \mathbb{R}^d \righta...
SDSC5001 - Assignment 2
#assignment #sdsc5001 题目链接SDSC5001 - Question of Assignment 2 Question 1 When the number of features p is large, there tends to be a deterioration in the performance of KNN and other local approaches that perform prediction using only observations that are near the test observation for which a prediction must be made. This phenomenon is known as the curse of dimensionality, and it ties into the fact that non-parametric approaches often perform poorly when p is large. We will now investigate t...
SDSC5001 - Question of Assignment 2
#assignment #sdsc5001 Question 1 When the number of features p is large, there tends to be a deterioration in the performance of KNN and other local approaches that perform prediction using only observations that are near the test observation for which a prediction must be made. This phenomenon is known as the curse of dimensionality, and it ties into the fact that non-parametric approaches often perform poorly when p is large. We will now investigate this curse. (a) Suppose tha...
SDSC6015 - Assignment 2
#assignment #sdsc6015 题目链接SDSC6015 - Question of Assignment 2 Problem 1[10 marks] Prove that if the function f:Rd→Rf: \mathbb{R}^{d}\rightarrow \mathbb{R}f:Rd→R has a subgradient at every point in its domain, then fff is convex. Solution: Let x,y∈Rdx, y \in \mathbb{R}^dx,y∈Rd, λ∈[0,1]\lambda \in [0,1]λ∈[0,1], and define z=λx+(1−λ)yz = \lambda x + (1-\lambda)yz=λx+(1−λ)y. Since a subgradient exists at every point, for any gz∈∂f(z)g_z \in \partial f(z)gz∈∂f(z), we have: f(x)≥f(z)+⟨gz,x−z⟩,f(y...
SDSC5002 - Assignment 1
SDSC 5002 - Assignment 1 #assignment #sdsc5002
课程信息概览
📅 TODO SDSC5001 - Assignment 2 SDSC6015 - Assignment 2 SDSC6007 - Assignment 2 SDSC5003 - Assignment 2 SDSC6012 - Assignment 1 SDSC5001 - Assignment 1 SDSC5002 - Assignment 1 SDSC5003 - Assignment 1 SDSC6007 - Assignment 1 SDSC6015 - Assignment 1 其他文件 总课表 作业清单 SDSC5001 Statistical Machine Learning I SDSC5001 课程信息 SDSC5001 课程 1-概率论与数理统计复习 SDSC5001 课程 2-数据探索 SDSC5001 课程 3-统计机器学习概述 SDSC5001 课程 4-线性回归 SDSC5002 Exploratory Data Analysis and Visualization SDSC5002 课程信息 SDSC5002 课程 2-EDA SDSC5003 S...
SDSC6015 - Question of Assignment 2
#assignment #sdsc6015
SDSC5003 - Assignment 2
#assignment #sdsc5003 题目链接 SDSC5003 - Question of Assignment 2 SDSC5003 - Assignment 2 Part 1: Relational Algebra (35 points) a. List the names and ages of employees who work in both the Hardware department and the Software department. (7 points) πename,age(Emp⋈eid(πeid(Works⋈didσdname=’Hardware’(Dept))∩πeid(Works⋈didσdname=’Software’(Dept))))\pi_{\text{ename}, \text{age}} \left( \text{Emp} \bowtie_{\text{eid}} \left( \pi_{\text{eid}} \left( \text{Works} \bowtie_{\text{did}} \sigma_{\text{dna...
SDSC5003 - Question of Assignment 2
#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 A2-XXXX-YYYY.zip where XXXX is your name and YYYY is your student ID. ...
SDSC6015 课程 5-镜像梯度下降与随机梯度下降
#sdsc6015 English / 中文 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,… ...
SDSC6012 - Assignment 1
#assignment #sdsc6012
SDSC6012 - Question of Assignment 2
#assignment #sdsc6012
SDSC6012 - Assignment 1
SDSC6012 - Assignment 1 #assignment #sdsc6012 Question 1 Trend Component Extraction (Moving Average Method) The trend component is extracted using the centered moving average method: 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 Where: kkk is the window size (here set to 12, corresponding to the annual cycle) m=⌊k/2⌋m = \lfloor k/2 \rfloorm=⌊k/2⌋ (half-window width for centered moving average) Boundary handling: when t<mt < mt&...
SDSC6007 - Assignment 2
SDSC6007 - Assignment 2 #assignment #sdsc6007 题目链接SDSC6007 - Question of Assignment 2
SDSC6007 - Question of Assignment 2
#assignment #sdsc6007
SDSC5001 Course 4-Linear Regression
#sdsc5001 English / 中文 Simple Linear Regression Basic Setup Given data (x1,y1),…,(xn,yn)\left(x_{1}, y_{1}\right),\ldots,\left(x_{n}, y_{n}\right)(x1,y1),…,(xn,yn), where: xi∈Rx_{i} \in \mathbb{R}xi∈R is the predictor variable (independent variable, input, feature) yi∈Ry_{i} \in \mathbb{R}yi∈R is the response variable (dependent variable, output, outcome) The regression function is expressed as: y=f(x)+εy = f(x) + \varepsilon y=f(x)+ε The linear regression model assumes: f(x)=β0+β...
SDSC5001 课程 4-线性回归
#sdsc5001 English / 中文 Simple Linear Regression 基本设定 给定数据 (x1,y1),…,(xn,yn)\left(x_{1}, y_{1}\right),\ldots,\left(x_{n}, y_{n}\right)(x1,y1),…,(xn,yn),其中: xi∈Rx_{i} \in \mathbb{R}xi∈R 是预测变量(自变量、输入、特征) yi∈Ry_{i} \in \mathbb{R}yi∈R 是响应变量(因变量、输出、结果) 回归函数表示为: y=f(x)+εy = f(x) + \varepsilon y=f(x)+ε 线性回归模型假设: f(x)=β0+β1xf(x) = \beta_0 + \beta_1 x f(x)=β0+β1x 这通常被视为对真实关系的近似。 示例(附件页码2):一个简单的玩具示例展示数据点和线性拟合关系。 最小二乘拟合 通过最小化残差平方和来估计参数: minβ0,β1∑i=1n(yi−(β0+β1xi))2\min_{\beta_0, \beta_1...
SDSC6007 课程 3-Tutorial与隐马尔可夫模型
#sdsc6007 English / 中文 Tutorial 1 问题设定 动态系统: xk+1=xk+uk+wkx_{k+1} = x_k + u_k + w_kxk+1=xk+uk+wk, k=0,1,2,3k = 0,1,2,3k=0,1,2,3 初始状态: x0=5x_0 = 5x0=5 成本函数: ∑k=03(xk2+uk2)\sum_{k=0}^{3}(x_k^2 + u_k^2)∑k=03(xk2+uk2) 状态空间: Sk={0,1,2,3,4,5}S_k = \{0,1,2,3,4,5\}Sk={0,1,2,3,4,5} 控制约束: Uk(xk)={u∣0≤xk+u≤5,u∈Z}U_k(x_k) = \{u | 0 \leq x_k + u \leq 5, u \in \mathbb{Z}\}Uk(xk)={u∣0≤xk+u≤5,u∈Z} 随机干扰: 如果 0<xk+uk<50 < x_k + u_k < 50<xk+uk<5: wk={−1概率121概率12w_k = ...
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...
