https://www.bilibili.com/video/BV164411S78V

线性回归(Linear Regression)与梯度下降(Gradient Descent)

记号

\(m\) = 训练样本数,\(n\) = 特征数,\(x\) = 输入变量/特征,\(y\) = 输出变量/目标变量

\((x, y)\) = 训练样本。第i个: \((x^{(i)},y^{(i)})\)

\(h_\theta(x)=\theta_0+\theta_1x_1+\theta_2x_2+...+\theta_nx_n\)

\(x_0\)\(1\),则\(h_\theta(x) = \sum_{i=0}^{n}\theta_ix_i=\theta^T x\)

\(Minimize_{\theta}\ \ J(\theta) = \frac{1}{2m} \sum_{i=1}^m(h_\theta(x^{(i)})-y^{(i)})^2\)

(最小二乘线性回归)

阅读全文 »

https://open.163.com/newview/movie/free?pid=IEU2H8NIJ&mid=VEU2H8NKA

Supervised Learning & Gradient Descent

Notation:

  • \(m\) = #training examples.
  • \(n\) = #features
  • \(x\) = input variables / features.
  • \(y\) = output variable / target variable
  • \((x, y)\) = training example
    • The i-th: \((x^{(i)},y^{(i)})\)
阅读全文 »

Makefile

  • Makefile三部分:目标、依赖、执行语句;
  • 递归执行:若不存在目标文件或目标文件修改时间早于依赖文件,则先产生对应依赖文件,再执行语句;
  • 所有.o文件均由对应.c文件生成,$<为第一个依赖文件,$@为目标,$^为所有不重复的依赖文件,以空格分开;
  • src = $(wildcard ./*.c)得到空格隔开的所有.c文件名;obj = $(patsubst %.c, %.o, $(src)) 代表将src中的所有.c替换成.o;obj = $(src: %.c=%.o) 能得到同样效果;
  • .PHONY代表clean为伪目标
阅读全文 »

外部文件:

.vimrc

基础配置

系统偏好正常设置即可。

super+shift+. 显示隐藏文件。

软件:搜狗输入法,Chrome,XCode,Parallel Desktop/Toolbox,LaTeX,ForkLift,The Unarchiver,Steam,Github Desktop,Clean One Pro,WPS,MS Office,Typora,qBittorrentClashX

阅读全文 »

本机配置

官网下载Node.js,换成淘宝源:

1
2
3
4
5
6
7
8
# 换成淘宝源(可能需要sudo su进入root模式):
npm install -g cnpm --registry==https://registry.npm.taobao.org
cnpm -v
cnpm install -g hexo-cli
mkdir Hexo && cd Hexo
hexo init
hexo s
# 此时可在http://localhost:4000/访问主页
阅读全文 »