Machine Learning - Thinking Like Computers - Lecture Slides, Slides of Artificial Intelligence

During the course work of Thinking Like Computers, we study the key concept of artificial intelligence. The main points in these lecture slides are:Machine Learning, Observed Actions, Decision Tree, Classifiers, Different Predictions, Ockham’s Razor, Naïve Bayesian, Some Potential Problems, Overfitting, Redundant Attributes, Theory on Information Gain

Typology: Slides

2012/2013

Uploaded on 04/24/2013

banani
banani 🇮🇳

4.3

(3)

91 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
CSCI 100
Think Like Computers
Lecture 10
Fall 2008
Homework 2
1. Draw your own risk curve (i.e. Utility-EMV curve) to
determine your risk profile. Once you have your curve,
go to www.masslottery.com and study the 5 lottery
games (MegaMillions, CashWindfall, Megabucks,
MassCash, Numbers5) or any other lottery games and
verify that your risk profile correctly reflects your
willingness to play in each game.
Homework 2
2. More on Jackpot. Answer these questi ons based on
things we learned in this class.
Explain why more people are buy tickets when the
jackpot becomes bigger.
The jackpot has grown to $300 million. The chance of
winning the jackpot is 1/150 million. Should you play?
Why or why not.
When the jackpot is $300 million, should Bill Gates
play this game by buying all number combinations?
Will you participate in group buying? Say 100 people
each pay $1 and share the winning?
Homework 2
3. You are considering joining a poker game, but you
suspect there may be cheating going on. In fact, you
estimate that there is a 70% chance that the other
players are cheating. You are a good player, so you can
expect to win $300 if the other players are not cheating.
However, if the other players are cheating, you will lose
$100.
(a) Should you join the game?
(b) Now suppose that someone you trust offers to tell
you whether there is cheating going on or not. How
much would you be willing to pay for this information?
Homework 2
4. You are shopping for a home mortgage.
There are 4 banks (A,B,C,D) that you could go to, each will offer
you a deal, but you have to make a decision on the spot. (No
regrets.) Given any 2 offers, you can tell which one is better, but
you don’t know more than that.
Once you accept a deal, you’re bound to it (so no need to look
further).
Furthermore, you have to accept one offer (i.e. if you’ve rejected
all first three offers, then you have to accept the last one,
regardless its quality).
Decide your best shopping strategy. Draw a decision
tree that reflects your strategy, and calculate the
chances that you’ll end up with the best quality offer, 2nd
best, 2nd worst, and worst offer.
Machine Learning
It’s hard to come up with good strategies.
And it takes a lot of effort to encode/program
them.
Let machines learn!
From us … by themselves … or a mix
Example: NPC strategies
Docsity.com
pf3
pf4

Partial preview of the text

Download Machine Learning - Thinking Like Computers - Lecture Slides and more Slides Artificial Intelligence in PDF only on Docsity!

CSCI 100

Think Like Computers

Lecture 10

Fall 2008

Homework 2

    1. Draw your own risk curve (i.e. Utility-EMV curve) to determine your risk profile. Once you have your curve, go to www.masslottery.com and study the 5 lottery games (MegaMillions, CashWindfall, Megabucks, MassCash, Numbers5) or any other lottery games and verify that your risk profile correctly reflects your willingness to play in each game.

Homework 2

    1. More on Jackpot. Answer these questions based on things we learned in this class. Š Explain why more people are buy tickets when the jackpot becomes bigger. Š The jackpot has grown to $300 million. The chance of winning the jackpot is 1/150 million. Should you play? Why or why not. Š When the jackpot is $300 million, should Bill Gates play this game by buying all number combinations? Š Will you participate in group buying? Say 100 people each pay $1 and share the winning?

Homework 2

    1. You are considering joining a poker game, but you suspect there may be cheating going on. In fact, you estimate that there is a 70% chance that the other players are cheating. You are a good player, so you can expect to win $300 if the other players are not cheating. However, if the other players are cheating, you will lose $100.
  • (a) Should you join the game?
  • (b) Now suppose that someone you trust offers to tell you whether there is cheating going on or not. How much would you be willing to pay for this information?

Homework 2

    1. You are shopping for a home mortgage. Š There are 4 banks (A,B,C,D) that you could go to, each will offer you a deal, but you have to make a decision on the spot. (No regrets.) Given any 2 offers, you can tell which one is better, but you don’t know more than that. Š Once you accept a deal, you’re bound to it (so no need to look further). Š Furthermore, you have to accept one offer (i.e. if you’ve rejected all first three offers, then you have to accept the last one, regardless its quality).
  • Decide your best shopping strategy. Draw a decision tree that reflects your strategy, and calculate the chances that you’ll end up with the best quality offer, 2nd best, 2nd^ worst, and worst offer.

Machine Learning

  • It’s hard to come up with good strategies. Š And it takes a lot of effort to encode/program them.
  • Let machines learn! Š From us … by themselves … or a mix
  • Example: NPC strategies

Observed actions

  • Weapon Ammo Health Behavior

  • Gun Full Low Fight
  • Gun Low Full Evade
  • Knife Low Full Fight
  • Knife Low Low Evade

Your Strategy

  • If ((Weapon == Gun) AND (Ammo == Full)) Fight
  • Else if (( Weapon == Knife) AND (Health == Full)) Fight
  • Else Evade

Decision Tree

Ammo (^) Health

Fight Evade Fight

Weapon

Full (^) Low Low Evade

Gun Knife

Full

How do we learn?

  • Given a list of cases (training data) Š Attributes Æ action (decision)
  • To come up with a decision tree Š Attributes as internal nodes Š Action (decision) at the bottom
  • This is known as classifying Š A form of supervised learning

Classifiers

  • The classifier is based (trained) by the training data. Š A function maps attributes Æ decisions
  • What about un-trained cases? i.e. the cases that we haven’t seen before? Š We generalize!
  • Use the mapping function anyway – this is basically, “prediction”

Decision Trees are Not Unique

Ammo (^) Health

Fight Evade Fight

Weapon

Full (^) Low Low Evade

Gun Knife

Full

Some Potential Problems

  • What if one attribute value occurs 0 times Š The probability becomes 0 … Š There are some techniques to deal with this: add some small value to all values (like 1)
  • Missing values
  • Redundant attributes
  • Not a decision tree

Overfitting

  • Classifier algorithm finds meaningless “regularities” in the data
  • Think about using a decision tree to predict the roll of a die
  • Features may include color of the die, day of the week, weather, etc.