CSCI 5582 Artificial Intelligence
description
Transcript of CSCI 5582 Artificial Intelligence
![Page 1: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/1.jpg)
CSCI 5582 Fall 2006
CSCI 5582Artificial
IntelligenceLecture 28Jim Martin
![Page 2: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/2.jpg)
CSCI 5582 Fall 2006
HW 3
• On the first set the average accuracy was 87% with 11 submissions at 100%.
• On the second set the average accuracy was 76% with 2 submissions getting 100%– One of those was a rule-based approach
•With basically 1 simple rule and a variant on it.
![Page 3: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/3.jpg)
CSCI 5582 Fall 2006
Final Details
• Monday, 1:30PM, here. It will be 2 ½ hours. – Come on time, spread out, bring a calculator, don’t bring the rest of all your worldly belongings, probably ought to use a pencil and eraser.
![Page 4: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/4.jpg)
CSCI 5582 Fall 2006
Today 12/14
• Final Review
![Page 5: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/5.jpg)
CSCI 5582 Fall 2006
Final Topics
• Search• Representation• Uncertainty• Machine Learning• Language Processing
![Page 6: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/6.jpg)
CSCI 5582 Fall 2006
Meta Topics
• There are connections among all the topics. Search, representation, probability and learning are all intertwined.
• I may ask questions that make you make connections
![Page 7: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/7.jpg)
CSCI 5582 Fall 2006
Final
• Each section will have a similar structure to the quizzes. Easy factual stuff, followed by a couple of problems to work out that demonstrate understanding.
![Page 8: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/8.jpg)
CSCI 5582 Fall 2006
Final
• Material that I asked you to prepare for but was not covered on a quiz is fair game.
![Page 9: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/9.jpg)
CSCI 5582 Fall 2006
Final
• General Hints:– I will never ask a question that requires you to transcribe an algorithm. If you find yourself doing that you should stop and re-read the question.
– You do however need to know (understand, grok, grasp) the algorithms to answer questions about them.
![Page 10: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/10.jpg)
CSCI 5582 Fall 2006
Final Hints: Example
• What kind of search is the DT learning algorithm?
• Is it optimal? Why?• Is Neural Net learning a search?
• How does the choice of k in k-dl lists effect the likelihood of the DL learning algorithm finding a reasonable list.
![Page 11: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/11.jpg)
CSCI 5582 Fall 2006
Final Hints
• Some of you should really consider pencil (and an eraser).
• You should bring a calculator if it makes you feel better– Arithmetic errors that arise in computing the right thing won’t hurt you (much)
– Exact answers to the wrong thing will
![Page 12: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/12.jpg)
CSCI 5582 Fall 2006
Search
• State-space search• Optimization/iterative improvement
• Constraint-based search
![Page 13: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/13.jpg)
CSCI 5582 Fall 2006
State-Space Search
• Basic algorithms• A*• IDA*
• How they relate to each other
![Page 14: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/14.jpg)
CSCI 5582 Fall 2006
Optimization
• Annealing, hill-climbing, random restart hill-climbing.
• The nature of the states, the problems you run into and how annealing or random-restart address the problems.
![Page 15: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/15.jpg)
CSCI 5582 Fall 2006
Constraint-Based Searches
• What’s a constraint? What’s a problem?
• Backtracking methods• Min-conflict/satisfiability methods
• What’s the connection between satisfiability and propositional logic?
![Page 16: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/16.jpg)
CSCI 5582 Fall 2006
Representation and Reasoning
• Propositional logic and reasoning with it.
• First order logic and reasoning with it.
![Page 17: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/17.jpg)
CSCI 5582 Fall 2006
Propositional Logic
• Syntax and Semantics• Proving stuff• Wumpus world
![Page 18: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/18.jpg)
CSCI 5582 Fall 2006
First Order Logic
• Focus here will be on representing stuff of interest rather than on proving things.
• Although that doesn’t mean I won’t give a simple backward or forward chaining example
![Page 19: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/19.jpg)
CSCI 5582 Fall 2006
Representation and Reasoning Hints
• If I say use Propositional Logic, use Propositional Logic.
• If I ask what does the agent know at some point in time, show me the strongest thing you can say.
• If I give a problem to solve using logic, then I want you to show how a machine could solve it mechanically. Not that you as a human can figure it out.
![Page 20: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/20.jpg)
CSCI 5582 Fall 2006
Hints
• That technique you can’t remember the name of is called Resolution.
• You can’t just randomly re-order ands and ors until you get something you like.
![Page 21: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/21.jpg)
CSCI 5582 Fall 2006
Example
• You know1. A2. A->B^C3. C->D
Prove D
• MP with 1&2 produces (4) B^C
• AE on 4 produces
(5) B and (6) C• MP with 3&6 produces D. Done.
![Page 22: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/22.jpg)
CSCI 5582 Fall 2006
Wumpus World
• Or something like it.– Rules are either given or you know them
– B11 -> Pit1,2 or Pit2,1 etc
• Agent moves from here to there, and detects this and that, what do you know.
![Page 23: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/23.jpg)
CSCI 5582 Fall 2006
Uncertainty
• Basic probability material• Bayesian reasoning• Bayesian belief nets• Hidden Markov models• Naïve Bayes classification
– How they all connect
![Page 24: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/24.jpg)
CSCI 5582 Fall 2006
Basic Material
• Basic syntax, semantics and definitions.
• Memorize the definition of a conditional probability– P(A|B) = P(A^B)/P(B)
![Page 25: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/25.jpg)
CSCI 5582 Fall 2006
Basic Material
• Argmax P(X|Y) where choosing X means choosing the right X from some set of choices (diseases, classes, tags, words, whatever)
• Using Bayes when the data for P(X|Y) can’t be gotten.
![Page 26: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/26.jpg)
CSCI 5582 Fall 2006
Basic Material
• For Bayesian diagnosis questions, there’s a query about some state of affairs and there’s evidence…
P(State|E) = P(E|State)P(State)/P(E)
![Page 27: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/27.jpg)
CSCI 5582 Fall 2006
Bayesian Belief Nets
• Syntax and semantics• It’s a way of encoding the joint probability distribution of the variables in the network.
• The entries are based on the shape of the network.
• The network can only directly answer questions concerning the conjunctive status of all the variables in the network
![Page 28: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/28.jpg)
CSCI 5582 Fall 2006
BBN Examples
1. Think about what the question is asking: is there evidence or not?
2. Formulate the question as a probability to be assessed.
3. Ask yourself if this is the kind of probability that the belief net can answer directly or is it something that requires multiple queries?
![Page 29: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/29.jpg)
CSCI 5582 Fall 2006
BBN Examples
• For example, I give you some evidence e, and ask you about a variable q, given some network. – That’s P(q|e) with the network in the background
– The belief net can’t answer that directly
– But you can re-write it as a ratio•P(q^e)/P(e)
![Page 30: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/30.jpg)
CSCI 5582 Fall 2006
BBN Examples
• But it probably can’t answer that either.– It can answer questions about conjunctive states of ALL the variables.•P(q^e^ configurations of the remaining vars)
•Same for P(e)•You sum the non-overlapping configurations.
![Page 31: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/31.jpg)
CSCI 5582 Fall 2006
Belief Revision
• There is often a question that goes like this:– Here’s a fact. What should you believe about variable X now.
– Here’s another fact. Now what do you believe about X
• These questions are cumulative. You know the first fact, and then the first fact AND the second fact.
![Page 32: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/32.jpg)
CSCI 5582 Fall 2006
Hint• We talked about basics of probability, diagnosis (stiff necks), naïve Bayes, Markov assumptions, and then belief nets
• They’re all related… belief nets capture conditional independence assumptions; naïve Bayes and Markov models are based on independence assumptions.
![Page 33: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/33.jpg)
CSCI 5582 Fall 2006
Machine Learning
• Mainly on supervised machine learning– Organization of training– Kinds of learning and things learned
•Trees, lists, etc
– Meta-issues: where does the hypothesis space come from, what effect does the size of the space have on learning?
– Boosting
![Page 34: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/34.jpg)
CSCI 5582 Fall 2006
Decision Trees
• Definitions of trees• How they work• How they’re learned
![Page 35: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/35.jpg)
CSCI 5582 Fall 2006
Choosing an Attribute
• Approximation to the Information Gain metric.– Figure out your original error rate– Apply a feature which branches N ways
– Divide the training data along the branches
– Count the labels at each leaf and pick the majority label
– How many do you get right?
![Page 36: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/36.jpg)
CSCI 5582 Fall 2006
Note
• This technique indirectly gets at the notion of trying to find small trees with uniform leaves.
![Page 37: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/37.jpg)
CSCI 5582 Fall 2006
Note
• The entire training set is available only at the top of the tree.
• Once a feature has been placed into the tree, the training data splits according to the values of the feature. Ie. Choosing tests deeper in the tree involves a subset of the original set.
![Page 38: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/38.jpg)
CSCI 5582 Fall 2006
Decision Lists
• Search for sequences of tests that cover subsets of the training data.
• An instance that passes a test is assigned a label
• An instance that doesn’t pass a test is passed to the next test.
![Page 39: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/39.jpg)
CSCI 5582 Fall 2006
Decision Lists
• Its useful to talk about– Accuracy of a test (how well does it predict the right answer for the instances it covers)
– Coverage of a test (how many instances does it apply to?)
– The book’s algorithm is looking for tests of length k with 100% accuracy
– All things being equal we like tests with higher coverage (why?)
![Page 40: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/40.jpg)
CSCI 5582 Fall 2006
Why?
• Occam’s razor– Prefer simple hypotheses to complex ones
– Choosing tests with large coverage reduces the examples passed on to the rest of the algorithm•Leading it to terminate sooner
– Leading to smaller lists» Making Occam happy
![Page 41: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/41.jpg)
CSCI 5582 Fall 2006
Decision Lists
• The boxes and arrows seemed to confuse folks. Its really just an ordered list of tests– Test -> label– Test -> label– Test -> label– …– Emit the label attached to the first test that succeeds and then stop
![Page 42: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/42.jpg)
CSCI 5582 Fall 2006
Hints
• For DLs two-label (binary) tasks lend themselves to techniques that don’t really generalize– I.e. If I start with 5 yesses and 5 nos, and I can knock out 4 yesses with the first test
– Then I might choose to worry about catching that last yes, rather than covering a larger number of the nos
![Page 43: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/43.jpg)
CSCI 5582 Fall 2006
Ensembles
• Know the basic idea of how ensembles work.– Some way of producing independent classifiers
– A voting scheme
![Page 44: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/44.jpg)
CSCI 5582 Fall 2006
Other Classifiers
• SVMs, Neural Nets– Just need a superficial familiarity with the basic ideas.
![Page 45: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/45.jpg)
CSCI 5582 Fall 2006
Language Processing
• Mainly the connections to other topics in the course– How can language problems be viewed as probability problems?
– Machine learning problems?
![Page 46: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/46.jpg)
CSCI 5582 Fall 2006
Language Processing
• I won’t ask a specific detailed MT question…
• Think of generative probabilistic sequence applications that are language related– Speech (audio to text)– MT (German to English)– OCR (pixels to texts)– IE (texts to database entries)
![Page 47: CSCI 5582 Artificial Intelligence](https://reader036.fdocuments.in/reader036/viewer/2022062808/56815494550346895dc2a502/html5/thumbnails/47.jpg)
CSCI 5582 Fall 2006
Generative Statistical Models
• Underlying (hidden) states in a statistical machine…
• Hidden states emit outputs (observables)
• Want to infer the hidden processing from the observables – In other words the observables are what you have, the hidden states are what you want.