Professional Documents
Culture Documents
All right.
Now once we have a notion of a classifier,
we need to be able to evaluate how good that classifier is.
And we have seen two ways to measure
how good a classifier is, one that we have access
to the training error, and the other one that we really
want to minimize, which is the test error.
The training error was calculated by big E subscript
n--
refers to the number of examples that you are
using to calculate the error.
It's a function of any classifier.
I pick any classifier.
I can evaluate the training error for that classifier.
And it is the fraction of misclassified examples
on the training set.
So we take the fraction, divide by the number
of training samples.
Sum over the training samples.
And for each example, return plus 1
when there is a mistake, and 0, otherwise.
So we apply that classifier to the i-th training sample,
and compare it with the i-th label as
given in the training set, and ask whether this discrepancy
is true.
If it's true, then this returns 1 if there is an error in 0,
otherwise.
All right.
Test error is defined exactly similarly over the test
examples.
And now, we typically drop the n there,
assuming that the test set is relatively large,
and it can be measured in principle for any classifier.
So defined similarly to the training error,
but over a disjoint set of examples
those future examples that you actually wish to do well.
And much of machine learning, really, the theory part
is in relating how a classifier that
might do well on the training set
would also do well on the test set.
That's the problem called Generalization,
as we've already seen.
We can effect generalization by limiting the choices
that we have at the time of considering
minimizing the training error.
The choices that we have, the set of hypotheses,
set of alternatives, is also called the set of classifiers.
So our classifier here belongs to a set
of classifiers, capital H here, that's
not the set of all mappings.
It's a limited set of options that we constrain ourselves to.