1 of 43

CS307

Machine Learning

Lecture 2

Feasibility of Learning

Krishnendu Ghosh

Department of Computer Science & Engineering

Indian Institute of Information Technology Dharwad

​

Source: Slide 2 from Tom Mitchell

2 of 43

2

3 of 43

3

4 of 43

4

5 of 43

5

6 of 43

6

7 of 43

7

8 of 43

8

9 of 43

9

10 of 43

10

11 of 43

11

12 of 43

12

13 of 43

13

14 of 43

14

15 of 43

15

16 of 43

Questions to think about

  • ID3 and C4.5 are heuristic algorithms that search through the space of decision trees. Why not just do an exhaustive search?
  • Consider target function f: <x1,x2> y, where x1 and x2 are real-valued, y is boolean. What is the set of decision surfaces describable with decision trees that use each attribute at most once?
  • Why use Information Gain to select attributes in decision trees? What other criteria seem reasonable, and what are the tradeoffs in making this choice?

16

17 of 43

Basic Premise of Learning

using a set of observations to uncover an underlying process

broad premise ⇒ many variations

• Supervised Learning

• Unsupervised Learning

• Reinforcement Learning

17

18 of 43

Supervised Learning

Example from vending machines coin recognition

18

19 of 43

Unsupervised Learning

Instead of (input,correct output), we get (input, ? ) Mass

19

20 of 43

Reinforcement Learning

Instead of (input,correct output),

we get (input,some output,grade for this output)

​

20

21 of 43

A Learning Puzzle

21

22 of 43

Probability Overview

  • Events
    • discrete random variables, continuous random variables, compound events
  • Axioms of probability
    • What defines a reasonable theory of uncertainty
  • Independent events
  • Conditional probabilities
  • Bayes rule and beliefs
  • Joint probability distribution
  • Expectations
  • Independence, Conditional independence

22

23 of 43

Random Variables

  • Informally, A is a random variable if
    • A denotes something about which we are uncertain
    • perhaps the outcome of a randomized experiment
  • Examples
    • A = True if a randomly drawn person from our class is female
    • A = The hometown of a randomly drawn person from our class
    • A = True if two randomly drawn persons from our class have same birthday
  • Define P(A) as “the fraction of possible worlds in which A is true” or “the fraction of times A holds, in repeated runs of the random experiment”
    • the set of possible worlds is called the sample space, S
    • A random variable A is a function defined over S
    • A: S {0,1}

23

24 of 43

A little formalism

More formally, we have

  • a sample space S (e.g., set of students in our class)
    • aka the set of possible worlds
  • a random variable is a function defined over the sample
  • space
    • Gender: S { m, f }
    • Height: S Reals
  • an event is a subset of S
    • e.g., the subset of S for which Gender=f
    • e.g., the subset of S for which (Gender=m) AND (eyeColor=blue)
  • we’re often interested in probabilities of specific events
  • and of specific events conditioned on other specific events

24

25 of 43

Visualizing A

25

26 of 43

The Axioms of Probability

  • 0 <= P(A) <= 1
  • P(True) = 1
  • P(False) = 0
  • P(A or B) = P(A) + P(B) - P(A and B)

26

27 of 43

The Axioms of Probability

  • 0 <= P(A) <= 1
  • P(True) = 1
  • P(False) = 0
  • P(A or B) = P(A) + P(B) - P(A and B)

[di Finetti 1931]:

when gambling based on “uncertainty formalism A” you can be exploited by an opponent

iff

your uncertainty formalism A violates these axioms

27

28 of 43

Interpreting the axioms

  • 0 <= P(A) <= 1
  • P(True) = 1
  • P(False) = 0
  • P(A or B) = P(A) + P(B) - P(A and B)

28

29 of 43

Interpreting the axioms

  • 0 <= P(A) <= 1
  • P(True) = 1
  • P(False) = 0
  • P(A or B) = P(A) + P(B) - P(A and B)

29

30 of 43

The Axioms of Probability

  • 0 <= P(A) <= 1
  • P(True) = 1
  • P(False) = 0
  • P(A or B) = P(A) + P(B) - P(A and B)

30

31 of 43

Theorems from the Axioms

0 <= P(A) <= 1, P(True) = 1, P(False) = 0

P(A or B) = P(A) + P(B) - P(A and B)

P(not A) = P(~A) = 1-P(A)

31

32 of 43

Theorems from the Axioms

0 <= P(A) <= 1, P(True) = 1, P(False) = 0

P(A or B) = P(A) + P(B) - P(A and B)

P(not A) = P(~A) = 1-P(A)

32

33 of 43

Elementary Probability in Pictures

​

P(~A) + P(A) = 1

33

34 of 43

Another useful theorem

0 <= P(A) <= 1, P(True) = 1, P(False) = 0,

P(A or B) = P(A) + P(B) - P(A and B)

P(A) = P(A ^ B) + P(A ^ ~B)

A = A and (B or ~B) = (A and B) or (A and ~B)

P(A) = P(A and B) + P(A and ~B) – P((A and B) and (A and ~B))

P(A) = P(A and B) + P(A and ~B) – P(A and A and B and ~B)

34

35 of 43

Elementary Probability in Pictures

P(A) = P(A ^ B) + P(A ^ ~B)

35

36 of 43

Multivalued Discrete Random Variables

Suppose A can take on more than 2 values

A is a random variable with arity k if it can take on exactly one value out of {v1, v2, ... , vk}

Thus

P(A=vi ∧ A=vj) = 0 if i ≠ j

P(A=v1 ∨ A=v1 ∨ … ∨ A=vk ) = 1

​

36

37 of 43

Elementary Probability in Pictures

37

38 of 43

Definition of Conditional Probability

P(A|B) = P(A ^ B) / P(B)

Corollary: The Chain Rule

P(A ^ B) = P(A|B) P(B)

​

38

39 of 43

Conditional Probability in Pictures

P(B|A=2)

39

40 of 43

Independent Events

Definition:

two events A and B are independent if Pr(A and B)=Pr(A)*Pr(B)

Intuition:

knowing A tells us nothing about the value of B (and vice versa)

​

40

41 of 43

Other Forms of Bayes Rule

41

42 of 43

You should know

  • Events
    • discrete random variables, continuous random variables, compound events
  • Axioms of probability
    • What defines a reasonable theory of uncertainty
  • Independent events
  • Conditional probabilities
  • Bayes rule and beliefs

42

43 of 43

Thank You

43