This notebook builds the geometric and algebraic understanding of the determinant from first principles, culminating in why $\det(A) = 0$ is the exact condition for singularity. 1. The […]
How Non-Singular Matrices Act on Space
This notebook builds geometric intuition for matrix transformations, covering: 1. Active vs. Passive Interpretation Given a matrix $A$ and a vector $v$, the product $Av$ has two valid […]
Gradient Boosted Decision Trees (GBDT)
This notebook builds a complete understanding of GBDT from the ground up: 1. Decision Trees: The Weak Learner GBDT builds an ensemble of decision trees. Each tree partitions […]
Expected Prediction Error and the Regression Function
Source: Elements of Statistical Learning, Section 2.4 This notebook walks through the theoretical framework for supervised learning: why squared error loss is natural, what EPE is, and why […]
Derivation of the Least Squares Solution
This notebook derives the ordinary least squares (OLS) solution $\hat{x} = (A^\top A)^{-1} A^\top b$ from first principles using matrix algebra. 1. Problem Setup We want to solve […]
Persisting PostgreSQL data on host
Option A, host bind mount best for direct host access and backups Example(Linxu): Option B, Docker named volume best for Docker lifecycle management Example: Where data is stored […]
Transform2D
每个Object都有自己的坐标系统,把这个物体放在世界坐标系统后,对Object执行变换操作,本质上是在变换它的坐标系,而不是改变物体上的点线面的位置。 Transform2D的结构是这样的: $$\begin{bmatrix} basis.x.x & basis.y.x & origin.x \\ basis.x.y & basis.y.y & origin.y \end{bmatrix}$$ 如果我执行旋转操作的时候,本身是给某个点执行左乘旋转矩阵,旋转矩阵的长这样: $$R(θ) =\begin{bmatrix}\cosθ & -\sinθ \\\sinθ & \cosθ\end{bmatrix}$$ 入股哦我们有一个2D的点或者一个Vector: $$ v = \begin{bmatrix} […]
Django部署静态文件问题
登陆一个Django服务器的admin页面的时候出现如下错误: 主要原因是没有把admin的静态文件写入到domain/static对应的文件里 在setting.py中配置: 这里设置的STATIC_ROOT是服务器本地目录,生成的静态文件会放在这里面。执行如下命令: 执行完了,会生成一些静态文件,大概像这样: 配置Nginx: 重启一下nginx就可以了
Adding Swap Space on Ubuntu 24.04
source page: https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-22-04 We can see if the system has any configured swap by typing: If you don’t get back any output, this means your system does not […]
Step by Step实现RAG
RAG(Retrieval and generation)技术可以扩展大模型的知识库,用来回答我们特定问题,这里我们Step by Step 实现RAG技术。