Andrew Ng es un renombrado científico de la computación y profesor de la Universidad de Stanford, reconocido mundialmente por su contribución al campo del aprendizaje automático y la inteligencia artificial. Su visión y experiencia han ayudado a moldear la forma en que se enseña y se aplica el aprendizaje automático en la industria y la academia.
Ng es co-fundador de Google Brain, un equipo de investigación en inteligencia artificial de Google, y ha desempeñado un papel clave en la popularización y difusión del aprendizaje automático en la comunidad global. Sin embargo, es ampliamente conocido por su dedicación a la educación y su enfoque en hacer que el aprendizaje automático sea accesible para todos.
Uno de los logros más destacados de Andrew Ng es su creación de cursos en línea que han llegado a millones de estudiantes de todo el mundo. Estos cursos, disponibles en plataformas como Coursera, se centran en brindar una comprensión sólida y práctica del aprendizaje automático y la ciencia de datos, incluso para aquellos sin un fondo técnico sólido.
Los cursos de Andrew Ng se caracterizan por:
Claridad Conceptual: Ng tiene un talento para explicar conceptos complejos de manera sencilla y accesible. Sus clases están diseñadas para que incluso los principiantes puedan entender y aplicar los principios del aprendizaje automático.
Enfoque Práctico: Además de comprender la teoría, los cursos de Ng se centran en la aplicación práctica. Los estudiantes trabajan en proyectos y ejercicios que les permiten poner en práctica lo que han aprendido.
Amplio Alcance: Los cursos cubren una amplia gama de temas, desde los fundamentos del aprendizaje automático hasta temas más avanzados como la visión por computadora, el procesamiento del lenguaje natural y la inteligencia artificial.
Flexibilidad: Los cursos en línea de Ng están diseñados para ser flexibles y permitir a los estudiantes aprender a su propio ritmo. Esto hace que sean ideales para profesionales que trabajan y personas con horarios ocupados.
Impacto Duradero: Los estudiantes que han completado los cursos de Andrew Ng han informado un aumento significativo en sus habilidades y conocimiento en el campo del aprendizaje automático. Muchos han utilizado este conocimiento para avanzar en sus carreras y contribuir a proyectos innovadores.
Andrew Ng es un líder en el campo del aprendizaje automático y la inteligencia artificial, y sus cursos en línea son una puerta de entrada para que cualquier persona interesada en la tecnología pueda aprender y aplicar los principios del aprendizaje automático y la ciencia de datos en el mundo real. Su enfoque accesible y práctico ha tenido un impacto duradero en la educación y la industria tecnológica.
1. Copyright Notice
These slides are distributed under the Creative Commons License.
DeepLearning.AI makes these slides available for educational purposes. You may not use or distribute
these slides for commercial purposes. You may make copies of these slides and use or distribute them for
educational purposes as long as you cite DeepLearning.AI as the source of the slides.
For the rest of the details of the license, see https://creativecommons.org/licenses/by-sa/2.0/legalcode
3. Andrew Ng
Advanced learning algorithms
Neural Networks
inference (prediction)
training
Practical advice for building machine learning systems
Decision Trees
5. Andrew Ng
Neural networks
Origins: Algorithms that try to mimic the brain.
Used in the 1980’s and early 1990’s.
Fell out of favor in the late 1990’s.
Resurgence from around 2005.
speech images text (NLP)
6. Neurons in the brain
[Credit: US National Institutes of Health, National Institute on Aging]
7. Andrew Ng
image source: https://biologydictionary.net/sensory-neuron/
inputs outputs
Simplified mathematical
model of a neuron
inputs outputs
Biological neuron
14. Andrew Ng
Multiple hidden layers
x
input
hidden
layer
hidden
layer
output
layer
hidden
layer
hidden
layer
hidden
layer
neural network architecture
x
a a
17. Andrew Ng
Face recognition
x
input
output layer
probability of being
person ‘XYZ’
source: Convolutional Deep Belief Networks for Scalable Unsupervised Learning of Hierarchical Representations
by Honglak Lee, Roger Grosse, Ranganath Andrew Y. Ng
⋮
⋮
⋮
18. Andrew Ng
probability of
car detected
source: Convolutional Deep Belief Networks for Scalable Unsupervised Learning of Hierarchical Representations
by Honglak Lee, Roger Grosse, Ranganath Andrew Y. Ng
Car classification
output layer
⋮
⋮
⋮
30. Andrew Ng
Handwritten digit recognition
x
output
layer
probability
of being a
handwritten ‘1’
25 units 15 units
a[1]
⋮
⋮
a[1] a[2]
a[3]
1 unit
layer 1 layer 2 layer 3
Digit images
label 0 1
31. Andrew Ng
Handwritten digit recognition
x
output
layer
25 units 15 units a[2]
⋮
⋮
a[1] a[2]
a[3]
1 unit
layer 1 layer 2 layer 3
Digit images
label 0 1
probability
of being a
handwritten ‘1’
32. Andrew Ng
Handwritten digit recognition
output
layer
probability
of being a
handwritten ‘1’
⋮ ⋮
25 units 15 units
a[2] a[3]
a[3]
= 𝑔 w1
3
∙ a 2
+ 𝑏1
3
𝑖𝑠 𝑎1
3
≥ 0.5?
ො
𝑦 = 1 ො
𝑦 = 0
1 unit
forward propagation
a[1]
x
layer 1 layer 2 layer 3
𝑓(𝑥)
=
image is digit 1 image isn’t digit 1
35. Andrew Ng
a[1]
a[2]
x
x = np.array([[200.0, 17.0]])
layer_1 = Dense(units=3, activation=‘sigmoid’)
a1 = layer_1(x)
36. Andrew Ng
Build the model using TensorFlow
a[1]
a[2]
layer_2 = Dense(units=1, activation=‘sigmoid’)
a2 = layer_2(a1)
x = np.array([[200.0, 17.0]])
layer_1 = Dense(units=3, activation=‘sigmoid’)
a1 = layer_1(x)
x
37. Andrew Ng
Build the model using TensorFlow
𝑖𝑠 𝑎1
2
≥ 0.5?
if a2 >= 0.5:
yhat = 1
else:
yhat = 0
ො
𝑦 = 1 ො
𝑦 = 0
layer_2 = Dense(units=1, activation=‘sigmoid’)
a2 = layer_2(a1)
x = np.array([[200.0, 17.0]])
layer_1 = Dense(units=3, activation=‘sigmoid’)
a1 = layer_1(x)
a[1]
a[2]
x
38. Andrew Ng
Model for digit classification
x ⋮
⋮
25 units
15 units
a[2]
a[3]
1 unit
x = np.array([[0.0,...245,...240...0]])
layer_1 = Dense(units=25, activation=‘sigmoid’)
a1 = layer_1(x)
a[1]
39. Andrew Ng
Model for digit classification
x ⋮
⋮
25 units
15 units
a[1]
a[2]
a[3]
1 unit
x = np.array([[0.0,...245,...240...0]])
layer_1 = Dense(units=25, activation=‘sigmoid’)
a1 = layer_1(x)
layer_2 = Dense(units=15, activation=‘sigmoid’)
a2 = layer_2(a1)
40. Andrew Ng
Model for digit classification
x ⋮
⋮
25 units
15 units
a[2]
a[3]
1 unit
x = np.array([[0.0,...245,...240...0]])
layer_1 = Dense(units=25, activation=‘sigmoid’)
a1 = layer_1(x)
layer_2 = Dense(units=15, activation=‘sigmoid’)
a2 = layer_2(a1)
layer_3 = Dense(units=1, activation=‘sigmoid’)
a3 = layer_3(a2)
a[1]
41. Andrew Ng
Model for digit classification
x ⋮
⋮
25 units
15 units
a[2]
a[3]
1 unit
x = np.array([[0.0,...245,...240...0]])
layer_1 = Dense(units=25, activation=‘sigmoid’)
a1 = layer_1(x)
layer_2 = Dense(units=15, activation=‘sigmoid’)
a2 = layer_2(a1)
if a3 >= 0.5:
yhat = 1
else:
yhat = 0
layer_3 = Dense(units=1, activation=‘sigmoid’)
a3 = layer_3(a2)
𝑖𝑠 𝑎1
3
≥ 0.5?
ො
𝑦 = 1 ො
𝑦 = 0
a[1]
50. Andrew Ng
What you saw earlier
layer_2 = Dense(units=1, activation="sigmoid")
a2 = layer_2(a1)
x = np.array([[200.0, 17.0]])
layer_1 = Dense(units=3, activation="sigmoid")
a1 = layer_1(x)
a[1]
a[2]
x
51. Andrew Ng
Building a neural network architecture
layer_2 = Dense(units=1, activation="sigmoid")
layer_1 = Dense(units=3, activation="sigmoid")
a[1]
a[2]
x
model = Sequential([layer_1, layer_2])
model.fit(x,y)
model.compile(...)
x = np.array([[200.0, 17.0],
[120.0, 5.0],
[425.0, 20.0],
[212.0, 18.0])
y = np.array([1,0,0,1])
model.predict(x_new)
y
200 17 1
120 5 0
425 20 0
212 18 1
4 x 2
52. Andrew Ng
layer_1 = Dense(units=25, activation="sigmoid")
Digit classification model
x ⋮
⋮
25 units
15 units
a[2]
a[3]
1 unit
a[1]
layer_2 = Dense(units=15, activation="sigmoid")
model = Sequential([layer_1, layer_2, layer_3]
model.fit(x,y)
model.compile(...)
x = np.array([[0..., 245, ..., 17],
[0..., 200, ..., 184])
y = np.array([1,0])
layer_3 = Dense(units=1, activation="sigmoid")
model.predict(x_new)
53. Andrew Ng
Digit classification model
x ⋮
⋮
25 units
15 units
a[2]
a[3]
1 unit
a[1]
model = Sequential([
Dense(units=25, activation="sigmoid"),
Dense(units=15, activation="sigmoid"),
Dense(units=1, activation="sigmoid")])
model.compile(...)
x = np.array([[0..., 245, ..., 17],
[0..., 200, ..., 184])
y = np.array([1,0])
model.fit(x,y)
model.predict(x_new)
59. Andrew Ng
AI
E.g., smart speaker,
self-driving car, web search,
AI in farming and factories
Do anything a human can do
ANI
(artificial narrow intelligence)
AGI
(artificial general intelligence)
60. Andrew Ng
image source: https://biologydictionary.net/sensory-neuron/
inputs outputs
Simplified mathematical
model of a neuron
inputs outputs
Biological neuron
61. Andrew Ng
Neural network and the brain
Can we mimic the human brain?
x 𝑓(x)
vs
We have (almost) no idea how the brain works
62. Andrew Ng
The ”one learning algorithm” hypothesis
Auditory cortex learns to see
Auditory cortex
[Roe et al., 1992]
63. Andrew Ng
The ”one learning algorithm” hypothesis
Somatosensory cortex learns to see
Somatosensory cortex
[Metin & Frost, 1989]
64. Andrew Ng
Sensor representations in the brain
Seeing with your tongue Human echolocation (sonar)
Haptic belt: Direction sense Implanting a 3rd eye
[BrainPort; Welsh & Blasch, 1997; Nagel et al., 2005; Constantine-Paton & Law, 2009]
66. Andrew Ng
For loops vs. vectorization
def dense(a_in,W,b):
a_out = np.zeros(units)
for j in range(units):
w = W[:,j]
z = np.dot(w,x) + b[j]
a[j] = g(z)
return a
def dense(A_in,W,B):
Z = np.matmul(A_in,W) + B
A_out = g(Z)
return A_out
X = np.array([[200, 17]])
W = np.array([[1, -3, 5],
[-2, 4, -6])
B = np.array([[-1, 1, 2]])
[[1,0,1]]
x = np.array([200, 17])
W = np.array([[1, -3, 5],
[-2, 4, -6]])
b = np.array([-1, 1, 2])
[1,0,1]
68. Andrew Ng
Dot products
1
2
∙
3
4
𝑧 = a ∙ w
↑
a
↓
∙
↑
w
↓
↑
w
↓
in general
example vector vector multiplication
a𝑻
= 1 2
← a𝑻 →
transpose
a =
1
2
𝑧 = a𝑻w
69. Andrew Ng
Vector matrix multiplication
→
w1
→
w2
[ ← →
a
𝑻
→ ]
𝐙 = →
a
𝑻
𝐖
𝐙 = [
→
a
𝑻→
w1 𝑎𝑻→
w2]
𝐙 = [11 17]
(1 ∗ 3) + (2 ∗ 4) (1 ∗ 5) + (2 ∗ 6)
→
a
𝑻
= [1 2]
→
a =
[
1
2]
𝐖 =
[
3 5
4 6]