it is time to set our goals and
introduce the framework we will use
creating a machine learning algorithm
ultimately means building a model that
outputs correct information given that
we've provided input data for now think
of this model as a black box
we feed input and it delivers an output
for instance we may want to create a
model that predicts the weather tomorrow
given meteorological information for the
past few days the input will feed to the
model could be metrics such as
temperature humidity and precipitation
the output we will obtain would be the
weather forecast for tomorrow now before
we get comfortable and confident about
the models output we must train the
model training is a central concept in
machine learning as this is the process
through which the model learns how to
make sense of the input data once we
have trained our model we can simply
feed it with data and obtain an output
all right the basic logic behind
training an algorithm involves four
ingredients data model objective
function and an optimization algorithm
let's explore each of them first we must
prepare a certain amount of data to
train with usually this is historical
data which is readily available second
we need a model the simplest model we
can train is a linear model in the
weather forecast example that would mean
to find some coefficients multiply each
variable with them and some everything
to get the output as we will see later
though the linear model is just the tip
of the iceberg stepping on the linear
model deep machine learning lets us
create complicated nonlinear models they
usually fit the data much better than a
simple linear relationship awesome the
third ingredient is the objective
function so far we took data fit it to
the model and obtained an output of
course we want this output to be as
close to reality as possible that's
where the objective function comes in it
estimates how correct the models outputs
are on average the entire machine
learning framework boils down to
optimizing this function for example if
our
function is measuring the prediction
error of the model we would want to
minimize this error or in other words
minimize the objective function okay our
final ingredient is the optimization
algorithm it consists of the mechanics
through which we vary the parameters of
the model to optimize the objective
function for instance if our weather
forecast model is weather tomorrow
equals w1 times temperature plus W 2
times humidity the optimization
algorithm may go through values like
1.05 times temperature plus 1.2 times
humidity or 1.05 times temperature minus
1.2 times humidity or 1.04 times
temperature minus one point one nine
times humidity and so on W 1 and W 2 are
the parameters that will change for each
set of parameters we would calculate the
objective function then we would choose
the model with the highest predictive
power how do we know which one is the
best well it would be the one with an
optimal objective function wouldn't it
all right great
later we'll reiterate what we've said
here because there will be separate
lessons for the ingredients of an
algorithm
did you notice we said 4 ingredients
instead of saying 4 steps this is
intentional as the machine learning
process is iterative
we feed data into the model and compare
the accuracy through the objective
function then we varied the models
parameters and repeat the operation when
we reach a point after which we can no
longer optimize or we don't need to we
would stop since we would have found a
good enough solution to our problem
in this section we look at each of the
basic building blocks in more detail at
the end we will conclude by creating our
first machine learning algorithm sounds
exciting well it definitely is thanks
for watching