



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




This section of the notes will discuss ways of quantifying the performance of various learning algorithms. It will be possible, then, to say something rigorous about performance and work towards determining which learning algorithm is best for a given task. This section will concentrate on discussing the number of examples that are needed in order to claim that our learned hypothesis is good.
Assume that there is a hidden conjunction which you, the learner, want to learn. How many examples are needed in order to learn it? How is it learned from these examples? For example, assume that the hidden conjunction is:
f = x 2 ∧ x 3 ∧ x 4 ∧ x 5 ∧ x 100
This section will discuss learning the conjunction with three different learning protocols.
In the first learning protocol, the learner proposes instances as queries to the teacher. Assume we know we are after a monotone conjunction, so the possible
Table 1: Queries for Protocol I Query Example Valuation Conclusion Is x 100 in? < (1, 1 , 1 ,... , 1 , 0),? > f (x) = 0 Yes Is x 99 in? < (1, 1 ,... , 1 , 0 , 1),? > f (x) = 1 No
... Is x 1 in? < (0, 1 ,... , 1 , 1 , 1),? > f (x) = 1 No
terms are the variables x 1 through x 100 and not their negations. A straightforward algorithm requires n = 100 queries, and it will produce the hidden conjunction exactly as a result: The final result of the queries is that h = x 2 ∧x 3 ∧x 4 ∧x 5 ∧x 100. This algorithm gets the right function for the data, but it requires a query for each variable.
In the second protocol, the teacher knows what the hidden function is and provides training examples to the learner. The teacher gives the learner a superset of the positive examples from which implications can be made. Then each variable that is in the hidden function is shown to be important. For example, the learner has the hypothesis < (0, 1 , 1 , 1 , 1 , 0 ,... , 0 , 1), 1 >, which is a superset of the good variables. In order for the teacher to show that each and only the variables in the hidden conjunction are needed, negative examples are provided. For example:
Table 2: Queries for Protocol II Example Needed Variable < (0, 0 , 1 , 1 , 1 , 0 ,... , 0 , 1), 0 > x 2 < (0, 1 , 0 , 1 , 1 , 0 ,... , 0 , 1), 0 > x 3
... < (0, 1 , 1 , 1 , 1 , 0 ,... , 0 , 0), 0 > x 100
Model Teaching is tricky because it involves choosing the right examples needed to get the learner to make accurate inferences. A straightforward al- gorithm requires k = 6 examples to produce the hidden conjunction exactly. f = x 2 ∧ x 3 ∧ x 4 ∧ x 5 ∧ x 100
h = x 1 ∧ x 2 ∧ x 3 ∧ x 4 ∧ x 5 ∧ x 100 Most of the work that will be covered in these notes uses the third protocol: Some source gives the data, the teacher gives the label, and the learning problem is to find a hypothesis for the labels.
3 On-line Learning
On-Line learning constitutes a different approach to the learning problem. In order to understand the motivation for On-line Learning, consider a learning problem in a very high dimensional space.
{x 1 , x 2 , x 3 ,... , x 1 , 000 , 000 }
And assume that the function space is very sparse, so that every function of interest depends on a small number of attributes. For example:
f = x 2 ∧ x 3 ∧ x 4 ∧ x 5 ∧ x 100
An example of such a domain is context sensitive spelling. For example, if all of the words of a sentence are considered to be features, the space is very large. In this space, only one word per sentence will represent the target concept and only a few of the words in the sentence will be relevant for disambiguation.
Middle Eastern deserts are known for their sweetness
The question is, can we develop an algorithm that depends only weakly on the space dimensionality and mostly on the number of relevant attributes? If so, how should the hypothesis be represented? The goal it to find a simple and intuitive model that makes the smallest number of mistakes in the long run. The basic model for On-line Learning is below:
Model:
Instance space: X (dimensionality − n)
Target: f : X → { 0 , 1 }, f ∈ C (where C is a concept class parameterized by n)
Protocol: learner is given x ∈ X
learner predicts h(x), and is then given f (x) as feedback
Performance: learner makes a mistake when h(x) 6 = f (x)
Some definitions used in the following algorithms are:
MA(f, S) is the number of mistakes algorithm A makes on sequence S of exam- ples, for the target function f.
MA(C) = maxf ∈C,S MA(f, S)
A is a mistake bound algorithm for the concept class C, if MA(C) is polynomial in n, the complexity parameter of the target concept.
We could ask how many mistakes do we need to get to − δ PAC behaviour.^1 But, instead, we are looking for exact learning which is easier to analyze. In a worst-case model, there is no notion of distribution. In order to improve memory, we can get an example, update the hypothesis, then get rid of it. But there are drawbacks to this approach. First, it is too simple. Also, the behaviour is global, and it is not clear when the mistakes will be made. The advantage, however, is that it is simple. Many issues arise already in this setting. It is possible to do generic conversion to other learning models. In addition to this, it is equivalent to PAC for ‘natural’ problems.
This section will present a generic algorithm that sets a bound on the number of mistakes. The CON algorithm
Let C be a concept class. Learn f ∈ C CON: In the ith stage of the algorithm: For Ci, all concepts in C consistent with all i − 1 previously seen examples Choose randomly fi ∈ Ci and use it to predict the next example (^1) PAC will be described in 05-Lec.
The algorithm learns from negative examples and eliminates the literals which are active in negative examples. For k − disjunctions : Assume that only k << n attributes occur in the disjunction. The number of k-disjunctions is: 2 kC(n, k) ≈ 2 knk. In this case, log(|C|) = klog(n). Is it possible to learn efficiently with this number of mistakes? T heorem :
Given a sample on n attributes that is consistent with a disjunctive concept, it is NP-hard to find a pure disjunctive hypothesis that is both consistent with the sample and has the minimum number of attributes.
The same theorem holds for Conjunctions. The intuition is that the problem can be reduced to a minimum set cover problem. Given a collection of sets that cover X, define a set of examples so that learning the best disjunction implies a minimal cover. Consequently, we can not learn the concept efficiently as a disjunction. In the later notes, we will see that it is possible, however, to learn the concept efficiently as a Linear Threshold Function.