Press "Enter" to skip to content

GOTO 2017 • Machine Learning, Your First Steps • David Stibbe

welcome this obligatory slide so yeah
ask questions through the app and rate
the session thank you
we’re gonna talk about just machine
learning and your first steps into the
world of machine so if you already
involve the machine learning you might
as well leave because everything I’m
telling you you already know so my name
is Dave still I’m developer for kwinto
kwinto is an agile consultancy agency
which specializes in dotnet in Java you
can have Twitter me at my handle yeah
I’m a father of one little AI and
another one is on its way soon so today
we’re going to talk about intelligence
artificial challenges machine learning
how does relate to each other what
methods are used in this area how
machine learning is applied in everyday
life section and how to get started so
how to get yourself on your way
eventually so intelligence artificial
term is a machine learning let’s have a
quick introduction machine learning yeah
it sounds quite scary nobody really
knows what it is but it is very popular
in the media you see everywhere in
articles in newspapers machine learning
this machine learning that how do you
teach a driverless car to drive etc etc
and it’s also yeah you could find it on
Netflix for example most of you probably
already know but when you use a when a
few movies like Arrested Development it
usually gives a suggestion about well
you’ve seen Arrested Development’s they
must like Legally Blonde and Bob’s
Burgers and some other movies it doesn’t
just do these recommendations nearly
really it does it’s based on well
millions and millions of user inputs
from other accounts and using machine
learning to make these recommendations
other way well in which it participates
in real life is your mo
everyone has one for example your Google
assistants your katana your Alexa or
your Siri they’re all basically smart
digital assistants which are capable of
voice recognitions and capable of
parsing simple questions for example who
played James Bond in quantum solace
it’s capable of answering that it’s
Daniel crack but it was also capable of
answering is what other movies did he
play however this is a quite a more
complex question for simple fact that it
requires context for he refers to
previous results so it needs to know
what the previous results for were
before it can answer that question now
nowadays those digital agents are quite
capable of answering those questions and
also this is because of a copious amount
of machine learning intelligence what is
well most of you guys know this but it’s
basically the capability of reasoning
and solving problems artificial
intelligence is simulating this through
computers so a computer who’s capable of
reasoning and solving problems it’s a
big problem main and it’s divided in
several actually quite a few super mice
these are four of these just a subset
for example natural language processing
that’s the ability that you’re capable
of processing natural language by a
computer and it’s capable of
interpreting exactly what you say
knowledge representation would be the
problem main where you have to have a
computer resemble internally the
knowledge of a certain problem may for
example medical assistance it would have
to have a model internally from which
you can deduce solutions and problems
automated reasoning that means that
you’re capable of coming up with new
solutions or written solutions for
example for puzzles and also for comedy
questions for example if you’re at home
at work and Google of course know says
Google knows where you are and he notice
also there’s a Wi-Fi at home is in use
well Google should be able to do 2d
views well oh that is not supposed to
happen yes not at home
so it should be able to alert you and
inform you about these things but what
we’re gonna concentrate about on today
it’s machine learning machine learning
is the area where actually a machine is
capable of forming his own solutions to
problems a short history of machine
learning will be to start with the
Turing test the Turing test was devised
by Alan Turing in 1950 and capable
it’s basically where there’s an operator
sitting behind the screen and conversing
actually with someone on the other side
or screen and on the other side should
be a computer or a human and the idea is
that the computer should be able to fool
the human into believing that he is a
computer if he’s capable of doing that
then each part smart enough actually to
be called intelligent and well our
touring would that’s what I’m doing of
course a computer would deserve to be
called intelligent if could deceive a
human into believing there was human Oh
1952 we already had the first a I
application actually our to assemble
implemented the game engine actually AI
which was capable of playing checkers
using thousands of rheticus register
checker games and having the application
learn from those games
well fast-forward five 45 years to the
future or actually almost 20 years in
the past 1997 IBM deep blue defeated
Kasparov it was a big thing back then at
the time it was fought okay we made big
progress but for example the game of Go
which is much higher complexity it’s way
way in the future decades well there was
another big breakthrough actually in
2011 IBM Watson was capable after
defeating his opponents in jeopardy
jeopardy is basically a game quiz an
answer is given and a contestant has to
give the question that longs to that
answer and the difficulty is you have to
actually first know the context you have
to be able to formulate correct
sentences so all adjectives nouns
pronouns conjugations do you have to be
correct oh yeah I need to know what
you’re talking about
so it was an impressive feat however
even then go was still a long way well
actually it wasn’t in 2016 most of you
know google deepmind defeated go go
champion lee sedol
and actually did so four times against
one and actually now they already
retired it but basically there was a
breakthrough because in 2015 their
father would still be decades away so
it’s like having a flying car being able
for pre-order tomorrow it’s really
impressive how fast I went well there
was short introduction about history
what kind of intelligence do we have we
have considered weak AI a strong AI
strong AI usually means that you have
artificial generic
basically that means you have artificial
intelligence as a human level you’re
capable of reasoning of several problems
domains and you’re not stuck on only
checkers for example we on the other end
is really really specific it means that
the AI is basically of capable
performing one task for example checkers
or chess in this game so as we saw in
the history of AI there was suddenly a
big progress first was 45 years then
suddenly without within 17 years or
everything changed how was this possible
well the first thing will be big data
we’ve now such copious amounts of data
that were capable of actually training
these algorithms that we want to use for
AI this was actually in 1997 really
unimaginable that there will be Google
which is warehouses and warehouses and
warehouses of computers storing data
with cat pictures I don’t know and we
have big computer this basically means
that we have also large large data
centers of computing power cheap and
specialized another one less known fact
actually still advancing algorithms
so what’s it transmitting algorithms to
that when I studied in 1999 neural
networks were basically well nice but
not really feasible due to the fact that
it was slow it took a lot of computing
power and time to train such a model
however in 2006 there was this person
whose name I forgot sorry who actually
revolutionize a part of the training
mechanism in neural networking making it
possible actually to use neural
networking in 2010 this already was
redundant but it gave a new boost to
neural networks and making it possible
to actually use these the other one is
the fact that there are several
companies now heavily invested in
machine learning throwing big money
against it and really really putting
time and effort in it so these factors
combined is why AI is out of seven so
let’s just say the past seven years
making a really really strong return
machine learning how does machine
learning differ from normal programming
most you know but basically machine
learning it means that in regular
programming year data if you program if
they eat into computer you get output
basic machine learning it’s a little bit
different of course you have data give
it a certain output that you expect for
the data and the computer supposed to
produce a program that would solve that
problem for you so you’re not actually
doing everything by itself for example
well we have an apple FF orangish you
can’t really compare apples and oranges
but that’s right how would you
differentiate these well first of all I
I would think caller so well what if
it’s a grayscale image you would try
well if you add bananas well it would
have to add another exclusion another
exception etc etc try a French
eventually you get a whole bunch of code
which is actually I’m maintainable it
will never be actually fully covering
all areas of fruit so this is where
machine learning comes in yeah you train
it and it will come up with the answer
program itself so what matters of
machine learning you have where
supervised learning with unsupervised
learning ever
we have reinforcement learning
semi-supervised learning is basically a
1/2 a solution between supervised
learning and unsupervised learning we
will discuss each of these in the
conversation flight supervised learning
so what supervised learning supervised
learning means that you have a machine
learning algorithm which you feed input
and keep training it down at the input
each time you give input it will give a
prediction and then you tell it whether
the prediction of the label for example
is right or wrong based if it’s wrong it
was just this model I keep repeating
keep repeating it until the error is low
eventually well you extract the
classifier model from that machine
learning algorithm because that’s what’s
all about it put it in your program and
use it you give the input it will give a
prediction so what the main algorithms
used what it’s used for for supervised
learning classification and regression
classification actually means that let’s
say you have two features feature is
actually the best aspects of an input on
which you want to train the model so
feature 152 and it tries to classify
each one
and for regression is usually you have a
feature so I have value is an output
anyone to have it estimate which value
it might occur if you give it an input
to clarify this for classification for
example we have a data set of houses and
we’re going to classify kind of train
into a classification where is something
the house is cheap or house is expensive
so as input features we use living area
you use price and give it the trip you
keep training keep training and each
time it will tell it will give the house
of saying it’s cheap it’s expensive we
say now your fingers cheap but this
experience it was justice model
eventually we’ll have a model that can
separate houses based on the living area
and the price and determine yeah that’s
cheap that’s expensive regression on our
hand works a little different let’s say
we have the living area yes and the
corresponding prices I will keep telling
it just given the data what the idea is
then eventually it will have a function
that will actually match living area
with with the price if and if the model
we can give it just a living area and
will produce a price for us an
estimation of the expected price so
assured classification would label it
and a regression would try to estimate
actual value if there are any questions
do ask please well for this problem we
use neural networks usually you can do
it in other ways I’ve not seen it but
you could and their network is based on
the biological neuron it looks
schematically like this inputs foreigner
come through the dendrite so top left I
will go for the necklace and
it will give a signal based on the input
food axon to the axon terminals quite
basic in computer science you would
model it like this basically these are
all the inputs each input has certain
weight so important it was some the
weights times the input to make a
summation of step and then it will
determine whether or not it will output
the signal and how strong that signal
will be so that will be the activation
function well combining all these
networks you will get something like
this this is a free layered neural
network you get the input layer you have
the output layer every hidden layer it’s
called the hidden layer because nobody
sees hidden layer you only see the input
and output as a outside view and this is
fully connected to network so each
neuron is connected to each other never
to make this a little bit clearer I
would like to demonstrate this x-ray
through something called
tensorflow preyed playground all of you
have already played with this or see a
few hands well it’s really nice tool it
gives you an idea about how neural
networks work you play around with it
I created a match for spiral here but
let’s just it’s a very handy tool for
visualizing so you can determine here
whether it want to classify or regress
for this input we take the two
coordinates of each point so X 1 X 2 so
the x and y coordinate and we’re going
to Train it well don’t have any hit
liars there’s a nice separation we don’t
need hidden edge for this so let’s make
a little more complex
that’s my so you have four groups
basically she’s here
orange is here blue is there and blues
there let’s try to train it well it’s
not gonna match is it so we add a hidden
layer let’s see what it does you will
see that suddenly is this nice color up
basically the figure the line is the
bigger the weight if it’s blue is
positive if it’s orange is negative and
these blue white deficiency is here on
the neurons are basically the activation
functions a representation of the
activation function basically if you see
blue here it means everything that comes
in this area would be positive and the
rest will be nil so this is not gonna
work this separation so let’s add some
extra and try it again
so a few extra neurons and suddenly it’s
capable of really dividing and
classifying the output
so this is clear for everybody okay so
in deep learning deep learning actually
means nothing more than that you use a
neural network that is more than one lis
hidden layer nothing else so this is
deep ler deep neural network because
that’s free hidden layer this is an
example of how in short these layers
would represent each activation method
so let’s say you have an input layer
which is a picture the cashman are
categorized in cats and dogs will
influence the human face and each for
each pixel we input a nerve so let’s say
there’s an 18 by 18 pixel top it off I
wouldn’t know how much many notes it
would be but plenty in the inner layer
we get actually the edges first then
later on you’ll see that it’s a
combination of edges so the nose eyes
after that in later life later you see
the object models coming out a nice one
would also be online you can also find
the inception model the exception model
is an efficient model trained
pre-trained Fisher model from cool that
they released this can just use play
around with it’s quite complicated the
model itself it’s this big and they also
made a project someone it from Google
inception which actually showed you
shows actually all the layers and shows
you how this would look as we just shown
before on a real neural network so this
would be on the first level the
separators and if we look at the output
after the first layer I don’t know where
you can see but this is basically a heat
map of what is highlighted of the dog
that you saw previously
with regard to the edges so you can see
here be the shape of the dog here yeah
it’s interesting to see I would suggest
recommend what looking at by the way
this is a Python notebook many of you
probably have heard it in previous
sessions about it I would really
recommend using it because you maybe if
you smart mark or something this is
basically the same principle you can
just write text put in code that you can
reuse later it gets explained it gets
shown and it’s executable continuing so
there’s not just one neural network
architecture there are quite a few this
from the neural network is you and it
shows well that you really have to
consider what kind of architect you
would decide upon if you want to build
your own neural network so there are
several frameworks that already provide
trained models through an API train
while some through an API is some don’t
for example do Google Cloud machine
learning engine the IBM Watson machine
learning that’s fruit bluemix my
crewmate machine learning recently apple
also introduced around machine learning
for in your applications cafeteria to
has a whole model zoo which can download
and use but for first for actually
provide api city can directly using the
application IBM watson was by the way a
byproduct of IBM watson of course after
day did the Jeopardy faying they had a
very nice answer a question question
answer mechanism but also learned a
whole lot and gave the profiles of api
for the public so like they have a
fishing api Oh
voice recognition API well the same goes
for Google Cloud and all the others but
it’s very nice you can play for example
for google you can play around with the
fishing api you can just well let’s just
take my daughter for example it’s very
nice so you can just
upload it tip tip and will detect
actually everything let’s show you it
will say she’s neat I don’t have no idea
what her emotions are not join the Sora
no anger no surprised she’s like numb
emotionless apparently yeah she is
apparently a person infant child skin
and for some reason Google thinks is day
though most of you probably see it’s
night inside lights on so it’s very nice
you can just get an account for free
it’s very fun to play with
and you can just call through REST API
from your programs
alright that was supervised learning
unsupervised learning there basically
means the opposite of supervised
learning of course what this mean is
basically I have a bunch of data I’ve no
idea how the structure it might be I
have a machine learning algorithm I just
give it to the algorithm and say ok you
try to sort this out I’ll come back
later and after you’ve done that you
have a classifier model it can give
input and we’ll give you more or less
where he expects your input to belong to
so they’re mainly free algorithms that
are used for this clustering when you’ve
tried to find similar instances so these
are the instances these would be feature
showed aspects that you put into it and
here is she okay these free instances
have the same features these belong to
each other together anomaly detection
well everything here would be white and
there’s just one entry which is
completely different than the rest
Association discovery that’s and when
you basically see okay for example these
free instances have feature from the
second column but they also have all
features from the fourth column well an
example from practice will be let’s say
from food web shop and you notice
everyone who buys
buns and salad also seems to buy burgers
there will be Association discovery so
when someone buy sell it and buns yeah
there might be some burgers in force for
clustering by the way it’s means that
you don’t change the data set or you
don’t go grouping it but basically you
try to find where the clusters are so
this is basically an example k-means
clustering means you have before you
start you to say okay I want to find
three clusters
that’s the K free and I’m gonna start at
random I just point here there and there
and then we’re going to try to shift
those mean points of the clusters the
center points of the clusters until the
distances of points become minimized and
keep iterating that until there are no
changes so keep shifting the mean points
those are these tilt found the best
solution for free clusters the downside
is you would have to know that it’s free
clusters in advance that’s a bit of the
– well we also did it a quinta for too
much we offer products products by
customer profile so we also did
clustering basic category manufacturer
postal code and eventually we were
capable of actually making product
suggestions based on what they were
searching for so for example there was a
probability of 0 90 percent that product
ID 11 807 which is SES plus drill set
would should be recommended
so okay that was supervised learning
with unsupervised learning and now this
reinforcement learning what is
reinforcement learning that’s when you
have an algorithm they can perform
certain actions for example game you can
go left
you can’t go right maybe sure each
action has an effect on the world and as
a return you get a reward increasing
score for example and get a new status
you moved right you’re about that same
position where you were before well a
nice example is actually this game it’s
a brick most of you know right break out
it’s an Atari game and it was actually
used by deepmind before they get to
train their models using reinforcement
learning it’s also one of the reasons
Google bottom like this so well awesome
yeah ok so basically they just took two
pics or social scream its input and
score that’s all that was input for the
model nothing else just the score and a
pixels and he knew what what he had to
do left or right but okay it starts
training minutes of training
Leslie sucks at it so you see man
sometimes he does hit the ball by
coincidence but yeah it’s not very very
proficient but after two hours played
like an expert so he had no problems so
he’s pretty good I would have problems
beating him
yeah the reward change is basically the
model it’s based on this Markov decision
process and I’ll get back to that in a
second after two hours actually
something special happens he finds out
that there’s even better way to score
points basically by tunneling which was
see in a second so it’s pretty good so
yeah basically someone yeah he update
this model by basically by the rewards
he gets so try game of the game of the
game of the game and he makes a decision
tree basically and each decision he
makes has a certain probability for
certain reward and it tries keeps
updating it based on experience and
eventually it does pretty well and
deepmind is for all kinds of Atari games
and actually showed it as basically a
possibility for generic intelligence
there for the fact that there was no
domain knowledge previously involved it
was capable of solving several a fairy
stars for all kinds of Atari games but
there’s also yeah you could say it’s
subset of reinforcement learning
it’s called genetic algorithms most if
you’ve heard about it basically it
doesn’t it’s it’s a little bit different
here you take one model and keep
training that genetic algorithm works a
little bit different there’s a nice
example on the internet not this one yep
I wonder how he trained by the way
anyway this is an example for genetic
algorithm Walker basically well it does
every generation he froze had 10 models
there’s based on how far someone can get
so how much reward he gets in one model
one run it determines who lives and dies
and who may reproduce so for example
I’ve configured this one from champions
to copy to if you see it there so only
you win the game in your first two
positions you just go on to the next
round and the rest of them either get
killed off or are being crossed over
so basically properties from one mole
will be combined with crops to other
models and thus optimizing or make it in
good worse depends and each time you
keep going on and on and on and then
keep track of the optimal scores so also
there are a lot of algorithms to choose
from so it’s really important to have a
grasp on what you want to solve how you
want to solve it and what you need to
solve it so how is it applied in
everyday life in short you can see
several applications already running
with it where the forecast for Amsterdam
there’s a filtration system that
actually can predict whether or not
something is going to fill or something
needs attention automatic translation so
this is actually several problems in
one’s one so you have image recognition
Dave in translation they have to be well
we display that translation on the image
again so and this is actually cancer
detection so on a very low level
determining what’s probability that
something may be out of place spam
filters of course and a test lock car so
how would you get started so I’m gonna
be very short but there’s basically two
ways to get start it is just used to pre
train models like the fishing API I just
show just use it in your application and
well don’t reinvent the wheel for simple
facts yeah there are people out there
that did it before you and you probably
are not going to do it much better so as
I mentioned before there’s a Google
Cloud ml IBM bluemix microfiche or etc
etc or you can build your own and tweak
with your own but
then I would suggest first of all learn
Python yes you can use most libraries
with Java Scala I love those but
basically the data science and machine
learning areas everything is Python so
every example you’ll see is bite and
every notebook you’ll see spied so at
the beginning just learn Python and if
you’re comfortable enough with
everything maybe then move on to another
one other language in subtitle notebook
really install it and try to online guys
there plenty of them they’re very good
and you will be fool if you don’t use it
well for example machine learning
libraries that you could use if you want
to do it on your own are tensorflow
actually TF learn or Kara’s torch which
is newer
Tianna peyten deep learning for J’s
someone did do it
Java and cough it to for enter several
others but these are the memos for those
who are wondering really what is ten
flow in the basics isn’t graph based
calculation framework so the libraries
on top of its support machine learning
but in essence is a graph based
calculation framework which optimizes
for parallelization and other things
like running on the CPU keep you GPU
parallelization or several processes etc
well also not if anyone saw the talk
yesterday about the data analysis yeah
it is a very important aspect first of
all you want to frame the problem I
didn’t find what you want to solve for
example with the housing data yeah what
do you want to solve do you really want
to know the prices or just you not want
to know how expensive is it expensive or
cheap so you have to adjust the data as
cleaning up filter it and adjust it
where I need you need to look at a
bigger picture basically what’s gonna
come before and what’s coming after your
so the reason why I predict housing
prices is not because you’re such a fan
of houses we usually usually usually
it’s because there’s another process
after you which really needs that
information well third point check your
assumptions because you have those and
they’re usually wrong and visualized
again in the pie to notebook if you have
an ID form model if you have an idea of
how the data says you do if you think
your machine learning should work
visualize it
visualize every steps see how it outputs
not don’t put it in your application at
once the future of AI well as I saw it
went quite rapidly last few years so
rapid that’s unimaginable actually for
example this is the police agent from –
by 2030 Dubai is intending to have I
believe 50% of police force replaced by
these things
however it’s no more than a walk-in
kiosk at the moment on the other hand we
have Boston Dynamics which is actually
military ex-military contract from
Google and these are no jokes and
another thing about what Google recently
released it for example two papers
relational networks so these are special
networks that want we have plug ball in
neural networks which we want to use to
answer question like this there’s a tiny
rubber fing there’s the same color it’s
a large cylinder what shape is it so
tiny rubber feet the same color is this
big thing so for us it’s already a few
steps and actually they prove that they
were capable of answering this question
with quite better than human proficiency
so yeah we can’t expect a lot more in
the near future
regarding this so here’s some resources
also that you really should check out I
really would suggest look look another
one good hands-on is actually this one
or real alien zero
I probably pronounced it wrong but II
wrote a whole book put this whole all
these notebooks online on get up and
give you really a good introduction into
data science side kid tends to flow all
those things it will take time but sorry
it’s also the O’Reilly book he published
a Riley book yeah the sidekick I don’t
know remember the tank yes I don’t know
what he said introduction but basically
yes I can tell flow is this big thick
it’s a good read no yes and the slides
really represent this book as well so
it’s really really important to look at
this if you want so these are some other
miscellaneous sources imagenet this is
for example research for all kinds of
images and computation basically to
check how good your facial recognition
is immature canadian-ish open AI is a
well platform promotion open AI and they
also have an open-air gym for competing
for several problems and what I just
showed you is a genetic algorithm well
walkers which is basically simple
genetic fun any questions
Please follow and like us:

Be First to Comment

Leave a Reply