-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
594 lines (444 loc) · 27.4 KB
/
Copy pathindex.html
File metadata and controls
594 lines (444 loc) · 27.4 KB
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
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="HandheldFriendly" content="True" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<meta name="generator" content="Hugo 0.87.0" />
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/amzrk2/cdn-stcapi@1/favicons/favicon.ico" />
<title>ps126.5</title>
<meta property="og:title" content="ps126.5" />
<meta name="twitter:title" content="ps126.5" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://tjdoc.github.io/" /><meta name="twitter:card" content="summary" /><meta property="og:updated_time" content="2021-02-02T15:22:09+09:00" />
<style>
@media (prefers-color-scheme: dark) {
body[data-theme='auto'] img {
filter: brightness(60%);
}
}
body[data-theme='dark'] img {
filter: brightness(60%);
}
</style>
<link rel="stylesheet" href="https://tjdoc.github.io/assets/css/fuji.min.css" />
</head>
<body data-theme="auto">
<script data-cfasync="false">
var fujiThemeData = localStorage.getItem('fuji_data-theme');
if (!fujiThemeData) {
localStorage.setItem('fuji_data-theme', 'auto');
} else {
if (fujiThemeData !== 'auto') {
document.body.setAttribute('data-theme', fujiThemeData === 'dark' ? 'dark' : 'light');
}
}
</script>
<header>
<div class="container-lg clearfix">
<div class="col-12 header">
<a class="title-main" href="https://tjdoc.github.io/">ps126.5</a>
</div>
</div>
</header>
<main>
<div class="container-lg clearfix">
<div class="col-12 col-md-9 float-left content">
<div class="post">
<h2 class="post-item post-title">
<a href="https://tjdoc.github.io/posts/2021-02-02-coursera_m4w2/">CNN m4w2</a>
</h2>
<div class="post-item post-meta">
<span><i class="iconfont icon-today-sharp"></i> 2021-02-02</span><span><i class="iconfont icon-pricetags-sharp"></i> <a href="/tags/cnn">cnn</a> <a href="/tags/coursera">coursera</a> <a href="/tags/neural-network">neural network</a> </span>
</div>
<div class="post-item post-summary markdown-body">
classic networks LeNet-5 AlexNet many similarities with LeNet5 but much bigger. (10K parameters vs 60M parameters) Uses ReLU instead of traditional sigmoid, tanh Multiple GPUs local response normalization (not used much nowadays) VGG-16 simplified the nn architechture
ResNets networks in networks and 1x1 convolutions pulling layers reduce nh, nw 1x1 convolution lets you reduce (or increase) number of channels inception network
</div>
</div>
<div class="post">
<h2 class="post-item post-title">
<a href="https://tjdoc.github.io/posts/2021-02-01-coursera_m4w1/">convolutional neural network</a>
</h2>
<div class="post-item post-meta">
<span><i class="iconfont icon-today-sharp"></i> 2021-02-01</span><span><i class="iconfont icon-pricetags-sharp"></i> <a href="/tags/coursera">coursera</a> <a href="/tags/cnn">cnn</a> <a href="/tags/neural-network">neural network</a> </span>
</div>
<div class="post-item post-summary markdown-body">
Computer vision convolution operator
summation of the elementwise multiplication with the convolution operator
python: conv-forward tensorflow: tf.nn.conv2d keras: conv2d padding with padding, you can
prevent shrinking output prevent throwing away info from edge padding can be as large as you want Valid and same convolutions valid: no padding same: pad so that output size is the same as the input size you may want odd number filters
</div>
</div>
<div class="post">
<h2 class="post-item post-title">
<a href="https://tjdoc.github.io/posts/2021-01-28-coursera_m2w3p/">m2w3p tesorflow tutorial</a>
</h2>
<div class="post-item post-meta">
<span><i class="iconfont icon-today-sharp"></i> 2021-01-28</span><span><i class="iconfont icon-pricetags-sharp"></i> <a href="/tags/coursera">coursera</a> <a href="/tags/tensorflow">tensorflow</a> </span>
</div>
<div class="post-item post-summary markdown-body">
tf_utils.py import h5py import numpy as np import tensorflow as tf import math def load_dataset(): train_dataset = h5py.File('datasets/train_signs.h5', "r") train_set_x_orig = np.array(train_dataset["train_set_x"][:]) # your train set features train_set_y_orig = np.array(train_dataset["train_set_y"][:]) # your train set labels test_dataset = h5py.File('datasets/test_signs.h5', "r") test_set_x_orig = np.array(test_dataset["test_set_x"][:]) # your test set features test_set_y_orig = np.array(test_dataset["test_set_y"][:]) # your test set labels classes = np.array(test_dataset["list_classes"][:]) # the list of classes train_set_y_orig = train_set_y_orig.reshape((1, train_set_y_orig.shape[0])) test_set_y_orig = test_set_y_orig.reshape((1, test_set_y_orig.
</div>
</div>
<div class="post">
<h2 class="post-item post-title">
<a href="https://tjdoc.github.io/posts/2021-01-28-coursera_m2w3/">Improving Deep Neural Networks M2W3</a>
</h2>
<div class="post-item post-meta">
<span><i class="iconfont icon-today-sharp"></i> 2021-01-28</span><span><i class="iconfont icon-pricetags-sharp"></i> <a href="/tags/coursera">coursera</a> <a href="/tags/neural-networks">neural networks</a> <a href="/tags/hyperparameter-tuning">hyperparameter tuning</a> <a href="/tags/regularization">regularization</a> </span>
</div>
<div class="post-item post-summary markdown-body">
Hyperparameters in the order of importance
alpha - most important beta (momentum, default: 0.9) number of hidden units mini-batch size number of layers learning rate decay beta1, beta2, epsilon (Adam optimization, 0.9, 0.999, 10^-8) Tuning process Try random sampling, don’t use grid it is difficult to know in advance which setting will work better use coarse to fine sampling once you have some idea which range works better - sample that region more densely picking hyperparameters at random uniformly random (random version of np.
</div>
</div>
<div class="post">
<h2 class="post-item post-title">
<a href="https://tjdoc.github.io/posts/2021-01-27-coursera_m2w2p/">coursera m2w2p</a>
</h2>
<div class="post-item post-meta">
<span><i class="iconfont icon-today-sharp"></i> 2021-01-27</span><span><i class="iconfont icon-pricetags-sharp"></i> <a href="/tags/coursera">coursera</a> <a href="/tags/neural-network">neural network</a> <a href="/tags/optimization">optimization</a> </span>
</div>
<div class="post-item post-summary markdown-body">
op utils import numpy as np import matplotlib.pyplot as plt import h5py import scipy.io import sklearn import sklearn.datasets def sigmoid(x): """ Compute the sigmoid of x Arguments: x -- A scalar or numpy array of any size. Return: s -- sigmoid(x) """ s = 1/(1+np.exp(-x)) return s def relu(x): """ Compute the relu of x Arguments: x -- A scalar or numpy array of any size. Return: s -- relu(x) """ s = np.
</div>
</div>
<div class="post">
<h2 class="post-item post-title">
<a href="https://tjdoc.github.io/posts/2021-01-26-coursera_m2w2/">Optimization Algorithms M2W2</a>
</h2>
<div class="post-item post-meta">
<span><i class="iconfont icon-today-sharp"></i> 2021-01-26</span><span><i class="iconfont icon-pricetags-sharp"></i> <a href="/tags/coursera">coursera</a> <a href="/tags/neural-network">neural network</a> </span>
</div>
<div class="post-item post-summary markdown-body">
mini batch gradient descent 1 epoch: pass through training set. In this case, 5000 gradient decsents.
training with mini batch gradient descent Mini batch Cost function is much more noisier than the batch gradient descent, but nonetheless the overall trend will decrease.
choosing your mini-batch size mini-batch size: m \(\implies\) Batch gradient descent Smooth convergence of the cost Takes too long per iteration mini-batch size: 1 \(\implies\) Stochastic gradient descent Does not completely converge (noisy cost minimization) Loses speedup from vectorization mini-batch size: between 1 and m \(\implies\) best performance in practice Fastest learning Vectorization (~1000 batch size) Make progress without passing the entire training set Guidelines for choosing your mini-batch size
</div>
</div>
<div class="post">
<h2 class="post-item post-title">
<a href="https://tjdoc.github.io/posts/2021-01-25-coursera_m2w1p/">coursera m2w1p</a>
</h2>
<div class="post-item post-meta">
<span><i class="iconfont icon-today-sharp"></i> 2021-01-25</span><span><i class="iconfont icon-pricetags-sharp"></i> <a href="/tags/coursera">coursera</a> <a href="/tags/neural-network">neural network</a> </span>
</div>
<div class="post-item post-summary markdown-body">
Initialization init util import numpy as np import matplotlib.pyplot as plt import h5py import sklearn import sklearn.datasets def sigmoid(x): """ Compute the sigmoid of x Arguments: x -- A scalar or numpy array of any size. Return: s -- sigmoid(x) """ s = 1/(1+np.exp(-x)) return s def relu(x): """ Compute the relu of x Arguments: x -- A scalar or numpy array of any size. Return: s -- relu(x) """ s = np.
</div>
</div>
<div class="post">
<h2 class="post-item post-title">
<a href="https://tjdoc.github.io/posts/2021-01-24-coursera_m2w1/">Improving Deep Neural Networks m2w1</a>
</h2>
<div class="post-item post-meta">
<span><i class="iconfont icon-today-sharp"></i> 2021-01-25</span><span><i class="iconfont icon-pricetags-sharp"></i> <a href="/tags/coursera">coursera</a> <a href="/tags/neural-network">neural network</a> <a href="/tags/hyperparameter-tuning">hyperparameter tuning</a> </span>
</div>
<div class="post-item post-summary markdown-body">
Train / dev / test sets Previously:
Train: Test = 70% : 30% Train : dev : test = 60% : 20% : 20% However, in the big data era where you have more than 1 million sets
Train : dev : test = 1,000,000 : 10,000 : 10,000 Train : dev : test = 99.5% : 0.25% : 0.25% Train : dev : test = 99.5% : 0.
</div>
</div>
<div class="post">
<h2 class="post-item post-title">
<a href="https://tjdoc.github.io/posts/2021-01-23-m1w4p2_review/">coursera m1w4p2 review</a>
</h2>
<div class="post-item post-meta">
<span><i class="iconfont icon-today-sharp"></i> 2021-01-23</span><span><i class="iconfont icon-pricetags-sharp"></i> <a href="/tags/coursera">coursera</a> <a href="/tags/neural-network">neural network</a> </span>
</div>
<div class="post-item post-summary markdown-body">
python stuff learned elementwise min max for relu, you use elementwise maximum function which can be done by
np.maximum / np.minimum np.dot for a given numpy array a and b, for a dot product, both expressions are identical
np.dot(a, b) a.dot(b) decision boundary plot import matplotlib.pyplot as plt import numpy as np import sklearn import sklearn.datasets import sklearn.linear_model def plot_decision_boundary(model, X, y): # Set min and max values and give it some padding x_min, x_max = X[0, :].
</div>
</div>
<div class="post">
<h2 class="post-item post-title">
<a href="https://tjdoc.github.io/posts/2021-01-22-coursera_m1w4p2/">m1w4p2</a>
</h2>
<div class="post-item post-meta">
<span><i class="iconfont icon-today-sharp"></i> 2021-01-22</span><span><i class="iconfont icon-pricetags-sharp"></i> <a href="/tags/coursera">coursera</a> <a href="/tags/neural-network">neural network</a> </span>
</div>
<div class="post-item post-summary markdown-body">
import numpy as np import matplotlib.pyplot as plt import h5py def sigmoid(Z): """ Implements the sigmoid activation in numpy Arguments: Z -- numpy array of any shape Returns: A -- output of sigmoid(z), same shape as Z cache -- returns Z as well, useful during backpropagation """ A = 1/(1+np.exp(-Z)) cache = Z return A, cache def relu(Z): """ Implement the RELU function. Arguments: Z -- Output of the linear layer, of any shape Returns: A -- Post-activation parameter, of the same shape as Z cache -- a python dictionary containing "A" ; stored for computing the backward pass efficiently """ A = np.
</div>
</div>
<div class="post">
<h2 class="post-item post-title">
<a href="https://tjdoc.github.io/posts/2021-01-22-coursera_m1w4p1/">coursera m1w4 p1</a>
</h2>
<div class="post-item post-meta">
<span><i class="iconfont icon-today-sharp"></i> 2021-01-22</span><span><i class="iconfont icon-pricetags-sharp"></i> <a href="/tags/coursera">coursera</a> <a href="/tags/neural-network">neural network</a> </span>
</div>
<div class="post-item post-summary markdown-body">
dnn utility import numpy as np def sigmoid(Z): """ Implements the sigmoid activation in numpy Arguments: Z -- numpy array of any shape Returns: A -- output of sigmoid(z), same shape as Z cache -- returns Z as well, useful during backpropagation """ A = 1/(1+np.exp(-Z)) cache = Z return A, cache def relu(Z): """ Implement the RELU function. Arguments: Z -- Output of the linear layer, of any shape Returns: A -- Post-activation parameter, of the same shape as Z cache -- a python dictionary containing "A" ; stored for computing the backward pass efficiently """ A = np.
</div>
</div>
<div class="post">
<h2 class="post-item post-title">
<a href="https://tjdoc.github.io/posts/2021-01-22-coursera_m1w4/">Neural Networks and Deep Learning W4: Deepl L-layer neural network</a>
</h2>
<div class="post-item post-meta">
<span><i class="iconfont icon-today-sharp"></i> 2021-01-22</span><span><i class="iconfont icon-pricetags-sharp"></i> <a href="/tags/coursera">coursera</a> <a href="/tags/neural-network">neural network</a> </span>
</div>
<div class="post-item post-summary markdown-body">
Terminology L number of layers \(n^{[l]}\) number of units in layer l \(a^{[l]}\) activations in layer l, \( a^{[l]} = g^{[l]} (z^{[l]}) \) Forward propagation in deep network $$ \begin{aligned} Z^{[l]} =& W^{[l]} A^{[l-1]} + b^{[l]} \\
A^{[l]} =& g^{[l]} (Z^{[l]}) \end{aligned} $$
where \( A^{[0]} = X \)
You will need an explict for-loop for computing each layers.
Getting your matrix dimensions right $$ \begin{aligned} W^{[l]} &: (n^{[l]}, n^{[l-1]}) \\
</div>
</div>
<div class="post">
<h2 class="post-item post-title">
<a href="https://tjdoc.github.io/posts/2021-01-20-2cor10/">Take every thought captive</a>
</h2>
<div class="post-item post-meta">
<span><i class="iconfont icon-today-sharp"></i> 2021-01-20</span><span><i class="iconfont icon-pricetags-sharp"></i> <a href="/tags/reflection">reflection</a> </span>
</div>
<div class="post-item post-summary markdown-body">
2cor 10:3. For although we do live in the world, we do not wage war in a worldly way; 2cor 10:4. because the weapons we use to wage war are not worldly. On the contrary, they have God’s power for demolishing strongholds. We demolish arguments 2cor 10:5. and every arrogance that raises itself up against the knowledge of God; we take every thought captive and make it obey the Messiah.
</div>
</div>
<div class="post">
<h2 class="post-item post-title">
<a href="https://tjdoc.github.io/posts/2021-01-19-m1w3_code/">M1W3 Code</a>
</h2>
<div class="post-item post-meta">
<span><i class="iconfont icon-today-sharp"></i> 2021-01-19</span><span><i class="iconfont icon-pricetags-sharp"></i> <a href="/tags/coursera">coursera</a> <a href="/tags/neural-network">neural network</a> </span>
</div>
<div class="post-item post-summary markdown-body">
Planar utils import matplotlib.pyplot as plt import numpy as np import sklearn import sklearn.datasets import sklearn.linear_model def plot_decision_boundary(model, X, y): # Set min and max values and give it some padding x_min, x_max = X[0, :].min() - 1, X[0, :].max() + 1 y_min, y_max = X[1, :].min() - 1, X[1, :].max() + 1 h = 0.01 # Generate a grid of points with distance h between them xx, yy = np.
</div>
</div>
<div class="post">
<h2 class="post-item post-title">
<a href="https://tjdoc.github.io/posts/2021-01-19-coursera_m1w3/">Neural Networks and Deep Learning W3: Shallow Neural Network</a>
</h2>
<div class="post-item post-meta">
<span><i class="iconfont icon-today-sharp"></i> 2021-01-19</span><span><i class="iconfont icon-pricetags-sharp"></i> <a href="/tags/coursera">coursera</a> <a href="/tags/neural-network">neural network</a> </span>
</div>
<div class="post-item post-summary markdown-body">
2 layer neural network Unlike logistic regression, neural network contains hidden layer(s). The figure above depicts a shallow neural network, 2 layer NN to be precise. The input layer (layer zero) does not count as a layer so the two layers are 1 hidden layer and the output layer. With the hidden layer, layer numbers are identified by the bracket superscript.
vectorizing across multiple examples activation functions If you don’t know which activation function works best, test them.
</div>
</div>
<div class="post">
<h2 class="post-item post-title">
<a href="https://tjdoc.github.io/posts/2021-01-19-ps27/">Psalm 27</a>
</h2>
<div class="post-item post-meta">
<span><i class="iconfont icon-today-sharp"></i> 2021-01-19</span><span><i class="iconfont icon-pricetags-sharp"></i> <a href="/tags/reflection">reflection</a> </span>
</div>
<div class="post-item post-summary markdown-body">
By David:
Adonai is my light and salvation;
whom do I need to fear?
Adonai is the stronghold of my life;
of whom should I be afraid?
When evildoers assailed me
to devour my flesh,
my adversaries and foes,
they stumbled and fell.
If an army encamps against me,
my heart will not fear;
if war breaks out against me,
even then I will keep trusting.
Just one thing have I asked of Adonai;
</div>
</div>
<div class="post">
<h2 class="post-item post-title">
<a href="https://tjdoc.github.io/posts/2021-01-18-coursera_m1w2_lab/">Neural Networksand Deep Learning W2: Lab</a>
</h2>
<div class="post-item post-meta">
<span><i class="iconfont icon-today-sharp"></i> 2021-01-18</span><span><i class="iconfont icon-pricetags-sharp"></i> <a href="/tags/coursera">coursera</a> <a href="/tags/neural-network">neural network</a> </span>
</div>
<div class="post-item post-summary markdown-body">
packages import numpy as np import matplotlib.pyplot as plt import h5py import scipy from PIL import Image from scipy import ndimage from lr_utils import load_dataset %matplotlib inline load dataset import numpy as np import h5py def load_dataset(): train_dataset = h5py.File('datasets/train_catvnoncat.h5', "r") train_set_x_orig = np.array(train_dataset["train_set_x"][:]) # your train set features train_set_y_orig = np.array(train_dataset["train_set_y"][:]) # your train set labels test_dataset = h5py.File('datasets/test_catvnoncat.h5', "r") test_set_x_orig = np.array(test_dataset["test_set_x"][:]) # your test set features test_set_y_orig = np.
</div>
</div>
<div class="post">
<h2 class="post-item post-title">
<a href="https://tjdoc.github.io/posts/2021-01-18-coursera_m1w2_code/">Coursera W2 Numpy Code</a>
</h2>
<div class="post-item post-meta">
<span><i class="iconfont icon-today-sharp"></i> 2021-01-18</span><span><i class="iconfont icon-pricetags-sharp"></i> <a href="/tags/coursera">coursera</a> <a href="/tags/neural-network">neural network</a> </span>
</div>
<div class="post-item post-summary markdown-body">
Sigmoid function import math import numpy as np def basic_sigmoid(x): return 1/(1+math.exp(-x)) def sigmoid(x) return 1/(1+np.exp(-x)) Derivative of sigmoid $$ \sigma ' (x) = \sigma(x)(1-\sigma(x)) $$
def sigmoid_derivative(x): s = sigmoid(x) ds = s*(1-s) return ds Reshaping arbitrary dimension numpy array to a column vector def image2vector(image): """ Argument: image -- a numpy array of shape (length, height, depth) Returns: v -- a vector of shape (length*height*depth, 1) """ # v = image.
</div>
</div>
<div class="post">
<h2 class="post-item post-title">
<a href="https://tjdoc.github.io/posts/2021-01-18-gal69/">Galatians 6:9</a>
</h2>
<div class="post-item post-meta">
<span><i class="iconfont icon-today-sharp"></i> 2021-01-18</span><span><i class="iconfont icon-pricetags-sharp"></i> <a href="/tags/reflection">reflection</a> </span>
</div>
<div class="post-item post-summary markdown-body">
NKRV gal 6:9 우리가 선을 행하되 낙심하지 말지니 포기하지 아니하면 때가 이르매 거두리라
CJB gal 6:9. So let us not grow weary of doing what is good; for if we don’t give up, we will in due time reap the harvest.
Amen!
</div>
</div>
<div class="post">
<h2 class="post-item post-title">
<a href="https://tjdoc.github.io/posts/2021-01-15-coursera_m1w2/">Neural Networks and Deep Learning W2: Logistic Regression as a Neural Network</a>
</h2>
<div class="post-item post-meta">
<span><i class="iconfont icon-today-sharp"></i> 2021-01-15</span><span><i class="iconfont icon-pricetags-sharp"></i> <a href="/tags/coursera">coursera</a> <a href="/tags/neural-network">neural network</a> </span>
</div>
<div class="post-item post-summary markdown-body">
Logistic Regression Given x, we want \({\hat y} = P(y=1 |_x)\) where
input vector: \( x \in \Re^{n_x} \)
Parameters: \(w \in \Re^{n_x}\), \(b \in \Re \)
Output: \({\hat y} = \sigma (w^T x + b)\)
Here, \( \sigma(z) = \frac{1}{1+e^{-z}} \) is the sigmoid function that enforces \( 0 \le {\hat y} \le 1 \)
Given \( \{{ (x^{(1)} , y^{(1)}) , …, (x^{(m)} , y^{(m)}) \}} \)
we want \( {\hat y}^{(i)} \approx y^{(i)} \)
</div>
</div>
<div class="pagination">
<div class="pag-item pag-current">
<a href="/">1</a>
</div>
<div class="pag-item">
<a href="/page/2/">2</a>
</div>
<div class="pag-next">
<a href="/page/2/"><i class="iconfont icon-chevron-forward-circle-sharp"></i></i></a>
</div>
<div class="pag-last">
<a href="/page/2/"><i class="iconfont icon-caret-forward-circle-sharp"></i></a>
</div>
</div>
</div>
<aside class="col-12 col-md-3 float-left sidebar">
<div class="sidebar-item sidebar-pages">
<h3>Pages</h3>
<ul>
</ul>
</div>
<div class="sidebar-item sidebar-links">
<h3>Links</h3>
<ul>
</ul>
</div>
<div class="sidebar-item sidebar-tags">
<h3>Tags</h3>
<div>
<span>
<a href="/tags/cnn/">cnn</a>
</span>
<span>
<a href="/tags/coursera/">coursera</a>
</span>
<span>
<a href="/tags/hyperparameter-tuning/">hyperparameter tuning</a>
</span>
<span>
<a href="/tags/neural-network/">neural network</a>
</span>
<span>
<a href="/tags/neural-networks/">neural networks</a>
</span>
<span>
<a href="/tags/optimization/">optimization</a>
</span>
<span>
<a href="/tags/reflection/">reflection</a>
</span>
<span>
<a href="/tags/regularization/">regularization</a>
</span>
<span>
<a href="/tags/tensorflow/">tensorflow</a>
</span>
</div>
</div>
</aside>
</div>
<div class="btn">
<div class="btn-menu" id="btn-menu">
<i class="iconfont icon-grid-sharp"></i>
</div>
<div class="btn-toggle-mode">
<i class="iconfont icon-contrast-sharp"></i>
</div>
<div class="btn-scroll-top">
<i class="iconfont icon-chevron-up-circle-sharp"></i>
</div>
</div>
<aside class="sidebar-mobile" style="display: none;">
<div class="sidebar-wrapper">
<div class="sidebar-item sidebar-pages">
<h3>Pages</h3>
<ul>
</ul>
</div>
<div class="sidebar-item sidebar-links">
<h3>Links</h3>
<ul>
</ul>
</div>
<div class="sidebar-item sidebar-tags">
<h3>Tags</h3>
<div>
<span>
<a href="/tags/cnn/">cnn</a>
</span>
<span>
<a href="/tags/coursera/">coursera</a>
</span>
<span>
<a href="/tags/hyperparameter-tuning/">hyperparameter tuning</a>
</span>
<span>
<a href="/tags/neural-network/">neural network</a>
</span>
<span>
<a href="/tags/neural-networks/">neural networks</a>
</span>
<span>
<a href="/tags/optimization/">optimization</a>
</span>
<span>
<a href="/tags/reflection/">reflection</a>
</span>
<span>
<a href="/tags/regularization/">regularization</a>
</span>
<span>
<a href="/tags/tensorflow/">tensorflow</a>
</span>
</div>
</div>
</div>
</aside>
</main>
<footer>
<div class="container-lg clearfix">
<div class="col-12 footer">
<span>© 2021
<a href="https://tjdoc.github.io/"></a>
| Powered by <a href="https://github.com/amzrk2/hugo-theme-fuji/"
target="_blank">Fuji-v2</a> & <a href="https://gohugo.io/"
target="_blank">Hugo</a>
</span>
</div>
</div>
</footer>
<script defer src="https://cdn.jsdelivr.net/npm/medium-zoom@1.0.6/dist/medium-zoom.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/lazysizes@5.3.0/lazysizes.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/components/prism-core.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script defer src="/assets/js/fuji.min.js"></script>
</body>
</html>