Alright Michael. So like I said, we're going
to spend all this time trying to, to
unpack this particular equation. And the first thing
we need to do is we need to come
up with another form of it that we
might have some chance of actually understanding of
actually getting through. So I want to use
something called Bayes' rule. Do you remember Bayes' rule?
>> I do.
>> Okay, what's Bayes' Rule?
>> The man with the Bayes makes the
rule. Oh wait, no, that's the golden rule.
>> That's right, no.
>> The Bayes Rule, is, it relates, it, I
don't know. I think of it as just letting
you switch which thing is on which side of the bar.
>> Okay, so.
>> Do you want me to give the whole expression?
>> Yeah, give me the whole expression.
>> So if we're going to apply Bayes' Rule to the probability of h given D. We
can move, turn it around and make it equal to the probably of D given H. And it
would be great if we could just stop with
that, but we can't. We have to now kind
of put them in the same space. So, we
multiply by the probability of H, and then we
divide by the probability of D. And sometimes
that's just a normalization and we don't have
to worry about it too much. But that's,
that's the bay, that's Bayes' rule right there.
>> So this is Bayes' rule. And it actually is
really easy to derive. It falls it follows directly from
the chain rule in probability theory. Do you think it's
worthwhile? Showing people that or just they should just accept it.
>> Well, I mean, you could just, you might be able to just see it. Just,
the, the thing on top of the, the
normalization, the probability of D given h times probability
of h. That's actually the probability of D and
h together. Right. So the probability of h times the
probability of d over h as you say also the
chain rule basically the definition of conditional probability in conjunctions
and if you move the probability of d over
to the left hand side you can see we're really
just saying the same thing two different ways. It's just
the probability of h and d. So then we're done.
>> No, that's right. So I can write down
what you just said. And use different letters just
to make it more confusing, so
>> Oh good.
>> You can point out that the probability of A and B, by the chain rule, is
just the probability of A given B, times the
probability of B. But because order doesn't matter, it's
also the case that the probability of A and B. Is the probability of b given a
times the probability of a. And that's just the
chain rule. And so if these two quantities equal
to one another's exactly what you say, I could say
well, the probability of a given b is just the probability
of b given a times the probability a divided by the
probability of b. And that's exactly what we have over here.
>> Good. So now that we've mastered that
all your Bayes are belong to us. [LAUGH]
>> How long have you been saying that?
>> The...just, only about 3 or 4 minutes.
>> [LAUGH] Fair enough. Okay, so we have Bayes's rule. And what's really nice
about Bayes's rule is that while it's a very simple thing, it's
also true. It follows directly from probability theory. But more importantly for
machine learning, it gives us a handle to talk about. What it
is we're exactly trying to do when we say we're trying to
find the most probable hypothesis, given the data. So let's just take
a moment to think about what all these terms mean. We know
what this term here means. The, it's just the probability of some
hypothesis given the data. But what do all these other terms mean?
I want to start with this term, the probability of
the data. It's really nothing more than your prior belief of
seeing some particular set of data. Now, and as you point
out, Michael, often it just ends up to be a normalizing
term and typically does not matter, though we'll see a couple
of cases where it does matter, helps us to, to sort
of think about a few things. But generally speaking, whatever it
is Since the only thing that we care about is the
hypothesis, we're trying to find that, the
probability of the data doesn't depend on the
hypothesis, so typically we ignore it, but it's nice to just be clear about what
it means. The other terms are a bit more interesting. They matter a little bit
more. This term here, the probability is the
probability of the data given the hypothesis right?
>> Mm. Seems like learning backwards.
>> It does seem like learning backwards but
what's really nice about this quantity is that unlike
the other quantity, the probability of the hypothesis given the data, it's
actually, turns out to be pretty easy to think about the likelihood that
we would see some data given that we were in a world
where some hypothesis, h, is true. So there is a little bit of
subtlety there and I, let me, let me unpack that subtlety a
little bit. So we've been talking about the data if its sort of
a thing that is floating out in air, but we know that the
data is actually our training data. And it's a set of inputs and
let's just say for the sake of argument we are
going to do classification learning, it's a set of labels that
are associated with those inputs. So just to drive the
point home, I'm going to call those d's, little d's. And
so our data is made up of a bunch of
these training examples. And these training examples are whatever input that
we get coming from a teacher, coming from ourselves, coming
from nature, coming from somewhere and the associated label that goes
along with them. So when you talk about the probability of the data given
the hypothesis, what you're talking about, well,
what's the likelihood that. Given that I've
got all of these Xis and given that I'm living in a world where
this particular hypothesis that I would see
these particular labels. Does that make sense Michael?
>> I see. Yeah, so, so I can imagine a
more complicated kind of notation where, we're, we're kind of accepting
the Xs as given. But the labels is what we are
actually saying is something that we want to assigned probability to.
>> Right so its not really that the x's matter in the sense
that we are trying to understand those. What really mattes re the labels
that are associated with them. And we will see an example of that
in a moment. But I wanted to make sure that you get this subtled.
>> So in a sense then I guess you're saying that the probability of D given H
component, or, or quantity, is really like running
the hypothesis. It's like, It's like labeling the data.
>> Okay Michael, just to make sure we get this. Let's
imagine we're in a universe, where the following hypothesis is true. It
returns true, in exactly the cases where some input number X, is
greater than or equal to 10 And it returns false otherwise. Okay?
>> Yup.
>> Okay. So
here's a question for you. Let's say that our data was made up of exactly one
point. And that value set x equal to 7. Okay? What is
the probability that the label associated with 7. Would be true.
>> Huh. So you're saying we're in a world
where h is holding and that the h, h
is being used to generate labels. So it wouldn't
do that right? So, the probability ought to be zero.
>> That's
exactly right and what's the probability that it would
be false? 1 minus 0 [LAUGH] which we'll call 1.
>> Which we'll call 1. That's exactly right.
So it's, it's just that simple. That, the
probability of the data given the hypothesis, is
really about, given a set of x's, what's
the probability that I would see some particular
label. Now, what's nice about that is, is,
as you point out, is that, it's as
if we're running the hypothesis. Well, given a hypothesis,
it's really easy, or at least it's easier usually, to compute
the probability of us seeing some labels. So, this quantity is
a lot easier to figure out than the original quantity that
we're looking for. The probability of the hypothesis, given the data.
>> Yeah, I could see that. It's sort of reminding me a little
bit of the Version Space, but I can't quite crystallize what the connection is.
>> Well that's, it's good you bring that up. Because I, I think in a
couple of seconds I'll give you an example
that might really help you to see that. Okay?
>> Okay.