From 9f4eb06abcb3648fb9f44088c1c42232e3989766 Mon Sep 17 00:00:00 2001 From: Haesun Park Date: Wed, 25 Apr 2018 22:43:39 +0900 Subject: [PATCH] =?UTF-8?q?5=EC=9E=A5=20=EC=88=98=EC=8B=9D=20=EB=B2=88?= =?UTF-8?q?=EC=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- book_equations.ipynb | 76 ++++++++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/book_equations.ipynb b/book_equations.ipynb index b2f65c1..5e75028 100644 --- a/book_equations.ipynb +++ b/book_equations.ipynb @@ -355,78 +355,78 @@ }, "cell_type": "markdown", "source": [ - "# Chapter 5\n", - "**Equation 5-1: Gaussian RBF**\n", + "# 5장\n", + "**식 5-1: 가우시안 RBF**\n", "\n", "$\n", "{\\displaystyle \\phi_{\\gamma}(\\mathbf{x}, \\mathbf{\\ell})} = {\\displaystyle \\exp({\\displaystyle -\\gamma \\left\\| \\mathbf{x} - \\mathbf{\\ell} \\right\\|^2})}\n", "$\n", "\n", "\n", - "**Equation 5-2: Linear SVM classifier prediction**\n", + "**식 5-2: 선형 SVM 분류기의 예측**\n", "\n", "$\n", "\\hat{y} = \\begin{cases}\n", - " 0 & \\text{if } \\mathbf{w}^T \\cdot \\mathbf{x} + b < 0, \\\\\n", - " 1 & \\text{if } \\mathbf{w}^T \\cdot \\mathbf{x} + b \\geq 0\n", + " 0 & \\mathbf{w}^T \\cdot \\mathbf{x} + b < 0 \\text{일 때 } \\\\\n", + " 1 & \\mathbf{w}^T \\cdot \\mathbf{x} + b \\geq 0 \\text{일 때 }\n", "\\end{cases}\n", "$\n", "\n", "\n", - "**Equation 5-3: Hard margin linear SVM classifier objective**\n", + "**식 5-3: 하드 마진 선형 SVM 분류기의 목적 함수**\n", "\n", "$\n", "\\begin{split}\n", - "&\\underset{\\mathbf{w}, b}{\\operatorname{minimize}}\\quad{\\frac{1}{2}\\mathbf{w}^T \\cdot \\mathbf{w}} \\\\\n", - "&\\text{subject to} \\quad t^{(i)}(\\mathbf{w}^T \\cdot \\mathbf{x}^{(i)} + b) \\ge 1 \\quad \\text{for } i = 1, 2, \\dots, m\n", + "&\\underset{\\mathbf{w}, b}{\\operatorname{minimize}}\\,{\\frac{1}{2}\\mathbf{w}^T \\cdot \\mathbf{w}} \\\\\n", + "&[\\text{조건}] \\, i = 1, 2, \\dots, m \\text{일 때} \\quad t^{(i)}(\\mathbf{w}^T \\cdot \\mathbf{x}^{(i)} + b) \\ge 1\n", "\\end{split}\n", "$\n", "\n", "\n", - "**Equation 5-4: Soft margin linear SVM classifier objective**\n", + "**식 5-4: 소프트 마진 선형 SVM 분류기의 목적 함수**\n", "\n", "$\n", "\\begin{split}\n", - "&\\underset{\\mathbf{w}, b, \\mathbf{\\zeta}}{\\operatorname{minimize}}\\quad{\\dfrac{1}{2}\\mathbf{w}^T \\cdot \\mathbf{w} + C \\sum\\limits_{i=1}^m{\\zeta^{(i)}}}\\\\\n", - "&\\text{subject to} \\quad t^{(i)}(\\mathbf{w}^T \\cdot \\mathbf{x}^{(i)} + b) \\ge 1 - \\zeta^{(i)} \\quad \\text{and} \\quad \\zeta^{(i)} \\ge 0 \\quad \\text{for } i = 1, 2, \\dots, m\n", + "&\\underset{\\mathbf{w}, b, \\mathbf{\\zeta}}{\\operatorname{minimize}}\\,{\\dfrac{1}{2}\\mathbf{w}^T \\cdot \\mathbf{w} + C \\sum\\limits_{i=1}^m{\\zeta^{(i)}}}\\\\\n", + "&[\\text{조건}] \\, i = 1, 2, \\dots, m \\text{일 때} \\quad t^{(i)}(\\mathbf{w}^T \\cdot \\mathbf{x}^{(i)} + b) \\ge 1 - \\zeta^{(i)} \\text{ 이고} \\quad \\zeta^{(i)} \\ge 0\n", "\\end{split}\n", "$\n", "\n", "\n", - "**Equation 5-5: Quadratic Programming problem**\n", + "**식 5-5: QP 문제**\n", "\n", "$\n", "\\begin{split}\n", - "\\underset{\\mathbf{p}}{\\text{Minimize}} \\quad & \\dfrac{1}{2} \\mathbf{p}^T \\cdot \\mathbf{H} \\cdot \\mathbf{p} \\quad + \\quad \\mathbf{f}^T \\cdot \\mathbf{p} \\\\\n", - "\\text{subject to} \\quad & \\mathbf{A} \\cdot \\mathbf{p} \\le \\mathbf{b} \\\\\n", - "\\text{where } &\n", + "\\underset{\\mathbf{p}}{\\text{minimize}} \\, & \\dfrac{1}{2} \\mathbf{p}^T \\cdot \\mathbf{H} \\cdot \\mathbf{p} \\, + \\, \\mathbf{f}^T \\cdot \\mathbf{p} \\\\\n", + "[\\text{조건}] \\, & \\mathbf{A} \\cdot \\mathbf{p} \\le \\mathbf{b} \\\\\n", + "\\text{여기서 } &\n", "\\begin{cases}\n", - " \\mathbf{p} & \\text{ is an }n_p\\text{-dimensional vector (} n_p = \\text{number of parameters),}\\\\\n", - " \\mathbf{H} & \\text{ is an }n_p \\times n_p \\text{ matrix,}\\\\\n", - " \\mathbf{f} & \\text{ is an }n_p\\text{-dimensional vector,}\\\\\n", - " \\mathbf{A} & \\text{ is an } n_c \\times n_p \\text{ matrix (}n_c = \\text{number of constraints),}\\\\\n", - " \\mathbf{b} & \\text{ is an }n_c\\text{-dimensional vector.}\n", + " \\mathbf{p} \\, \\text{는 }n_p\\text{ 차원의 벡터 (} n_p = \\text{모델 파라미터 수)}\\\\\n", + " \\mathbf{H} \\, \\text{는 }n_p \\times n_p \\text{ 크기 행렬}\\\\\n", + " \\mathbf{f} \\, \\text{는 }n_p\\text{ 차원의 벡터}\\\\\n", + " \\mathbf{A} \\, \\text{는 } n_c \\times n_p \\text{ 크기 행렬 (}n_c = \\text{제약 수)}\\\\\n", + " \\mathbf{b} \\, \\text{는 }n_c\\text{ 차원의 벡터}\n", "\\end{cases}\n", "\\end{split}\n", "$\n", "\n", "\n", - "**Equation 5-6: Dual form of the linear SVM objective**\n", + "**식 5-6: 선형 SVM 목적 함수의 쌍대 형식**\n", "\n", "$\n", "\\begin{split}\n", - "\\underset{\\mathbf{\\alpha}}{\\operatorname{minimize}}\n", + "&\\underset{\\mathbf{\\alpha}}{\\operatorname{minimize}} \\,\n", "\\dfrac{1}{2}\\sum\\limits_{i=1}^{m}{\n", " \\sum\\limits_{j=1}^{m}{\n", " \\alpha^{(i)} \\alpha^{(j)} t^{(i)} t^{(j)} {\\mathbf{x}^{(i)}}^T \\cdot \\mathbf{x}^{(j)}\n", " }\n", - "} \\quad - \\quad \\sum\\limits_{i=1}^{m}{\\alpha^{(i)}}\\\\\n", - "\\text{subject to}\\quad \\alpha^{(i)} \\ge 0 \\quad \\text{for }i = 1, 2, \\dots, m\n", + "} \\, - \\, \\sum\\limits_{i=1}^{m}{\\alpha^{(i)}}\\\\\n", + "&\\text{[조건]}\\,i = 1, 2, \\dots, m \\text{일 때 } \\quad \\alpha^{(i)} \\ge 0\n", "\\end{split}\n", "$\n", "\n", "\n", - "**Equation 5-7: From the dual solution to the primal solution**\n", + "**식 5-7: 쌍대 문제에서 구한 해로 원 문제의 해 계산하기**\n", "\n", "$\n", "\\begin{split}\n", @@ -436,7 +436,7 @@ "$\n", "\n", "\n", - "**Equation 5-8: Second-degree polynomial mapping**\n", + "**식 5-8: 2차 다항식 매핑**\n", "\n", "$\n", "\\phi\\left(\\mathbf{x}\\right) = \\phi\\left( \\begin{pmatrix}\n", @@ -450,7 +450,7 @@ "$\n", "\n", "\n", - "**Equation 5-9: Kernel trick for a 2^nd^-degree polynomial mapping**\n", + "**식 5-9: 2차 다항식 매핑을 위한 커널 트릭**\n", "\n", "$\n", "\\begin{split}\n", @@ -473,22 +473,22 @@ "\\end{split}\n", "$\n", "\n", - "**In the text about the kernel trick (page 162):**\n", - "[...], then you can replace this dot product of transformed vectors simply by $ ({\\mathbf{x}^{(i)}}^T \\cdot \\mathbf{x}^{(j)})^2 $\n", + "**커널 트릭에 관한 본문 중에서 (220 페이지):**\n", + "[...] 변환된 벡터의 점곱을 간단하게 $ ({\\mathbf{x}^{(i)}}^T \\cdot \\mathbf{x}^{(j)})^2 $ 으로 바꿀 수 있습니다.\n", "\n", "\n", - "**Equation 5-10: Common kernels**\n", + "**식 5-10: 일반적인 커널**\n", "\n", "$\n", "\\begin{split}\n", - "\\text{Linear:} & \\quad K(\\mathbf{a}, \\mathbf{b}) = \\mathbf{a}^T \\cdot \\mathbf{b} \\\\\n", - "\\text{Polynomial:} & \\quad K(\\mathbf{a}, \\mathbf{b}) = \\left(\\gamma \\mathbf{a}^T \\cdot \\mathbf{b} + r \\right)^d \\\\\n", - "\\text{Gaussian RBF:} & \\quad K(\\mathbf{a}, \\mathbf{b}) = \\exp({\\displaystyle -\\gamma \\left\\| \\mathbf{a} - \\mathbf{b} \\right\\|^2}) \\\\\n", - "\\text{Sigmoid:} & \\quad K(\\mathbf{a}, \\mathbf{b}) = \\tanh\\left(\\gamma \\mathbf{a}^T \\cdot \\mathbf{b} + r\\right)\n", + "\\text{선형:} & \\quad K(\\mathbf{a}, \\mathbf{b}) = \\mathbf{a}^T \\cdot \\mathbf{b} \\\\\n", + "\\text{다항식:} & \\quad K(\\mathbf{a}, \\mathbf{b}) = \\left(\\gamma \\mathbf{a}^T \\cdot \\mathbf{b} + r \\right)^d \\\\\n", + "\\text{가우시안 RBF:} & \\quad K(\\mathbf{a}, \\mathbf{b}) = \\exp({\\displaystyle -\\gamma \\left\\| \\mathbf{a} - \\mathbf{b} \\right\\|^2}) \\\\\n", + "\\text{시그모이드:} & \\quad K(\\mathbf{a}, \\mathbf{b}) = \\tanh\\left(\\gamma \\mathbf{a}^T \\cdot \\mathbf{b} + r\\right)\n", "\\end{split}\n", "$\n", "\n", - "**Equation 5-11: Making predictions with a kernelized SVM**\n", + "**식 5-11: 커널 SVM으로 예측하기**\n", "\n", "$\n", "\\begin{split}\n", @@ -499,7 +499,7 @@ "$\n", "\n", "\n", - "**Equation 5-12: Computing the bias term using the kernel trick**\n", + "**식 5-12: 커널 트릭을 사용한 편향 계산**\n", "\n", "$\n", "\\begin{split}\n", @@ -515,10 +515,10 @@ "$\n", "\n", "\n", - "**Equation 5-13: Linear SVM classifier cost function**\n", + "**식 5-13: 선형 SVM 분류기 비용 함수**\n", "\n", "$\n", - "J(\\mathbf{w}, b) = \\dfrac{1}{2} \\mathbf{w}^T \\cdot \\mathbf{w} \\quad + \\quad C {\\displaystyle \\sum\\limits_{i=1}^{m}max\\left(0, 1 - t^{(i)}(\\mathbf{w}^T \\cdot \\mathbf{x}^{(i)} + b) \\right)}\n", + "J(\\mathbf{w}, b) = \\dfrac{1}{2} \\mathbf{w}^T \\cdot \\mathbf{w} \\, + \\, C {\\displaystyle \\sum\\limits_{i=1}^{m}max\\left(0, 1 - t^{(i)}(\\mathbf{w}^T \\cdot \\mathbf{x}^{(i)} + b) \\right)}\n", "$\n", "\n", "\n"