撒拉嘿哟


  • 首页

  • 归档

  • 标签

图形深度学习 ML BASICS(I)

发表于 2019-01-06

来自Siggraph

Machine Learning

机器学习是计算机科学的一个领域,这个领域使用统计学的方法让计算机系统使用数据去学习,而不是提前被设计好的。 'ml-define'

ML种类

  • 监督类
    • 分类问题
      • Digit Recognition
      • Spam Detection
      • Face detection
    • 回归问题
      • Human Face/Pose Estimation
      • Model Estimation
    • Data consolidation(数据合并??)
  • 非监督
    • 聚类(Clustering)
      • Group Points According to X 'clu'
      • Image Segmentation using NCuts 'clu'
    • 降维问题(Dimensionality Reduction)
      • 多种学习融合(Manifold Learning)
  • 弱监督/半监督
    • 一些数据采用监督, 一些数据非监督
  • 强化学习
    • Supervision: sparse reward for a sequence of decisions(监督:对一系列决策的稀疏奖励)

PS: Segmentation + Classification in Real Images

'se+clas' 评价标准: Confusion matrix, ROC curve, precision, recall, etc.


Learning a Function

$y = f_w(x)$, 其中$y$是预测(prediction);$f$是预测方法(method);$w$是参数(parameters);$x$是输入(input).

Learning a Linear Separator/Classifier

'linear' 'sh'

$y = f(w_1x_1 + w_2x_2) = \mathcal H(w_1x_1 + w_2x_2)$

其中$\mathcal H$fixed non-linearity 并且$w_1 ,w_2$是通过学习得到的。

Combining Simple Functions/Classifiers

'multi' 'multi'

Regression

1. Least Squares fitting

  • Assumption:Linear Function
\[y = f_\mathbf w(\mathbf x) = f(\mathbf x, \mathbf w) = \mathbf w^T\mathbf w \\ \mathbf w^T\mathbf w = \langle \mathbf w^T,\mathbf w \rangle = \sum_{d=1}^D \mathbf w_d \mathbf x_d \\ \bf x \in \mathbb R^D, \mathbf w \in \mathbb R_D\]
  • Reminder: Linear Classifier 'rs'

1.Sum of Square Errors (MSE without the mean)

$y^i = \mathbf w^T\mathbf x^i + \epsilon^i$

loss function:Sum of Square Errors

$L(\mathbf w) = \sum_{i=1}^N(\epsilon^i)^2$

展开: $L(w_0, w_2) = \sum_{i=1}^N[y_i - (w_0x^i_0 + w_1x^i_1)]^2$

2.Q : what is the best (or least bad) value of w?

$\bf y = \bf X\bf w + \bf \epsilon$

$L(\bf w) = \epsilon^T\epsilon$

$minmize L(\bf w)$

$L(\bf w) = (\bf y - \bf X\bf w)^T(\bf y - \bf X\bf w) = \mid\mid\bf y - \bf X\bf w\mid\mid^2$

$\nabla L = 2\bf X^T(y - Xw) = 0 \Rightarrow w^* = (X^TX)^{-1}X^Ty$
code

  • 超参数
    • 过拟合和未拟合 'hyper'
    • 调参 'tuning'
    • 交叉验证,选择合适的$\lambda$ 'cross'

2. Nonlinear error function and gradient descent

扩展#1:逻辑回归(Logistic Regression)

使用sigmoidal函数$g(\alpha) = \frac{1}{1 + exp(-\alpha)}$
'sq''duibi'

扩展#2:处理多个类别的分类问题

C个类别:one-of-c coding (or one-hot encoding)
矩阵记号: $\mathbf Y = \begin{bmatrix} \mathbf y^1 \ - \ .\ . \ - \ \mathbf y^2\end{bmatrix} = \begin{bmatrix} \mathbf y_1 \mid … \mid \mathbf y_{\mathbf c}\end{bmatrix}$,其中$\mathbf y_{\mathbf c}=\begin{bmatrix} y_1 \…\ y_c^N\end{bmatrix}$, $W = \begin{bmatrix} \bf w_1 \mid … \mid w_c\end{bmatrix}$
损失函数: $L(W) = \sum^C_{c=1}{(\bf y_c - Xw_c)^T(y_c - Xw_c)}$
Least squares fit: $\bf w_c^* = (X^TX)^{-1}X^Ty_c$

Logistic vs Linear Regression (n > 2 classes)

'img'

交叉熵的梯度
  • $L(\mathbf w) =-\sum_{i=1}^Ny^i\log g(\mathbf w^T \mathbf x^i) + (1-y^i)\log (1-g(\mathbf w^T\mathbf x^i))$
  • $\nabla L(\mathbf w^*) == 0$
  • initialize : $\mathbf x_0$
  • Update: $\mathbf x_{i+1} = x_{i} - \alpha \nabla f(\mathbf x_i)$
XOR 问题
  • code
  • 描述

3.感知训练(简单神经网络)

  • 'img'
    多层感知机
  • 输入向量
  • 隐藏层
  • 输出
阅读全文 »

图形深度学习Introduction

发表于 2019-01-05

CG

1. CG中的表达

  • 图片 像素
  • Volume(体) 体素
  • Meshes 点、边、面
  • 动画 骨骼、
  • 点云
  • 物理仿真

2. 计算机图形中的问题

  • Analysis
    • 特征检测(图形特征和point features): \(R^{m\times m} \to Z\)
    • 去躁,光滑。。。: $R^{m\times m} \to R^{m\times m}$
    • Embedding, Distance computation: $R^{m\times m, m\times m} \to R^d$
  • synthesis
    • 渲染: $R^{m\times m} \to R^{m\times m}$
    • 动画: $R^{3m \times t} \to R^{3m}$
    • 物理仿真: $R^{3m \times t} \to R^{3m}$
    • 产生模型: $R^d \to R^{m \times m}$

3. 目标:学会一个参数化函数

\[f_\theta : X \to Y\] \[\theta: 函数参数,X: `source\ domain`(源空间), Y: 目标空间, 这是需要学习到的\]

例子

  • 图形分类
\[f_\theta: R^{w\times h\times c} \to \{0, 1,2,..., k-1\}\] \[w\times h\times c: 图形的维度,长、宽、通道;k: 类别数\]
  • 图形合成

\(f_\theta: R^n \to R^{w\times h\times c}\) \(n: latent variable count;w\times h\times c:图形的维度,长、宽、通道\)

4. 数据驱动算法

  • 监督算法 12
  • 非监督算法 12

5. 端到端

学习特征

  • Old days:
    • 手动提取特征
    • 大多数使用线性模型(例如PCA)
  • Now:
    • 端对端
    • 避免使用手动标记表达形式 end-to-end end-to-end

      学习损失

  • Old days:
    • 最后再进行评估
    • 有一点可以选择
      • 你可能有一个很好的算法但是没有一个很好的方法去评估
      • 评估有助于发表文章(??)
  • Now:
    • 损失很重要并且是组成的重要部分
    • 如果损失不好那么你的结果也不好
    • (扩展)评估一般自动发生

Real/Generated Data

  • Old days
    • 在一些toy例子上进行测试
    • 部署在实际的物体上
    • 可能最后才收集到一些结果数据
  • Now:
    • Test and deploy need to be as identical (in distribution)
    • Need to collect data first
    • No two steps
阅读全文 »

1.1 PRML Introduction

发表于 2019-01-05

PRML

1.1 多项式曲线拟合

$\mathbf x = (x_1, x_2, x_3….,x_N)^T: 训练集,N为\mathbf x的观测值\ \mathbf t = (t_1, t_2, t_3….,t_N)^T: 对于\mathbf x的值$

多项式函数:$y(x, \mathbf w) = w_0 +w_1x +.. + w_Mx^M = \sum_{j=0}^Mw_jx^j$

损失函数:$E(\mathbf w) = \frac12\sum_{n=1}^N{y(x_n, \mathbf w) - t_n}^2$

平方根(RMS):$E_{RMS} = \sqrt{2E(\mathbf w^*)/N}$

通过贝叶斯方法可以避免过拟合。

正则化:$\overline E(\mathbf w)=\frac12\sum_{n=1}^N(y(x_n,\mathbf w) - t_n)^2+\frac\lambda2\mid\mid\mathbf w\mid\mid^2$

其中$\mid\mid\mathbf w\mid\mid^2 = \mathbf w^T \mathbf w = w_0^2 + w_1^2+…+w_M^2$ , $\lambda$控制

阅读全文 »

deep learning with python notes 数据表达

发表于 2019-01-05

CG

张量

三个属性

  • 轴的个数(阶) 例如3D张量有3个轴,n-D张量就有n个轴
  • 形状 表示沿每个轴的维度大小
  • 数据类型
阅读全文 »
1 … 4 5
dcl

dcl

blog

44 日志
13 分类
13 标签
RSS
© 2022 dcl
由 Jekyll 强力驱动
主题 - NexT.Muse