blog 的目录

博客园自带目录

[TOC]

出现在随笔页面的开始处,可以帮你显示目录,而无需自己配置javascript,但对比下,和自己配置的略有不同,自定义的有 Back to the topGo to page bottom目录编号

用 javascript 自定义目录

自定义目录:页面定制CSS代码

<style type="text/css">
#cnblogs_post_body
{
color: black;
font: 0.875em/1.5em "微软雅黑" , "PTSans" , "Arial" ,sans-serif;
font-size: 16px;
}
#cnblogs_post_body h2 {
background: #2B6695;
border-radius: 6px 6px 6px 6px;
box-shadow: 0 0 0 1px #5F5A4B, 1px 1px 6px 1px rgba(10, 10, 0, 0.5);
color: #FFFFFF;
font-family: "微软雅黑" , "宋体" , "黑体" ,Arial;
font-size: 17px;
font-weight: bold;
height: 25px;
line-height: 25px;
margin: 18px 0 !important;
padding: 8px 0 5px 5px;
text-shadow: 2px 2px 3px #222222;
}
#cnblogs_post_body h3{
background: #2B6600;
border-radius: 6px 6px 6px 6px;
box-shadow: 0 0 0 1px #5F5A4B, 1px 1px 6px 1px rgba(10, 10, 0, 0.5);
color: #FFFFFF;
font-family: "微软雅黑" , "宋体" , "黑体" ,Arial;
font-size: 13px;
font-weight: bold;
height: 24px;
line-height: 23px;
margin: 12px 0 !important;
padding: 5px 0 5px 20px;
text-shadow: 2px 2px 3px #222222;
}
#cnblogs_post_body a {
color: #21759b;
transition-delay: 0s;
transition-duration: 0.4s;
transition-property: all;
transition-timing-function: linear;
}
#cnblogs_post_body a:hover{
margin-left: 10px
} #navCategory a{
display: block;
transition: all 1s; }
#navCategory a:hover{
margin-left: 10px
} #blog-sidecolumn a{
display: block;
transition:all 1s;
}
#blog-sidecolumn a:hover{
margin-left: 10px
} #sidebar_toptags li a{
float:left;
}
#TopViewPostsBlock li a{
margin-left: 5px;
}
#cnblogs_post_body a{
display: inline-block;
transition:all 1s;
}
</style>

自定义目录:页脚Html代码

<script language="javascript" type="text/javascript">
// Generate a directory index list
// ref: http://www.cnblogs.com/wangqiguo/p/4355032.html
// ref: https://www.cnblogs.com/xuehaoyue/p/6650533.html
// modified by: keyshaw
function GenerateContentList()
{
var mainContent = $('#cnblogs_post_body'); //If your chapter title isn't `h2`, You just replace the h2 here.
var h2_list = $('#cnblogs_post_body h2');
// var go_to_bottom = '<div style="text-align: right;"><a href="#_page_bottom" style="color:#f68a33">Go to page bottom</a></div>';
var bottom_label = '<div style="text-align: right;"><a href="#_labelTop" style="color:#f68a33">Back to the top</a><a name="_page_bottom"></a></div>' if(mainContent.length < 1)
return; if(h2_list.length>0)
{
var content = '<div style="text-align: right;"><a href="#_page_bottom" style="color:#f68a33">Go to page bottom</a></div><a name="_labelTop"></a>';
content += '<div id="navCategory" style="color:#152e97;">';
// coutent += '<div style="text-align: right;"><a href="#_page_bottom" style="color:#f68a33">Go to page bottom</a></div>'
content += '<h1 style="font-size:16px;background: #f68a33;border-radius: 6px 6px 6px 6px;box-shadow: 0 0 0 1px #5F5A4B, 1px 1px 6px 1px rgba(10, 10, 0, 0.5);color: #FFFFFF;font-size: 17px;font-weight: bold;height: 25px;line-height: 25px;margin: 18px 0 !important;padding: 8px 0 5px 30px;"><b>Catalogue</b></h1>';
// ol - ordered; ul - unordered
content += '<ol>';
for(var i=0; i<h2_list.length; i++)
{
// add 'Back to the top' before h2
var go_to_top_2 = '<div style="text-align: right;"><a href="#_labelTop" style="color:#f68a33">Back to the top</a><a name="_label' + i + '"></a></div>';
$(h2_list[i]).before(go_to_top_2); var h3_list = $(h2_list[i]).nextAll("h3"); var li3_content = '';
for(var j=0; j<h3_list.length; j++)
{ var tmp_3 = $(h3_list[j]).prevAll('h2').first();
if(!tmp_3.is(h2_list[i]))
break; var go_to_top_3 = '<div style="text-align: right;"><a href="#_labelTop" style="color:#f68a33">Back to the top</a><a name="_label' + i + '_' + j + '"></a></div>';
$(h3_list[j]).before(go_to_top_3); // li3_content += '<li><a href="#_label' + i + '_' + j + '"style="font-size:12px;color:#2b6695;">' + $(h3_list[j]).text() + '</a></li>'; var li4_content = '';
var h4_list = $(h3_list[j]).nextAll("h4");
for(var k=0; k<h4_list.length; k++)
{
var tmp_4 = $(h4_list[k]).prevAll('h3').first();
if(!tmp_4.is(h3_list[j]))
break; var go_to_top_4 = '<div style="text-align: right;"><a href="#_labelTop" style="color:#f68a33">Back to the top</a><a name="_label' + i + '_' + j + '_' + k + '"></a></div>';
$(h4_list[k]).before(go_to_top_4); li4_content += '<li><a href="#_label' + i + '_' + j + '_' + k + '"style="font-size:12px;color:#2b6695;">' + $(h4_list[k]).text() + '</a></li>';
} if(li4_content.length > 0)
li3_content += '<li><a href="#_label' + i + '_' + j + '"style="font-size:12px;color:#2b6695;">' + $(h3_list[j]).text() + '</a><ul>' + li4_content + '</ul></li>';
else
li3_content += '<li><a href="#_label' + i + '_' + j + '"style="font-size:12px;color:#2b6695;">' + $(h3_list[j]).text() + '</a></li>'; } var li2_content = '';
if(li3_content.length > 0)
li2_content = '<li><a href="#_label' + i + '"style="font-size:12px;color:#2b6695;">' + $(h2_list[i]).text() + '</a><ul>' + li3_content + '</ul></li>';
else
li2_content = '<li><a href="#_label' + i + '"style="font-size:12px;color:#2b6695;">' + $(h2_list[i]).text() + '</a></li>';
content += li2_content; }
content += '</ol>';
content += '</div><p>&nbsp;</p>';
content += '<hr />'; // $(mainContent[0]).prepend(go_to_bottom);
$(mainContent[0]).prepend(content);
$(mainContent[0]).append(bottom_label);
}
} GenerateContentList();
</script>
主标题
===

主标题

副标题
---

副标题

# h1,一级标题

h1,一级标题

## h2,二级标题

h2,二级标题

### h3,三级标题

h3,三级标题

#### h4,四级标题

h4,四级标题

##### h5,五级标题

h5,五级标题

###### h6,六级标题

h6,六级标题

注释

><space><space><enter>
这是一段注释
<space><space><enter>
**a** : 这是一段注释
<space><space><enter>
**b** : 这是一段注释

这是一段注释



a : 这是一段注释



b : 这是一段注释

>这是一段注释
**a** : 这是一段注释
**b** : 这是一段注释

这是一段注释

a : 这是一段注释

b : 这是一段注释

常用的符号及文本形式

$\underset{\sim}{A}$ : \(\underset{\sim}{Λ}\)

$\widehat{y}$ : \(\widehat{y}\)

<u>我被下划线了</u> : 我被下划线了

~~我被删除线了~~ : 我被删除线了

$\mathrm{d}a$ : \(\mathrm{d}a\)

$da$ : \(da\)

$( \big( \Big( \bigg( \Bigg($ : \(( \big( \Big( \bigg( \Bigg(\)

useful links for your LaTeX:

https://en.wikibooks.org/wiki/LaTeX/Mathematics

https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference

https://zh.numberempire.com/latexequationeditor.php

如果你想在markdown中文本缩进

&emsp;&emsp; here
&ensp;&ensp;&ensp;&ensp; here
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; here

   here

     here

         here

无序列表

<ul>
<li>无序列表1</li>
<li>无序列表2</li>
<li>无序列表3</li>
</ul>
  • 无序列表1
  • 无序列表2
  • 无序列表3
* 无序列表1
* 无序列表2
* 无序列表3
  • 无序列表1
  • 无序列表2
  • 无序列表3
+ 无序列表4
+ 无序列表5
+ 无序列表6
  • 无序列表4
  • 无序列表5
  • 无序列表6
- 无序列表7
- 无序列表8
- 无序列表9
  • 无序列表7
  • 无序列表8
  • 无序列表9
* 呆萌小二郎
* 23岁
* 前端工程师
喜欢看书,撸代码,写博客...
* 呆萌小二郎2
* 嘻嘻哈哈
* 开心
* 呆萌小二郎3
  • 呆萌小二郎

    • 23岁
    • 前端工程师

      喜欢看书,撸代码,写博客...
  • 呆萌小二郎2
    • 嘻嘻哈哈

      • 开心
  • 呆萌小二郎3

有序列表

<ol>
<li>有序列表1</li>
<li>有序列表2</li>
<li>有序列表3</li>
</ol>
  1. 有序列表1
  2. 有序列表2
  3. 有序列表3
1. 有序列表1
2. 有序列表2
3. 有序列表3
  1. 有序列表1
  2. 有序列表2
  3. 有序列表3
1. 有序列表1
1. 有序列表2
1. 有序列表3
  1. 有序列表1
  2. 有序列表2
  3. 有序列表3

连接跳转

[呆萌小二郎博客跳转链接](http://blog.zhouminghang.xyz)

呆萌小二郎博客跳转链接

度娘一下,你就知道: <http://www.baidu.com>

度娘一下,你就知道: http://www.baidu.com

<http://blog.zhouminghang.xyz>

http://blog.zhouminghang.xyz

插入图像

![xxx](https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1553421507058&di=5171700a9aefd5831ce01b6c0f341436&imgtype=0&src=http%3A%2F%2Fpic175.nipic.com%2Ffile%2F20180711%2F24144945_161350611036_2.jpg)

斜体,加粗,分割线

*斜体写法1* 和 _斜体写法2_

斜体写法1斜体写法2

**加粗写法1** 和 __加粗写法2__

加粗写法1加粗写法2

* * *


***


*****************


- - -


-----------------


---


单行和多行代码块

`单行代码`

单行代码

```

多行代码(

\这里用来转义符号,

类似于html中单双引号多层嵌套要转义

)

```

多行代码(
\这里用来转义符号,
类似于html中单双引号多层嵌套要转义
)

使用 \tag{n} 为公式添加编号

不使用 \begin{align}\end{align} 也可以为公式添加标号,可以使用 \tag{n}

$aaa \tag{1}$
$bbb \tag{2}$

\(aaa \tag{1}\)

\(bbb \tag{2}\)

markdown 的表格 和 LaTeX 中的空格

However, this doesn't give the correct result.

LaTeX doesn't respect the white-space left in the code to signify that the y and the dx are independent entities.

Instead, it lumps them altogether.

A \quad would clearly be overkill in this situation—what is needed are some small spaces to be utilized in this type of instance, and that's what LaTeX provides:

Command|Description|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Size
:---|---|---:
\\,|small space|3/18 of a quad
\\:|medium space|4/18 of a quad
\\;|large space|5/18 of a quad
\\!|negative space|-3/18 of a quad
Command Description         Size
\, small space 3/18 of a quad
\: medium space 4/18 of a quad
\; large space 5/18 of a quad
\! negative space -3/18 of a quad
**Expected Output**:
<table style="width:100%">
<tr>
<td> **sigmoid_derivative([1,2,3])**</td>
<td> [ 0.19661193 0.10499359 0.04517666] </td>
</tr>
</table>

Expected Output:

**sigmoid_derivative([1,2,3])** [ 0.19661193 0.10499359 0.04517666]

例子汇总

$$
\begin{align}
& \underset{w,b}{\mathrm{max}} \;\; \underset{i}{\mathrm{min}} \;\; \frac{2}{||w||} | w^{\top} x_i + b |, \\
& \mathrm{s.t.} \;\;y_i(w^{\top}x_i + b) > 0, \; i = 1,2,...,m. \nonumber
\end{align}
$$

\[\begin{align}
& \underset{w,b}{\mathrm{max}} \;\; \underset{i}{\mathrm{min}} \;\; \frac{2}{||w||} | w^{\top} x_i + b |, \\
& \mathrm{s.t.} \;\;y_i(w^{\top}x_i + b) > 0, \; i = 1,2,...,m. \nonumber
\end{align}
\]


$$
\begin{align}
h(x_i)=
\begin{cases}
1 & \text{若 }y_i=1; \\
-1 & \text{若 }y_i=-1. \\
\end{cases}
\end{align}
$$

\(\begin{align}h(x_i)=\begin{cases} 1 & \text{若 }y_i=1; \\ -1 & \text{若 }y_i=-1. \\\end{cases}\end{align}\)


$$
\begin{align}
h(x_i) := \mathrm{sign}(w^T x_i + b), \text{ 其中 } w_i \in \mathbb{R}^d,b \in \mathbb{R}.
\end{align}
$$

\(\begin{align}h(x_i) := \mathrm{sign}(w^T x_i + b), \text{ 其中 } w_i \in \mathbb{R}^d,b \in \mathbb{R}.\end{align}\)


$$
\begin{align}
\forall_{i.} \;\; y_i(w^T x_i + b) > 0
\end{align}
$$

\(\begin{align} \forall_{i.} \;\; y_i(w^T x_i + b) > 0 \end{align}\)


$$
\begin{align}
y_i h(x_i) = 1 \Leftrightarrow y_i \mathrm{sign}(w^T x_i + b) = 1 \Leftrightarrow y_i(w^T x_i + b) > 0
\end{align}
$$

\(\begin{align} y_i h(x_i) = 1 \Leftrightarrow y_i \mathrm{sign}(w^T x_i + b) = 1 \Leftrightarrow y_i(w^T x_i + b) > 0 \end{align}\)


$$
\begin{align}
\frac{1}{||w||} | w^{\top} p + b |
\end{align}
$$

\(\begin{align} \frac{1}{||w||} | w^{\top} p + b |\end{align}\)


$$
\begin{align}
w^{\top}(x_1-x_2) = w^{\top}x_1-w^{\top}x_2=(-b)-(-b)=0,
\end{align}
$$

\(\begin{align} w^{\top}(x_1-x_2) = w^{\top}x_1-w^{\top}x_2=(-b)-(-b)=0,\end{align}\)


\(w \perp (x_1 - x_2)\)


$$
\begin{align}
\mathrm{proj}_w(p-x)
&= ||p-x|| \cdot |\cos (w, p - x)| \nonumber\\
&= ||p-x|| \cdot \frac{|w^{\top}(p-x)|}{||w|| \cdot ||p-x||} \nonumber \\
&= \frac{1}{||w||} |w^{\top}p - w^{\top}x| \nonumber \\
&= \frac{1}{||w||} | w^{\top}p + b |
\end{align}
$$

\(\begin{align} \mathrm{proj}_w(p-x) &= ||p-x|| \cdot |\cos (w, p - x)| \nonumber\\ &= ||p-x|| \cdot \frac{|w^{\top}(p-x)|}{||w|| \cdot ||p-x||} \nonumber \\ &= \frac{1}{||w||} |w^{\top}p - w^{\top}x| \nonumber \\ &= \frac{1}{||w||} | w^{\top}p + b | \end{align}\)


$$
\gamma := 2 \; \underset{i}{\mathrm{min}} \frac{1}{||w||} | w^{\top} x_i + b |
$$

\(\gamma := 2 \; \underset{i}{\mathrm{min}} \frac{1}{||w||} | w^{\top} x_i + b |\)


$$
\begin{align}
& \underset{u}{\mathrm{min}} \;\; \frac{1}{2} u^{\top}Qu+t^{\top}u \\
& \mathrm{s.t.} \;\; c_i^{\top} u \geq d_i, \; i = 1,2,...,m. \nonumber
\end{align}
$$

\[\begin{align}
& \underset{u}{\mathrm{min}} \;\; \frac{1}{2} u^{\top}Qu+t^{\top}u \\
& \mathrm{s.t.} \;\; c_i^{\top} u \geq d_i, \; i = 1,2,...,m. \nonumber
\end{align}
\]


$$
\begin{align}
& \underset{u}{\mathrm{min}} \;\; \frac{1}{2} u^{\top}Qu+t^{\top}u \\
& \mathrm{s.t.} \;\; c_i^{\top} u \geq d_i, \; i = 1,2,...,m. \nonumber
\end{align}
$$

\[\begin{align}
& \underset{u}{\mathrm{min}} \;\; \frac{1}{2} u^{\top}Qu+t^{\top}u \\
& \mathrm{s.t.} \;\; c_i^{\top} u \geq d_i, \; i = 1,2,...,m. \nonumber
\end{align}
\]


$$
\begin{align}
\frac{2}{||rw^*||} | (rw^*)^{\top} x_i + rb^* | = \frac{2}{||w^*||} | w^{*\top} x_i + b^* |, \\
y_i \big( (rw^*)^{\top} x_i + rb^* \big) > 0 \Leftrightarrow y_i (w^{*\top} x_i + b^*)>0.
\end{align}
$$

\[\begin{align}
\frac{2}{||rw^*||} | (rw^*)^{\top} x_i + rb^* | = \frac{2}{||w^*||} | w^{*\top} x_i + b^* |, \\
y_i \big( (rw^*)^{\top} x_i + rb^* \big) > 0 \Leftrightarrow y_i (w^{*\top} x_i + b^*)>0.
\end{align}
\]


$$
\begin{align}
\underset{i}{\mathrm{min}} \; | w^{\top} x_i + b | = 1.
\end{align}
$$

\[\begin{align}
\underset{i}{\mathrm{min}} \; | w^{\top} x_i + b | = 1.
\end{align}
\]


$$
\begin{align}
& \underset{w, b}{\mathrm{min}} \;\; \frac{1}{2} w^{\top} w \\
& \mathrm{s.t.} \;\; y_i (w^{\top} x_i +b ) \geq 1, \; i = 1,2,...,m. \nonumber
\end{align}
$$

\[\begin{align}
& \underset{w, b}{\mathrm{min}} \;\; \frac{1}{2} w^{\top} w \\
& \mathrm{s.t.} \;\; y_i (w^{\top} x_i +b ) \geq 1, \; i = 1,2,...,m. \nonumber
\end{align}
\]


$$
\begin{align}
& \underset{w, b}{\mathrm{min}} \;\; \frac{1}{2} w^{\top} w \\
& \mathrm{s.t.} \;\; \underset{i}{\mathrm{min}} \;\; y_i (w^{\top} x_i +b ) = 1. \nonumber
\end{align}
$$

\[\begin{align}
& \underset{w, b}{\mathrm{min}} \;\; \frac{1}{2} w^{\top} w \\
& \mathrm{s.t.} \;\; \underset{i}{\mathrm{min}} \;\; y_i (w^{\top} x_i +b ) = 1. \nonumber
\end{align}
\]


$$
\begin{align}
\underset{w, b}{\mathrm{argmin}} \;\; \frac{1}{2} w^{\top} w
& = \underset{w, b}{\mathrm{argmin}} \;\; \frac{1}{2} ||w|| \nonumber\\
& = \underset{w, b}{\mathrm{argmax}} \;\; \frac{2}{||w||} \cdot 1 \nonumber\\
& = \underset{w, b}{\mathrm{argmax}} \;\; \Big( \underset{i}{\mathrm{min}} \; \frac{2}{||w||} y_i (w^{\top} x_i + b) \Big) \nonumber\\
& = \underset{w, b}{\mathrm{argmax}} \;\; \Big( \underset{i}{\mathrm{min}} \; \frac{2}{||w||} |w^{\top} x_i + b| \Big)
\end{align}
$$

\[\begin{align}
\underset{w, b}{\mathrm{argmin}} \;\; \frac{1}{2} w^{\top} w
& = \underset{w, b}{\mathrm{argmin}} \;\; \frac{1}{2} ||w|| \nonumber\\
& = \underset{w, b}{\mathrm{argmax}} \;\; \frac{2}{||w||} \cdot 1 \nonumber\\
& = \underset{w, b}{\mathrm{argmax}} \;\; \Big( \underset{i}{\mathrm{min}} \; \frac{2}{||w||} y_i (w^{\top} x_i + b) \Big) \nonumber\\
& = \underset{w, b}{\mathrm{argmax}} \;\; \Big( \underset{i}{\mathrm{min}} \; \frac{2}{||w||} |w^{\top} x_i + b| \Big)
\end{align}
\]


$$
\begin{align}
u := \begin{bmatrix} w \\ b \end{bmatrix}, Q := \begin{bmatrix} I&0\\0&0 \end{bmatrix}, t := 0, \\
c_i := y_i \begin{bmatrix} x_i \\ 1 \end{bmatrix}, d_i := 1,
\end{align}
$$

\[\begin{align}
u := \begin{bmatrix} w \\ b \end{bmatrix}, Q := \begin{bmatrix} I&0\\0&0 \end{bmatrix}, t := 0, \\
c_i := y_i \begin{bmatrix} x_i \\ 1 \end{bmatrix}, d_i := 1,
\end{align}
\]


$$
\begin{align}
\underset{u}{\mathrm{min}} &\;\; f(u) &\\
\mathrm{s.t.} &\;\; g_i (u) \leq 0, &i = 1,2,...,m, \nonumber\\
& \;\; h_j (u) = 0, &j = 1,2,...,n, \nonumber
\end{align}
$$

\[\begin{align}
\underset{u}{\mathrm{min}} &\;\; f(u) &\\
\mathrm{s.t.} &\;\; g_i (u) \leq 0, &i = 1,2,...,m, \nonumber\\
& \;\; h_j (u) = 0, &j = 1,2,...,n, \nonumber
\end{align}
\]


$$
\begin{align}
\mathcal{L}(u,\alpha,\beta) := f(u) + \sum\limits_{i=1}^{m} \alpha_i g_i (u) + \sum\limits_{j=1}^{n} \beta_j h_j (u)
\end{align}
$$

\[\begin{align}
\mathcal{L}(u,\alpha,\beta) := f(u) + \sum\limits_{i=1}^{m} \alpha_i g_i (u) + \sum\limits_{j=1}^{n} \beta_j h_j (u)
\end{align}
\]


$$
\begin{align}
\underset{u}{\mathrm{min}} \;\; \underset{\alpha, \beta}{\mathrm{max}} \;\;& \mathcal{L} (u, \alpha, \beta) \\
\mathrm{s.t.} \;\;\;\;\;\;& \alpha_i \geq 0, \;\; i = 1,2,...,m. \nonumber
\end{align}
$$

\[\begin{align}
\underset{u}{\mathrm{min}} \;\; \underset{\alpha, \beta}{\mathrm{max}} \;\;& \mathcal{L} (u, \alpha, \beta) \\
\mathrm{s.t.} \;\;\;\;\;\;& \alpha_i \geq 0, \;\; i = 1,2,...,m. \nonumber
\end{align}
\]


$$
\begin{align}
& \underset{u}{\mathrm{min}} \;\; \underset{\alpha, \beta}{\mathrm{max}} \;\; \mathcal{L} (u, \alpha, \beta) \nonumber \\
= & \underset{u}{\mathrm{min}} \Bigg( f(u) + \underset{\alpha, \beta}{\mathrm{max}} \Big( \sum\limits_{i=1}^{m} \alpha_i g_i (u) + \sum\limits_{j=1}^{n} \beta_j h_j (u) \Big)\Bigg) \nonumber \\
= & \underset{u}{\mathrm{min}} \Bigg( f(u) + \begin{cases} 0 & \text{若 } u \text{ 满足约束;} \\ \infty & \text{否则} \end{cases} \Bigg) \nonumber \\
= & \underset{u}{\mathrm{min}} \; f(u), \text{ 且 } u \text{ 满足约束,}
\end{align}
$$

\[\begin{align}
& \underset{u}{\mathrm{min}} \;\; \underset{\alpha, \beta}{\mathrm{max}} \;\; \mathcal{L} (u, \alpha, \beta) \nonumber \\
= & \underset{u}{\mathrm{min}} \Bigg( f(u) + \underset{\alpha, \beta}{\mathrm{max}} \Big( \sum\limits_{i=1}^{m} \alpha_i g_i (u) + \sum\limits_{j=1}^{n} \beta_j h_j (u) \Big)\Bigg) \nonumber \\
= & \underset{u}{\mathrm{min}} \Bigg( f(u) + \begin{cases} 0 & \text{若 } u \text{ 满足约束;} \\ \infty & \text{否则} \end{cases} \Bigg) \nonumber \\
= & \underset{u}{\mathrm{min}} \; f(u), \text{ 且 } u \text{ 满足约束,}
\end{align}
\]


$$
\begin{align}
\underset{\alpha, \beta}{\mathrm{max}} \;\; \underset{u}{\mathrm{min}} \;\;& \mathcal{L} (u, \alpha, \beta) \\
\mathrm{s.t.} \;\;\;\;\;\;& \alpha_i \geq 0, \;\; i = 1,2,...,m. \nonumber
\end{align}
$$

\[\begin{align}
\underset{\alpha, \beta}{\mathrm{max}} \;\; \underset{u}{\mathrm{min}} \;\;& \mathcal{L} (u, \alpha, \beta) \\
\mathrm{s.t.} \;\;\;\;\;\;& \alpha_i \geq 0, \;\; i = 1,2,...,m. \nonumber
\end{align}
\]


$$
\begin{align}
\underset{\alpha, \beta}{\mathrm{max}} \;\; \underset{u}{\mathrm{min}} \;\; \mathcal{L} (u, \alpha, \beta) \;\; \leq \;\; \underset{u}{\mathrm{min}} \;\; \underset{\alpha, \beta}{\mathrm{max}} \;\; \mathcal{L} (u, \alpha, \beta)
\end{align}
$$

\[\begin{align}
\underset{\alpha, \beta}{\mathrm{max}} \;\; \underset{u}{\mathrm{min}} \;\; \mathcal{L} (u, \alpha, \beta) \;\; \leq \;\; \underset{u}{\mathrm{min}} \;\; \underset{\alpha, \beta}{\mathrm{max}} \;\; \mathcal{L} (u, \alpha, \beta)
\end{align}
\]


$$
\begin{align}
\mathcal{L}(w,b,\alpha) := \frac{1}{2}w^{\top}w + \sum\limits_{i=1}^{m}\alpha_i \big(1-
y_i (w^{\top} x_i + b) \big)
\end{align}
$$

\[\begin{align}
\mathcal{L}(w,b,\alpha) := \frac{1}{2}w^{\top}w + \sum\limits_{i=1}^{m}\alpha_i \big(1-
y_i (w^{\top} x_i + b) \big)
\end{align}
\]


$$
\begin{align}
\underset{\alpha}{\mathrm{max}} \; \underset{w,b}{\mathrm{min}} \; & \frac{1}{2}w^{\top}w + \sum\limits_{i=1}^{m}\alpha_i \big(1- y_i (w^{\top} x_i + b) \big) \\
\mathrm{s.t.} \;\;\;\;\;\; & \alpha_i \geq 0, \; i = 1,2,...,m. \nonumber
\end{align}
$$

\[\begin{align}
\underset{\alpha}{\mathrm{max}} \; \underset{w,b}{\mathrm{min}} \; & \frac{1}{2}w^{\top}w + \sum\limits_{i=1}^{m}\alpha_i \big(1- y_i (w^{\top} x_i + b) \big) \\
\mathrm{s.t.} \;\;\;\;\;\; & \alpha_i \geq 0, \; i = 1,2,...,m. \nonumber
\end{align}
\]


$$
\begin{align}
\underset{\alpha}{\mathrm{min}} \;\; & \frac{1}{2} \sum\limits_{i=1}^{m} \sum\limits_{j=1}^{m} \alpha_i \alpha_j y_i y_j x_i^{\top} x_j - \sum\limits_{i=1}^{m}\alpha_i \\
\mathrm{s.t.} \;\;\; & \sum\limits_{i=1}^{m} \alpha_i y_i = 0, \nonumber \\
& \alpha_i \geq 0, \; i = 1,2,...,m. \nonumber
\end{align}
$$

\[\begin{align}
\underset{\alpha}{\mathrm{min}} \;\; & \frac{1}{2} \sum\limits_{i=1}^{m} \sum\limits_{j=1}^{m} \alpha_i \alpha_j y_i y_j x_i^{\top} x_j - \sum\limits_{i=1}^{m}\alpha_i \\
\mathrm{s.t.} \;\;\; & \sum\limits_{i=1}^{m} \alpha_i y_i = 0, \nonumber \\
& \alpha_i \geq 0, \; i = 1,2,...,m. \nonumber
\end{align}
\]


$$
\begin{align}
\frac{\partial \mathcal{L}}{\partial w} = 0 \Leftrightarrow & w = \sum\limits_{i=1}^{m} \alpha_i y_i x_i, \\
\frac{\partial \mathcal{L}}{\partial b} = 0 \Leftrightarrow & \sum\limits_{i=1}^{m} \alpha_i y_i.
\end{align}
$$

\[\begin{align}
\frac{\partial \mathcal{L}}{\partial w} = 0 \Leftrightarrow & w = \sum\limits_{i=1}^{m} \alpha_i y_i x_i, \\
\frac{\partial \mathcal{L}}{\partial b} = 0 \Leftrightarrow & \sum\limits_{i=1}^{m} \alpha_i y_i.
\end{align}
\]


$$
\begin{align}
& u:=\alpha,\;\mathcal{Q}:=[y_i y_j x_i^{\top} x_j]_{m \times m},\;t:=-1,\\
& c_i:=e_i,\;d_i:=0,\; i=1,2,...,m,\\
& c_{m+1}:=[y_1\;y_2\; \cdots \; y_m]^{\top} , \; d_{m+1}:=0,\\
& c_{m+2}:=-[y_1\;y_2\; \cdots \; y_m]^{\top}, \; d_{m+2}:=0,
\end{align}
$$

\[\begin{align}
& u:=\alpha,\;\mathcal{Q}:=[y_i y_j x_i^{\top} x_j]_{m \times m},\;t:=-1,\\
& c_i:=e_i,\;d_i:=0,\; i=1,2,...,m,\\
& c_{m+1}:=[y_1\;y_2\; \cdots \; y_m]^{\top} , \; d_{m+1}:=0,\\
& c_{m+2}:=-[y_1\;y_2\; \cdots \; y_m]^{\top}, \; d_{m+2}:=0,
\end{align}
\]


$$
\begin{align}
u:=\begin{bmatrix} w \\ b \end{bmatrix}, \;\; g_i(u):= 1-y_i {\begin{bmatrix} x_i \\ 1 \end{bmatrix}}^{\top} u,
\end{align}
$$

\[\begin{align}
u:=\begin{bmatrix} w \\ b \end{bmatrix}, \;\; g_i(u):= 1-y_i {\begin{bmatrix} x_i \\ 1 \end{bmatrix}}^{\top} u,
\end{align}
\]


$$
\begin{align}
w = & \sum\limits_{i=1}^{m}\alpha_i y_i x_i \nonumber \\
= & \sum\limits_{i:\;\alpha_i = 0}^{m} 0 \cdot y_i x_i + \sum\limits_{i:\;\alpha_i>0}^{m}\alpha_i y_i x_i \nonumber \\
= & \sum\limits_{i \in SV}^{}\alpha_i y_i x_i,
\end{align}
$$

\[\begin{align}
w = & \sum\limits_{i=1}^{m}\alpha_i y_i x_i \nonumber \\
= & \sum\limits_{i:\;\alpha_i = 0}^{m} 0 \cdot y_i x_i + \sum\limits_{i:\;\alpha_i>0}^{m}\alpha_i y_i x_i \nonumber \\
= & \sum\limits_{i \in SV}^{}\alpha_i y_i x_i,
\end{align}
\]


$$
\begin{align}
& y_s(w^{\top} x_s + b) = 1, \text{ 则} \nonumber \\
& b = y_s - w^{\top} x_s = y_s - \sum\limits_{i \in SV} \alpha_i y_i x_i^{\top} x_s.
\end{align}
$$

\[\begin{align}
& y_s(w^{\top} x_s + b) = 1, \text{ 则} \nonumber \\
& b = y_s - w^{\top} x_s = y_s - \sum\limits_{i \in SV} \alpha_i y_i x_i^{\top} x_s.
\end{align}
\]


$$
\begin{align}
h(x) = \mathrm{sign} \Big( \sum\limits_{i \in SV} \alpha_i y_i x_i^{\top} x + b \Big).
\end{align}
$$

\[\begin{align}
h(x) = \mathrm{sign} \Big( \sum\limits_{i \in SV} \alpha_i y_i x_i^{\top} x + b \Big).
\end{align}
\]


$$
\begin{align}
\underset{w,b}{\mathrm{min}} \;\; & \frac{1}{2} w^{\top} w \\
\mathrm{s.t.} \;\; & y_i(w^{\top}\phi(x_i) + b)\geq1,\;i=1,2,...,m; \nonumber \\ \nonumber \\ \nonumber \\
\underset{\alpha}{\mathrm{min}} \;\; & \frac{1}{2} \sum\limits_{i=1}^{m}\sum\limits_{j=1}^{m}\alpha_i\alpha_jy_iy_j\phi(x_i)^{\top}\phi(x_j)-\sum\limits_{i=1}^{m}\alpha_i \\
\mathrm{s.t.} \;\; & \sum\limits_{i=1}^{m}\alpha_iy_i = 0, \nonumber \\
&\alpha_i \geq 0, \; i=1,2,...,m. \nonumber
\end{align}
$$

\[\begin{align}
\underset{w,b}{\mathrm{min}} \;\; & \frac{1}{2} w^{\top} w \\
\mathrm{s.t.} \;\; & y_i(w^{\top}\phi(x_i) + b)\geq1,\;i=1,2,...,m; \nonumber \\ \nonumber \\ \nonumber \\
\underset{\alpha}{\mathrm{min}} \;\; & \frac{1}{2} \sum\limits_{i=1}^{m}\sum\limits_{j=1}^{m}\alpha_i\alpha_jy_iy_j\phi(x_i)^{\top}\phi(x_j)-\sum\limits_{i=1}^{m}\alpha_i \\
\mathrm{s.t.} \;\; & \sum\limits_{i=1}^{m}\alpha_iy_i = 0, \nonumber \\
&\alpha_i \geq 0, \; i=1,2,...,m. \nonumber
\end{align}
\]


$\begin{align}\kappa(x_i, x_j)=\phi (x_i)^T \phi (x_j),\end{align}$

\(\begin{align}\kappa(x_i, x_j)=\phi (x_i)^T \phi (x_j),\end{align}\)


$$
\begin{align}
\phi : x \mapsto exp(-x^2) \begin{bmatrix} 1\\ \sqrt{\frac{2}{1}}x \\ \sqrt{\frac{2^2}{2!}}x^2 \\ \vdots \end{bmatrix}
\end{align}
$$

\[\begin{align}
\phi : x \mapsto exp(-x^2) \begin{bmatrix} 1\\ \sqrt{\frac{2}{1}}x \\ \sqrt{\frac{2^2}{2!}}x^2 \\ \vdots \end{bmatrix}
\end{align}
\]


$$
\begin{align}
\kappa(x_i,x_j):=exp\Big(-(x_i - x_j)^2\Big).
\end{align}
$$

\[\begin{align}
\kappa(x_i,x_j):=exp\Big(-(x_i - x_j)^2\Big).
\end{align}
\]


$$
\begin{align}
\kappa(x_i,x_j)
&= exp\Big(-(x_i - x_j)^2\Big) \nonumber \\
&= exp(-x_i^2)exp(-x_j^2)exp(2x_ix_j) \nonumber \\
&= exp(-x_i^2)exp(-x_j^2)\sum\limits_{k=0}^{\infty}\frac{(2x_ix_j)^k}{k!} \nonumber \\
&= \sum\limits_{k=0}^{\infty}\Bigg(exp(-x_i^2)\sqrt{\frac{2^k}{k!}}x_i^k\Bigg)\Bigg(exp(-x_j^2)\sqrt{\frac{2^k}{k!}}x_j^k\Bigg) \nonumber \\
&= \phi(x_i)^{\top}\phi(x_j).
\end{align}
$$

\[\begin{align}
\kappa(x_i,x_j)
&= exp\Big(-(x_i - x_j)^2\Big) \nonumber \\
&= exp(-x_i^2)exp(-x_j^2)exp(2x_ix_j) \nonumber \\
&= exp(-x_i^2)exp(-x_j^2)\sum\limits_{k=0}^{\infty}\frac{(2x_ix_j)^k}{k!} \nonumber \\
&= \sum\limits_{k=0}^{\infty}\Bigg(exp(-x_i^2)\sqrt{\frac{2^k}{k!}}x_i^k\Bigg)\Bigg(exp(-x_j^2)\sqrt{\frac{2^k}{k!}}x_j^k\Bigg) \nonumber \\
&= \phi(x_i)^{\top}\phi(x_j).
\end{align}
\]


$$
\begin{align}
K := [\kappa(x_i,x_j)]_{m \times m}
\end{align}
$$

\[\begin{align}
K := [\kappa(x_i,x_j)]_{m \times m}
\end{align}
\]


$$
\begin{align}
\Phi:=[\phi(x_1)\;\phi(x_2)\;\ldots\;\phi(x_m)] \in \mathbb{R}^{\tilde{d} \times m},
\end{align}
$$

\[\begin{align}
\Phi:=[\phi(x_1)\;\phi(x_2)\;\ldots\;\phi(x_m)] \in \mathbb{R}^{\tilde{d} \times m},
\end{align}
\]


$$
\begin{align}
c_1 \kappa_1(x_i,x_j)+c_2 \kappa_2 (x_i,x_j) = {\begin{bmatrix} \sqrt{c_1}\phi_1(x_i) \\ \sqrt{c_2}\phi_2(x_i) \end{bmatrix}}^{\top} \begin{bmatrix} \sqrt{c_1}\phi_1(x_i) \\ \sqrt{c_2}\phi_2(x_i) \end{bmatrix}\\
\kappa_1(x_i,x_j)\kappa_2(x_i,x_j)=\mathrm{vec}\big(\phi_1(x_i)\phi_2(x_i)^{\top}\big)^{\top}\mathrm{vec}\big(\phi_1(x_j)\phi_2(x_j)^{\top}\big)^{\top},\\
f(x_1)\kappa_1(x_i,x_j)f(x_2)=\big(f(x_i)\phi(x_i)^{\top}\big)^{\top}\big(f(x_j)\phi(x_j)\big).
\end{align}
$$

\[\begin{align}
c_1 \kappa_1(x_i,x_j)+c_2 \kappa_2 (x_i,x_j) = {\begin{bmatrix} \sqrt{c_1}\phi_1(x_i) \\ \sqrt{c_2}\phi_2(x_i) \end{bmatrix}}^{\top} \begin{bmatrix} \sqrt{c_1}\phi_1(x_i) \\ \sqrt{c_2}\phi_2(x_i) \end{bmatrix}\\
\kappa_1(x_i,x_j)\kappa_2(x_i,x_j)=\mathrm{vec}\big(\phi_1(x_i)\phi_2(x_i)^{\top}\big)^{\top}\mathrm{vec}\big(\phi_1(x_j)\phi_2(x_j)^{\top}\big)^{\top},\\
f(x_1)\kappa_1(x_i,x_j)f(x_2)=\big(f(x_i)\phi(x_i)^{\top}\big)^{\top}\big(f(x_j)\phi(x_j)\big).
\end{align}
\]


$m+\tilde{d}+1$

\(m+\tilde{d}+1\)


$$
\overbrace{
\left[ \begin{array}{c} ...W^{[1]T}{1}...\ ...W^{[1]T}{2}...\ ...W^{[1]T}{3}...\ ...W^{[1]T}{4}... \end{array} \right]
}^{W^{[1]}}
*
\overbrace{
\left[ \begin{array}{c} x_1\ x_2\ x_3\ \end{array} \right]
}^{input}
+
\overbrace{
\left[ \begin{array}{c} b^{[1]}_1\ b^{[1]}_2\ b^{[1]}_3\ b^{[1]}_4\ \end{array} \right]
}^{b^{[1]}}
$$

\[\overbrace{
\left[ \begin{array}{c} ...W^{[1]T}{1}...\ ...W^{[1]T}{2}...\ ...W^{[1]T}{3}...\ ...W^{[1]T}{4}... \end{array} \right]
}^{W^{[1]}}
*
\overbrace{
\left[ \begin{array}{c} x_1\ x_2\ x_3\ \end{array} \right]
}^{input}
+
\overbrace{
\left[ \begin{array}{c} b^{[1]}_1\ b^{[1]}_2\ b^{[1]}_3\ b^{[1]}_4\ \end{array} \right]
}^{b^{[1]}}
\]


$$
Z^{[1]}=
\overbrace{
\begin{bmatrix}
\cdots w^{[1]T}_1 \cdots \\
\cdots w^{[1]T}_2 \cdots \\
\cdots w^{[1]T}_3 \cdots \\
\cdots w^{[1]T}_4 \cdots
\end{bmatrix}
}^{W^{[1]},\; (4 \times 3)}
\begin{bmatrix}
x_1 \\
x_2 \\
x_3
\end{bmatrix}
+
\overbrace{
\begin{bmatrix}
b^{[1]}_1 \\
b^{[1]}_2 \\
b^{[1]}_3 \\
b^{[1]}_4
\end{bmatrix}
}^{b^{[1]},\; (4 \times 1)}
=
\begin{bmatrix}
w^{[1]T}_1 x + b^{[1]}_1 \\
w^{[1]T}_2 x + b^{[1]}_2 \\
w^{[1]T}_3 x + b^{[1]}_3 \\
w^{[1]T}_4 x + b^{[1]}_4
\end{bmatrix}
=
\underbrace{
\begin{bmatrix}
z^{[1]}_1 \\
z^{[1]}_2 \\
z^{[1]}_3 \\
z^{[1]}_4
\end{bmatrix}
}_{z^{[1]}}
$$

\[Z^{[1]}=
\overbrace{
\begin{bmatrix}
\cdots w^{[1]T}_1 \cdots \\
\cdots w^{[1]T}_2 \cdots \\
\cdots w^{[1]T}_3 \cdots \\
\cdots w^{[1]T}_4 \cdots
\end{bmatrix}
}^{W^{[1]},\; (4 \times 3)}
\begin{bmatrix}
x_1 \\
x_2 \\
x_3
\end{bmatrix}
+
\overbrace{
\begin{bmatrix}
b^{[1]}_1 \\
b^{[1]}_2 \\
b^{[1]}_3 \\
b^{[1]}_4
\end{bmatrix}
}^{b^{[1]},\; (4 \times 1)}
=
\begin{bmatrix}
w^{[1]T}_1 x + b^{[1]}_1 \\
w^{[1]T}_2 x + b^{[1]}_2 \\
w^{[1]T}_3 x + b^{[1]}_3 \\
w^{[1]T}_4 x + b^{[1]}_4
\end{bmatrix}
=
\underbrace{
\begin{bmatrix}
z^{[1]}_1 \\
z^{[1]}_2 \\
z^{[1]}_3 \\
z^{[1]}_4
\end{bmatrix}
}_{z^{[1]}}
\]


Markdown & LaTex 常用语法的更多相关文章

  1. Typora+markdown 最常用语法教程

    Typora+markdown 最常用语法教程(by 程序员宝藏) Typora+markdown 最常用语法教程(by 程序员宝藏) 请先配置推荐配置(文件->偏好设置): 文章目录 Typo ...

  2. 初识markdown以及markdown的常用语法

      一直都听说markdown可以写作变得更加方便,但是总没有去了解一下,今天下载了一个markdown编辑器,感受了一下markdown的魅力,发现对于程序员写博客之类的,markdown带来了很大 ...

  3. MarkDown的常用语法

    个人比较喜欢Markdown的语法,常用来做一些笔记,下面就简单介绍一下它的语法. 概览 宗旨 Markdown 的目标是实现「易读易写」. 可读性,无论如何,都是最重要的.一份使用 Markdown ...

  4. Markdown:常用语法

    1.标题 说明:一共可以6级标题,几级几个# 一级标题 #一级标题 2.代码 用前后扩上 Hello World! 3.代码块 用前后扩上 Hello World! 4.加粗 加粗了 **加粗了** ...

  5. 【README.md】Markdown语言常用语法

    转自:http://blog.csdn.net/zhaokaiqiang1992 这里只介绍最常用和最常见的功能,若想查看全部的语法,请移步http://wowubuntu.com/markdown/ ...

  6. Markdown编辑器——常用语法

    Markdown是什么? 简短来说,他就是一款特别适用于写博客的编辑器.为什么适合呢,因为它特别的方便.以博客园的编辑界面来说,它原本的界面是这样的(有没有一种Word2003的既视感): 但是,当你 ...

  7. Markdown个人常用语法

    Markdown实用格式 标题 # 标题一级 ## 标题二级 ### 标题三级 #### 标题四级 ##### 标题五级 ###### 标题六级 粗体.斜体和删除线 **加粗字体** *斜体字体* * ...

  8. Markdown编辑器 常用语法

    一.标题 示例: # 1这是一级标题 ## 2这是二级标题 ### 3这是三级标题 #### 4这是四级标题 ##### 5这是五级标题 ###### 6这是六级标题 效果如下: 1这是一级标题 2这 ...

  9. markdown简单常用语法

    一.标题(符号要和文字之间加上一个字符的空格)# 一级标题## 二级标题### 三级标题#### 四级标题##### 五级标题###### 六级标题二.列表(符号要和文字之间加上一个字符的空格)有序列 ...

随机推荐

  1. CF1269A Equation

    题目链接 题意 要找两个合数,使他们两个的差为\(n\),\(n\)为题目给出的数 思路 我们可以枚举减数\(now\),判断一下是不是质数,如果是质数就让\(now++\),然后用一个数\(tot\ ...

  2. Educational Codeforces Round 76 (Rated for Div. 2) E. The Contest dp

    E. The Contest A team of three programmers is going to play a contest. The contest consists of

  3. vue表格合并行的一个实例

        一.element控件实现 在平常的应用中,需要用到合并单元格的操作,在Excel中,这种操作很好实现,但在实际项目中,常常需要借助element控件来实现. 下面是element中的一个实例 ...

  4. 第四组项目总结(UML图设计)

    第四组项目总结(UML图设计) 相关链接: 墨刀原型链接:https://pan.baidu.com/s/1qrVI_je8NONVHT_FwH6Pwg 需求文档链接:https://www.cnbl ...

  5. iOS: 创建静态库,实现自己的API私有使用

    一.介绍 在开发中经常使用到第三方的静态框架,格式基本上就是.framework和.a格式的.使用时,会发现我们只能使用无法修改,这就是静态框架的一个好处,私有性.内部实现的代码只有公开者本人知晓,对 ...

  6. H5生成二维码

    要用H5生成二维码: 1.引入js库,可自行点击链接复制使用 <script type="text/javascript" src="http://static.r ...

  7. IT兄弟连 Java语法教程 流程控制语句 控制循环结构1

    Java语言没有提供goto语句来控制程序的跳转,这种做法提高了程序流程控制的可读性,但降低了程序流程控制的灵活性.为了弥补这种不足,Java提供了continue和break来控制循环结构.除此之外 ...

  8. GO 数组

    一.数组(Array) 1.1 什么是数组 Go 语言提供了数组类型的数据结构. 数组是具有相同唯一类型的一组已编号且长度固定的数据项序列,这种类型可以是任意的原始类型例如整形.字符串或者自定义类型. ...

  9. wpf file embeded resource is readonly,Copy always will copy the file and its folder to the bin folder

    Wpf file embeded resource will compile the file into the assembly and it will be readonly and can no ...

  10. 如何利用python爬取网易新闻

    前言 本文的文字及图片来源于网络,仅供学习.交流使用,不具有任何商业用途,版权归原作者所有,如有问题请及时联系我们以作处理. 作者: LSGOGroup PS:如有需要Python学习资料的小伙伴可以 ...