-
Notifications
You must be signed in to change notification settings - Fork 0
/
Algorithm-BP-ANN.html
385 lines (280 loc) · 16.5 KB
/
Algorithm-BP-ANN.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="theme-color" content="#ddd"><meta name="generator" content="Hexo 6.2.0">
<link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
<link rel="icon" type="image/png" sizes="32x32" href="/images/logo_32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/images/logo_16x16.png">
<link rel="mask-icon" href="/images/logo.png" color="#ddd">
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Sans+SC:300,300italic,400,400italic,700,700italic&display=swap&subset=latin,latin-ext">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" integrity="sha256-DfWjNxDkM94fVBWx1H5BMMp0Zq7luBlV8QRcSES7s+0=" crossorigin="anonymous">
<script class="next-config" data-name="main" type="application/json">{"hostname":"example.com","root":"/","images":"/images","scheme":"Gemini","darkmode":false,"version":"8.12.1","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12},"copycode":{"enable":true,"style":null},"bookmark":{"enable":false,"color":"#222","save":"auto"},"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"stickytabs":false,"motion":{"enable":false,"async":false,"transition":{"post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"prism":false,"i18n":{"placeholder":"搜索...","empty":"没有找到任何搜索结果:${query}","hits_time":"找到 ${hits} 个搜索结果(用时 ${time} 毫秒)","hits":"找到 ${hits} 个搜索结果"}}</script><script src="/js/config.js"></script>
<meta name="description" content="待做。 规划问题包括线性规划,整数规划和非线性规划三大类。 线性规划 线性规划的目标函数可以是求最大值,也可以是求最小值;约束条件的不等号可以是小于号,也可以是大于号。为了避免形式多样性带来的不变,Matlab 中规定线性规划的标准形式为 \[ \mathop{\min}\limits_{\mathbf{x}} \mathbf{c}^\text{T}\mathbf{x} \quad">
<meta property="og:type" content="article">
<meta property="og:title" content="人工神经网络算法">
<meta property="og:url" content="http://example.com/Algorithm-BP-ANN.html">
<meta property="og:site_name" content="Day day up!">
<meta property="og:description" content="待做。 规划问题包括线性规划,整数规划和非线性规划三大类。 线性规划 线性规划的目标函数可以是求最大值,也可以是求最小值;约束条件的不等号可以是小于号,也可以是大于号。为了避免形式多样性带来的不变,Matlab 中规定线性规划的标准形式为 \[ \mathop{\min}\limits_{\mathbf{x}} \mathbf{c}^\text{T}\mathbf{x} \quad">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2018-08-01T16:00:00.000Z">
<meta property="article:modified_time" content="2022-06-06T16:00:00.000Z">
<meta property="article:author" content="Chilton Nieh">
<meta property="article:tag" content="Matlab">
<meta property="article:tag" content="算法">
<meta name="twitter:card" content="summary">
<link rel="canonical" href="http://example.com/Algorithm-BP-ANN.html">
<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":false,"isPost":true,"lang":"zh-CN","comments":true,"permalink":"http://example.com/Algorithm-BP-ANN.html","path":"/Algorithm-BP-ANN.html","title":"人工神经网络算法"}</script>
<script class="next-config" data-name="calendar" type="application/json">""</script>
<title>人工神经网络算法 | Day day up!</title>
<noscript>
<link rel="stylesheet" href="/css/noscript.css">
</noscript>
</head>
<body itemscope itemtype="http://schema.org/WebPage">
<div class="headband"></div>
<main class="main">
<header class="header" itemscope itemtype="http://schema.org/WPHeader">
<div class="header-inner"><div class="site-brand-container">
<div class="site-nav-toggle">
<div class="toggle" aria-label="切换导航栏" role="button">
<span class="toggle-line"></span>
<span class="toggle-line"></span>
<span class="toggle-line"></span>
</div>
</div>
<div class="site-meta">
<a href="/" class="brand" rel="start">
<i class="logo-line"></i>
<p class="site-title">Day day up!</p>
<i class="logo-line"></i>
</a>
<p class="site-subtitle" itemprop="description">做人最重要的的是😀</p>
</div>
<div class="site-nav-right">
<div class="toggle popup-trigger">
</div>
</div>
</div>
<nav class="site-nav">
<ul class="main-menu menu"><li class="menu-item menu-item-home"><a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a></li><li class="menu-item menu-item-archives"><a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档<span class="badge">38</span></a></li><li class="menu-item menu-item-tags"><a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签<span class="badge">41</span></a></li><li class="menu-item menu-item-categories"><a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类<span class="badge">6</span></a></li><li class="menu-item menu-item-favorites"><a href="/favorites/" rel="section"><i class="fa fa-heart fa-fw"></i>收藏</a></li><li class="menu-item menu-item-about"><a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于</a></li>
</ul>
</nav>
</div>
<div class="toggle sidebar-toggle" role="button">
<span class="toggle-line"></span>
<span class="toggle-line"></span>
<span class="toggle-line"></span>
</div>
<aside class="sidebar">
<div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
<ul class="sidebar-nav">
<li class="sidebar-nav-toc">
文章目录
</li>
<li class="sidebar-nav-overview">
站点概览
</li>
</ul>
<div class="sidebar-panel-container">
<!--noindex-->
<div class="post-toc-wrap sidebar-panel">
<div class="post-toc animated"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E7%BA%BF%E6%80%A7%E8%A7%84%E5%88%92"><span class="nav-number">1.</span> <span class="nav-text">线性规划</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E9%9D%9E%E7%BA%BF%E6%80%A7%E8%A7%84%E5%88%92"><span class="nav-number">2.</span> <span class="nav-text">非线性规划</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E6%95%B4%E6%95%B0%E8%A7%84%E5%88%92"><span class="nav-number">3.</span> <span class="nav-text">整数规划</span></a></li></ol></div>
</div>
<!--/noindex-->
<div class="site-overview-wrap sidebar-panel">
<div class="site-author site-overview-item animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
<img class="site-author-image" itemprop="image" alt="Chilton Nieh"
src="/images/logo.png">
<p class="site-author-name" itemprop="name">Chilton Nieh</p>
<div class="site-description" itemprop="description">路漫漫其修远兮,吾将上下而求索</div>
</div>
<div class="site-state-wrap site-overview-item animated">
<nav class="site-state">
<div class="site-state-item site-state-posts">
<a href="/archives/">
<span class="site-state-item-count">38</span>
<span class="site-state-item-name">日志</span>
</a>
</div>
<div class="site-state-item site-state-categories">
<a href="/categories/">
<span class="site-state-item-count">6</span>
<span class="site-state-item-name">分类</span></a>
</div>
<div class="site-state-item site-state-tags">
<a href="/tags/">
<span class="site-state-item-count">41</span>
<span class="site-state-item-name">标签</span></a>
</div>
</nav>
</div>
<div class="links-of-author site-overview-item animated">
<span class="links-of-author-item">
<a href="https://github.com/yourname" title="GitHub → https://github.com/yourname" rel="noopener" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a>
</span>
</div>
</div>
</div>
</div>
</aside>
<div class="sidebar-dimmer"></div>
</header>
<div class="back-to-top" role="button" aria-label="返回顶部">
<i class="fa fa-arrow-up"></i>
<span>0%</span>
</div>
<noscript>
<div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>
<div class="main-inner post posts-expand">
<div class="post-block">
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="zh-CN">
<link itemprop="mainEntityOfPage" href="http://example.com/Algorithm-BP-ANN.html">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/logo.png">
<meta itemprop="name" content="Chilton Nieh">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Day day up!">
<meta itemprop="description" content="路漫漫其修远兮,吾将上下而求索">
</span>
<span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
<meta itemprop="name" content="人工神经网络算法 | Day day up!">
<meta itemprop="description" content="">
</span>
<header class="post-header">
<h1 class="post-title" itemprop="name headline">
人工神经网络算法
</h1>
<div class="post-meta-container">
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2018-08-02 00:00:00" itemprop="dateCreated datePublished" datetime="2018-08-02T00:00:00+08:00">2018-08-02</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i>
</span>
<span class="post-meta-item-text">更新于</span>
<time title="修改时间:2022-06-07 00:00:00" itemprop="dateModified" datetime="2022-06-07T00:00:00+08:00">2022-06-07</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
<a href="/categories/%E4%BC%98%E5%8C%96%E7%AE%97%E6%B3%95/" itemprop="url" rel="index"><span itemprop="name">优化算法</span></a>
</span>
</span>
</div>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<p>待做。</p>
<p>规划问题包括<strong>线性规划</strong>,<strong>整数规划</strong>和<strong>非线性规划</strong>三大类。</p>
<h2 id="线性规划">线性规划</h2>
<p>线性规划的目标函数可以是求最大值,也可以是求最小值;约束条件的不等号可以是小于号,也可以是大于号。为了避免形式多样性带来的不变,Matlab
中规定线性规划的标准形式为</p>
<p><span class="math display">\[
\mathop{\min}\limits_{\mathbf{x}} \mathbf{c}^\text{T}\mathbf{x} \quad
\text{s.t.}\quad \mathbf{Ax}\le\mathbf{b},
\]</span> 其中,<span class="math inline">\(\mathbf{c}\)</span> 和 <span
class="math inline">\(\mathbf{x}\)</span> 为 <span
class="math inline">\(n\)</span> 维列向量;<span
class="math inline">\(\mathbf{b}\)</span> 为 <span
class="math inline">\(m\)</span> 维列向量;<span
class="math inline">\(\mathbf{A}\)</span> 为 <span
class="math inline">\(m\times n\)</span> 矩阵。</p>
<p>对于线性规划:</p>
<p><span class="math display">\[\mathop{\max}\limits_{\mathbf{x}}
\mathbf{c}^\text{T}\mathbf{x} \quad \text{s.t.}\quad
\mathbf{Ax}\ge\mathbf{b},\]</span></p>
<p>Matlab 标准形式为</p>
<p><span
class="math display">\[\mathop{\min}\limits_{\mathbf{x}}-\mathbf{c}^\text{T}\mathbf{x}\quad\text{s.t.}\quad-\mathbf{Ax}\le-\mathbf{b}.\]</span></p>
<p>Matlab
中线性规划的基本函数形式为<code>linprog(c,A,b)</code>,返回值是向量
<span class="math inline">\(\mathbf{x}\)</span>
的值。对于寻找如下形式的最小值问题:</p>
<p><span
class="math display">\[\mathop{\min}\limits_{\mathbf{x}}f^\text{T}\mathbf{x}\quad\text{s.t.}\begin{cases}\mathbf{A}\cdot\mathbf{x}\le\mathbf{b}\\\mathbf{Aeq}\cdot\mathbf{x}=\mathbf{beq}\\\mathbf{lb}\le\mathbf{x}\le\mathbf{ub}\end{cases},\]</span></p>
<p>可通过</p>
<figure class="highlight matlab"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">x = linprog(f,A,b,Aeq,beq,lb,ub,options)</span><br></pre></td></tr></table></figure>
<p>求解。</p>
<span id="more"></span>
<h2 id="非线性规划">非线性规划</h2>
<p>非线性规划问题是目标函数或约束函数中包含非线性函数。Matlab
中非线性规划的基本函数形式为<code>fmincon(fun,x0,A,b)</code>,返回值是向量
<span class="math inline">\(\mathbf{x}\)</span>
的值。对于寻找如下形式的最小值问题:</p>
<p><span class="math display">\[
\mathop{\min}\limits_{\mathbf{x}}f(\mathbf{x})\quad\text{s.t.}\begin{cases}c(\mathbf{x})\le\mathbf{0}\\ceq(\mathbf{x})=\mathbf{0}\\\mathbf{A}\cdot\mathbf{x}\le\mathbf{b}\\\mathbf{Aeq}\cdot\mathbf{x}=\mathbf{beq}\\\mathbf{lb}\le\mathbf{x}\le\mathbf{ub}\end{cases},
\]</span> 可通过</p>
<figure class="highlight matlab"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">x = fmincon(fun,x0,A,b,Aeq,beq,lb,ub,nonlcon,options)</span><br></pre></td></tr></table></figure>
<p>求解。</p>
<h2 id="整数规划">整数规划</h2>
</div>
<footer class="post-footer">
<div class="post-tags">
<a href="/tags/Matlab/" rel="tag"># Matlab</a>
<a href="/tags/%E7%AE%97%E6%B3%95/" rel="tag"># 算法</a>
</div>
<div class="post-nav">
<div class="post-nav-item">
<a href="/Algorithm-GA.html" rel="prev" title="基因算法">
<i class="fa fa-chevron-left"></i> 基因算法
</a>
</div>
<div class="post-nav-item">
<a href="/Right-menu-cmd.html" rel="next" title="命令提示符(cmd)右键菜单">
命令提示符(cmd)右键菜单 <i class="fa fa-chevron-right"></i>
</a>
</div>
</div>
</footer>
</article>
</div>
</div>
</main>
<footer class="footer">
<div class="footer-inner">
<div class="copyright">
©
<span itemprop="copyrightYear">2022</span>
<span class="with-love">
<i class="fa fa-heart"></i>
</span>
<span class="author" itemprop="copyrightHolder">Chilton Nieh</span>
</div>
<div class="powered-by">由 <a href="https://hexo.io/" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.js.org/" rel="noopener" target="_blank">NexT.Gemini</a> 强力驱动
</div>
</div>
</footer>
<script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js" integrity="sha256-XL2inqUJaslATFnHdJOi9GfQ60on8Wx1C2H8DYiN1xY=" crossorigin="anonymous"></script>
<script src="/js/comments.js"></script><script src="/js/utils.js"></script><script src="/js/next-boot.js"></script>
<script class="next-config" data-name="mermaid" type="application/json">{"enable":true,"theme":{"light":"default","dark":"dark"},"js":{"url":"https://cdnjs.cloudflare.com/ajax/libs/mermaid/9.1.1/mermaid.min.js","integrity":"sha256-8L3O8tirFUa8Va4NSTAyIbHJeLd6OnlcxgupV9F77e0="}}</script>
<script src="/js/third-party/tags/mermaid.js"></script>
<script class="next-config" data-name="enableMath" type="application/json">true</script><script class="next-config" data-name="mathjax" type="application/json">{"enable":true,"tags":"none","js":{"url":"https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.2.1/es5/tex-mml-chtml.js","integrity":"sha256-hlC2uSQYTmPsrzGZTEQEg9PZ1a/+SV6VBCTclohf2og="}}</script>
<script src="/js/third-party/math/mathjax.js"></script>
</body>
</html>