![Page 4: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/4.jpg)
awesome web and mobile appssince 2005
![Page 5: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/5.jpg)
![Page 6: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/6.jpg)
![Page 7: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/7.jpg)
![Page 8: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/8.jpg)
![Page 9: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/9.jpg)
![Page 10: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/10.jpg)
![Page 11: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/11.jpg)
terms
![Page 12: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/12.jpg)
AI (artificial intelligence)
- the theory and development of computer systems able to perform tasks that normally require human intelligence, such as visual perception, speech recognition, decision-making, and translation between languages
![Page 13: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/13.jpg)
ML (machine learning)
- is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed. Machine learning focuses on the development of computer programs that can teach themselves to grow and change when exposed to new data.
![Page 14: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/14.jpg)
without being explicitly programmed
![Page 15: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/15.jpg)
FF NN cost function
![Page 16: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/16.jpg)
FF NN Cost Function
I’m kidding
![Page 17: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/17.jpg)
cost function with regularization
![Page 18: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/18.jpg)
2 types of MLsupervised learning
unsupervised learning
![Page 19: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/19.jpg)
supervisedthe training data is labeled,
eg. we know the correct answer
![Page 20: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/20.jpg)
unsupervisedthe training data is not labeled,
eg. we would figure out hidden correlations by ourselves
![Page 21: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/21.jpg)
linear regressionsupervised learning
![Page 22: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/22.jpg)
(x(1), y(1)), (x(2), y(2))…(x(m), y(m)) m training examples of (x(i), y(i)) x(i) - feature y(i) - label
x(i)
y(i)
![Page 23: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/23.jpg)
training set
learning algorithm
hθ(x)x(new data) y(prediction)
![Page 24: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/24.jpg)
training set
learning algorithm
hθ(x)x(new data) y(prediction)
![Page 25: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/25.jpg)
hθ(x) = hypothesis
![Page 26: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/26.jpg)
(x, y)
y = hθ(x) = θ0 + θ1x
find θ0 and θ1
![Page 27: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/27.jpg)
hθ(x) = θ0 + θ1x1 + θ2x2 + …+ θnxn
many features, n - number of features
![Page 28: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/28.jpg)
size, sq.m x1
# rooms x2
age x3
price y
80 3 22 2.9M
90 4 24 3.1M
75 3 28 2.5M
110 5 20 3.3M
![Page 29: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/29.jpg)
1 USD = 3.85 NIS
![Page 30: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/30.jpg)
hθ(x) = θ0 + θ1x1
summate the prediction error on training set
![Page 31: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/31.jpg)
Linear Regression Cost Function
![Page 32: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/32.jpg)
minimize J(θ)funding a minimum of cost function = “learning”
![Page 33: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/33.jpg)
gradient descentbatch, stochastic, etc, or advanced optimization algorithms
to find a global (sometimes local) minimum of cost function J 𝞪 - learning rate, a parameter of gradient descent
![Page 34: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/34.jpg)
(x(1), y(1)), (x(2), y(2))…(x(m), y(m))
gradient descent
θ0, θ1, θ2, …, θn
magic inside
![Page 35: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/35.jpg)
hθ(x) = θ0 + θ1x1 + θ2x2 + …+ θnxn
we’re ready to predict
![Page 36: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/36.jpg)
features scaling0 ≤ x ≤ 1
![Page 37: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/37.jpg)
size, sq.m size, sq.m / 110 x1
80 0.72
90 0.81
75 0.68
110 1
![Page 38: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/38.jpg)
mean normalizationaverage value of the feature is ~0
-0.5 ≤ x ≤ 0.5
![Page 39: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/39.jpg)
size, sq.m (size, sq.m / 110) - 0.8025 x1
80 -0.0825
90 0.075
75 -0.1226
110 0.1975
![Page 40: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/40.jpg)
matrix manipulationsX = n x 1 vector, ϴ = n x 1 vector
hθ(x) = θ0 + θ1x1 + θ2x2 + …+ θnxn hθ(x) = ϴTX
![Page 41: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/41.jpg)
GPU
![Page 42: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/42.jpg)
![Page 43: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/43.jpg)
logistic regressionsupervised learning
![Page 44: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/44.jpg)
classifier
![Page 45: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/45.jpg)
y = 1, true
y = 0, false
![Page 46: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/46.jpg)
hθ(x) = g(ϴTX)hθ(X) - estimated probability that y = 1 on input X
g(z) - logistic non-linear function
![Page 47: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/47.jpg)
logistic function g(z)
there is a few: sigmoid, tahn, ReLUs, etc
image source: Wikipedia
![Page 48: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/48.jpg)
(x(1), y(1)), (x(2), y(2))…(x(m), y(m))
minimize the cost function
vector θ
y = {0, 1}
![Page 49: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/49.jpg)
training set
learning algorithm
hθ(x)x(new data) y(prediction)
hθ(x) = g(ϴTX) y ≥ 0.5 - true y < 0.5 - false
![Page 50: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/50.jpg)
one-vs-allsupervised learning
![Page 51: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/51.jpg)
![Page 52: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/52.jpg)
y = 1, true
y = 0, false
y = 0, false
![Page 53: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/53.jpg)
don’t implement it at homeuse libsvm, liblinear, and others
![Page 54: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/54.jpg)
neural networkssupervised learning
![Page 55: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/55.jpg)
neurona0
a1
a2
computation hθ(a)
![Page 56: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/56.jpg)
feed forward neural network
input layerhidden layer
output layer
![Page 57: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/57.jpg)
estimates
size, sq.m
# rooms
age
e0
e1
e2
e3
estimates
final estimate
![Page 58: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/58.jpg)
multiclass classifiers
![Page 59: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/59.jpg)
logistic unit
x0
x1
x2
θ1
θ2
θ3 hθ = g(x0θ0 + x1θ1 + x2θ2)
θ - weights g - activation function
![Page 60: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/60.jpg)
logistic function g(z)
there is a few: sigmoid, tahn, ReLUs, etc
image source: Wikipedia
![Page 61: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/61.jpg)
output: probabilities
0.4765 that y = 2
0.7123 that y = 1
![Page 62: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/62.jpg)
net with no hidden layersno hidden layers = one-vs-all logistic regression
![Page 63: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/63.jpg)
cost functionsometimes called loss function of NN, a representation of an error between
a real and a predicted value
![Page 64: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/64.jpg)
training set
learning algorithm
θx(new data) y(prediction)
![Page 65: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/65.jpg)
backpropbackward propagation of errors
![Page 66: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/66.jpg)
gradient descent + backprop“deep learning” - is training a neural net “deep” - because we have many layers
![Page 67: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/67.jpg)
convolutional neural netswidely used for image processing and object recognition
![Page 68: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/68.jpg)
recurrent neural netswidely used for natural language processing
![Page 69: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/69.jpg)
CPU/GPU expensive
![Page 70: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/70.jpg)
image source: https://xkcd.com/303/
![Page 71: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/71.jpg)
image source: http://www.falsepositives.com/index.php/2008/01/31/the-real-reason-for-no-increased-productivity-behind-scripting-languages-reveled/
2008
![Page 72: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/72.jpg)
2016
![Page 73: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/73.jpg)
destination suggestion
![Page 74: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/74.jpg)
tangledpath/ruby-fannRuby library for interfacing with FANN
(Fast Artificial Neural Network)
![Page 75: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/75.jpg)
require './neural_network'
LOCATIONS = [:home, :work, :tennis, :parents]
LOCATIONS_INDEXED = LOCATIONS.map.with_index { |x, i| [x, i] }.to_h
XX = [ # week 1 # 1st day of week, 8am [:work, 1, 8], [:tennis, 1, 17], [:home, 1, 20], [:work, 2, 8], [:home, 2, 18], [:work, 3, 8], [:tennis, 3, 17], [:home, 3, 20], [:work, 4, 8], [:home, 4, 18], [:work, 5, 8], [:home, 5, 18],
[:parents, 7, 13], [:home, 7, 18],
# week 2 [:work, 1, 8], [:home, 1, 18], [:work, 2, 8], [:home, 2, 18], [:work, 3, 8], [:tennis, 3, 17], [:home, 3, 20], [:work, 4, 8], [:home, 4, 18], [:work, 5, 8], [:home, 5, 18],
![Page 76: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/76.jpg)
XX.each do |destination, day, time| yy << LOCATIONS_INDEXED[destination] xx << [day.to_f/7, time.to_f/24]end
features scaling
![Page 77: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/77.jpg)
2 ➞ 25 ➞ 4one hidden layer with 25 units
![Page 78: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/78.jpg)
100% accuracyon training set
![Page 79: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/79.jpg)
[[1, 16.5], [1, 17], [1, 17.5], [1, 17.8],[2, 17], [2, 18.1],[4, 18],[6, 23],[7, 13],
].each do |day, time| res = nn.predict_with_probabilities([ [day.to_f/7, time.to_f/24] ]).first.
select {|v| v[0] > 0} # filter zero probabilities puts "#{day} #{time} \t #{res.map {|v| [LOCATIONS[v[1]], v[0]]}.inspect}"end
![Page 80: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/80.jpg)
1 16.5 [[:tennis , 0.97]] 1 17 [[:tennis , 0.86], [:home , 0.06]] 1 17.5 [[:home , 0.52], [:tennis, 0.49]] 1 17.8 [[:home , 0.82], [:tennis, 0.22]] 2 17 [[:tennis , 0.85], [:home , 0.06]] 2 18.1 [[:home , 0.95], [:tennis, 0.07]] 4 18 [[:home , 0.96], [:tennis, 0.08]] 6 23 [[:home , 1.00]]
[:work, 1, 8], [:tennis, 1, 17], [:home, 1, 20], [:work, 2, 8], [:home, 2, 18], [:work, 3, 8], [:tennis, 3, 17], [:home, 3, 20], [:work, 4, 8], [:home, 4, 18], [:work, 5, 8], [:home, 5, 18],
[:parents, 7, 13], [:home, 7, 18],
# week 2 [:work, 1, 8], [:home, 1, 18], [:work, 2, 8], [:home, 2, 18], [:work, 3, 8], [:tennis, 3, 17], [:home, 3, 20], [:work, 4, 8], [:home, 4, 18], [:work, 5, 8], [:home, 5, 18],
![Page 81: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/81.jpg)
borisnadion/suggested-destination-demoruby code of the demo
![Page 82: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/82.jpg)
tensorflowbut you will need to learn Python
![Page 83: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/83.jpg)
clusteringunsupervised learning
![Page 84: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/84.jpg)
{X(i)}no labels
![Page 85: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/85.jpg)
![Page 86: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/86.jpg)
anomaly detectionunsupervised learning
![Page 87: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/87.jpg)
![Page 88: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/88.jpg)
collaborative filteringunsupervised learning
![Page 89: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/89.jpg)
Jane Arthur John
Star Wars VII 5 5 1
Dr. Strange 5 5 ?
Arrival 5 ? 1
![Page 90: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/90.jpg)
automatic features and their weights detection
based on the user votes
![Page 91: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/91.jpg)
similarity between users and between items
![Page 92: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/92.jpg)
what to google
![Page 93: Machine Learning - Amazon S3...ML (machine learning) - is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed](https://reader030.vdocuments.site/reader030/viewer/2022011819/5e985e8b51556f60f349dc27/html5/thumbnails/93.jpg)
http://astrails.com