Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  1. 1. Overview of Machine Learning Foundations of Artificial Intelligence
  2. 2. Learning <ul><li>What is Learning? </li></ul><ul><ul><li>Learning in AI is also called machine learning or pattern recognition. </li></ul></ul><ul><ul><li>The basic objective is to allow an intelligent agent to discover autonomously knowledge from experience . </li></ul></ul><ul><li>Let’s examine the definition more closely: </li></ul><ul><ul><li>“an intelligent agent ”: The ability to learn requires a prior level of intelligence and knowledge. Learning has to start from an existing level of capability. </li></ul></ul><ul><ul><li>“to discover autonomously ”: Learning is fundamentally about an agent recognizing new facts for its own use and acquiring new abilities that reinforce its own existing abilities. Literal programming, i.e. rote learning from instruction, is not useful. </li></ul></ul><ul><ul><li>“ knowledge ”: Whatever is learned has to be represented in some way that the agent can use. “If you can't represent it, you can't learn it” is a corollary of the slogan “Knowledge is power”. </li></ul></ul><ul><ul><li>“from experience ”: Experience is typically a set of so-called training examples; examples may be categorized or not. They may be random or selected by a teacher. They may include explanations or not. </li></ul></ul>
  3. 3. Learning by Discovery <ul><li>One example: AM by Doug Lenat at Stanford </li></ul><ul><ul><li>a mathematical system </li></ul></ul><ul><ul><li>inputs: set theory (union, intersection, etc); “how to do mathematics” (based on a book by Polya), e.g., if f is an interesting function of two arguments, then f ( x , x ) is an interesting function on one, etc. </li></ul></ul><ul><ul><li>speculated about what was interesting an made conjectures, etc. </li></ul></ul><ul><li>What AM discovered </li></ul><ul><ul><li>integers (as equivalence relation on cardinality of sets) </li></ul></ul><ul><ul><li>addition (using disjoint union of sets) </li></ul></ul><ul><ul><li>multiplication </li></ul></ul><ul><ul><li>primes: 1 was interesting, the function returning the cardinality of set of divisors was interesting, etc. </li></ul></ul><ul><ul><li>Glodbach’s conjecture: “all even numbers are the sum of two prime numbers”; (note that AM did not prove it, just discovered that it was interesting </li></ul></ul><ul><li>Why was AM so successful? </li></ul><ul><ul><li>Connection between LISP and mathematics (mutations of small bits of LISP code are likely to be interesting) </li></ul></ul><ul><ul><li>Doesn’t extend to other domains </li></ul></ul><ul><ul><li>Lessons from EURISKO (fleet game) </li></ul></ul>
  4. 4. Explanation-Based Learning <ul><li>Explanation- based learning (EBL) systems try to explain why each training instance belongs to the target concept. </li></ul><ul><ul><li>The resulting “proof” is then generalized and saved. </li></ul></ul><ul><ul><li>If a new instance can be explained in the same manner as a previous instance, then it is also assumed to be a member of the target concept. </li></ul></ul><ul><li>Like macro- operators, EBL systems never learn to solve a problem that they couldn’t solve before (in principle). </li></ul><ul><ul><li>However, they can become much more efficient at problem- solving by reorganizing the search space. </li></ul></ul><ul><li>One of the strengths of EBL is that the resulting “explanations” are typically easy to understand. </li></ul><ul><li>One of the weaknesses of EBL is that they rely on a domain theory to generate the explanations. </li></ul>
  5. 5. Case-Based Learning <ul><li>Case-based reasoning (CBR) systems keep track of previously seen instances and apply them directly to new ones. </li></ul><ul><li>In general, a CBR system simply stores each “case” that it experiences in a “case base” which represents its memory of previous episodes. </li></ul><ul><li>To reason about a new instance, the system consults its case base and finds the most similar case that it’s seen before. The old case is then adapted and applied to the new situation. </li></ul><ul><li>CBR is similar to reasoning by analogy. Many people believe that much of human learning is case- based in nature. </li></ul>
  6. 6. Connectionist Algorithms <ul><li>Connectionist models (also called neural networks) are inspired by the interconnectivity of the brain. </li></ul><ul><ul><li>Connectionist networks typically consist of many nodes that are highly interconnected. When a node is activated, it sends signals to other nodes so that they are activated in turn. </li></ul></ul><ul><li>Using layers of nodes allows connectionist models to learn fairly complex functions. </li></ul><ul><li>Neural networks are loosely modeled after the biological processes involved in cognition: </li></ul><ul><ul><li>1. Information processing involves many simple elements called neurons. </li></ul></ul><ul><ul><li>2. Signals are transmitted between neurons using connecting links. </li></ul></ul><ul><ul><li>3. Each link has a weight that controls the strength of its signal. </li></ul></ul><ul><ul><li>4. Each neuron applies an activation function to the input that it receives from other neurons. This function determines its output. </li></ul></ul>
  7. 7. Concept Learning <ul><li>A form of supervised learning in which data is classified according to one or more predefined categories </li></ul><ul><ul><li>The learning program is given examples of the form ( x i , y i ) and tries to learn a function f such that f ( x i ) = y i for all i . </li></ul></ul><ul><ul><li>f should be general enough to apply to values of x that were not among the training instances. </li></ul></ul><ul><ul><li>The system might learn: </li></ul></ul>feathers => bird or (feathers / (yellow / b&w) ) => bird
  8. 8. Inductive Learning <ul><li>Inductive Learning </li></ul><ul><ul><li>inductive learning involves learning generalized rules from specific examples (can think of this as the “inverse” of deduction) </li></ul></ul><ul><ul><li>main task: given a set of examples, each classified as positive or negative produce a concept description that matches exactly the positive examples </li></ul></ul><ul><li>Some Notes: </li></ul><ul><ul><li>The examples are coded in some representation language, e.g. they are coded by a finite set of real-valued features. </li></ul></ul><ul><ul><li>The concept description is in a certain language that is presumably a superset of the language of possible example encodings. </li></ul></ul><ul><ul><li>A “correct” concept description is one that classifies correctly ALL possible examples, not just those given in the training set. </li></ul></ul><ul><li>Fundamental Difficulties with Induction </li></ul><ul><ul><li>can’t generalize with perfect certainty </li></ul></ul><ul><ul><li>examples and concepts are NOT available “directly”; they are only available through representations which may be more or less adequate to capture them </li></ul></ul><ul><ul><li>some examples may be classified as both positive and negative </li></ul></ul><ul><ul><li>the features supplied may not be sufficient to discriminate between positive and negative examples </li></ul></ul>
  9. 9. Inductive Bias <ul><li>Learning as Classification </li></ul><ul><ul><li>can be viewed as classification of a target concept according to examples </li></ul></ul><ul><ul><li>often by looking at positive and negative instances of a binary predicate </li></ul></ul><ul><ul><li>problem: learning spaces can be very large </li></ul></ul><ul><li>Example: Learning a classification of bit strings </li></ul><ul><ul><li>classification is a subset of set of all instances </li></ul></ul><ul><ul><li>for m instances we have 2 m possible classifications </li></ul></ul><ul><ul><li>but, for n bits there are 2 n possible strings of n bits </li></ul></ul><ul><ul><li>so, total space is 2 2 n </li></ul></ul><ul><li>Inductive Bias </li></ul><ul><ul><li>need to use a bias to prune the search space </li></ul></ul><ul><ul><li>e.g., given strings {1100, 1010} as positive examples of some target set, we can narrow down possible generalizations: </li></ul></ul><ul><ul><ul><li>strings that start with 1 and end in 0 </li></ul></ul></ul><ul><ul><ul><li>strings the have equal number of 0’s and 1’s </li></ul></ul></ul><ul><ul><ul><li>strings with even number of 0’s and 1’s </li></ul></ul></ul><ul><ul><li>what if we now get a positive example 110100? </li></ul></ul><ul><ul><li>What if we get a negative example 100101? </li></ul></ul>
  10. 10. Version Spaces <ul><li>Idea: assume you are looking for a CONJUNCTIVE CONCEPT </li></ul><ul><ul><li>e.g., spade A, club 7, club 9 yes </li></ul></ul><ul><ul><li>club 8, heart 5 no </li></ul></ul><ul><ul><li>concept: odd and black </li></ul></ul><ul><li>now notice that the set of conjunctive concepts is partially ordered by specificity </li></ul>any card black odd black spade odd spade 3 of spade <ul><li>at any point, keep most specific and least specific </li></ul><ul><li>conjuncts consistent with data: </li></ul><ul><li>most specific: </li></ul><ul><li>anything more specific misses some positive instances </li></ul><ul><li>always exists -- conjoin all OK conjunctions </li></ul><ul><li>least specific: </li></ul><ul><li>anything less specific admits some negative instances </li></ul><ul><li>may not be unique -- imagine all you know is club </li></ul><ul><li>4 not ok, odd black ok, spade ok, black not ok </li></ul><ul><li>Idea is to gradually merge least and most specific as data comes in. </li></ul>
  11. 11. Version Spaces: Example <ul><li>Step 0 : most specific concept (msc) is the empty set; least specific concept (lsc) is the set of all cards. </li></ul><ul><li>Step 1 : A-spade is found to be in target set: </li></ul><ul><ul><li>msc = {A-spade} </li></ul></ul><ul><ul><li>lsc = set of all cards </li></ul></ul><ul><li>Step 2 : 7-club is found to be in target set: </li></ul><ul><ul><li>msc = odd black cards </li></ul></ul><ul><ul><li>lsc = set of all cards </li></ul></ul><ul><li>Step 3 : 8-heart is not in target set </li></ul><ul><ul><li>msc = odd black cards </li></ul></ul><ul><ul><li>lsc = all odd cards OR all black cards </li></ul></ul><ul><li>. . . </li></ul>The training examples (obtained) incrementally:
  12. 12. What Is Classification? <ul><li>The goal of data classification is to organize and categorize data in distinct classes </li></ul><ul><ul><li>A model is first created based on the data distribution </li></ul></ul><ul><ul><li>The model is then used to classify new data </li></ul></ul><ul><ul><li>Given the model, a class can be predicted for new data </li></ul></ul><ul><li>Classification = prediction for discrete and nominal values </li></ul><ul><ul><li>With classification, I can predict in which bucket to put the ball, but I can’t predict the weight of the ball </li></ul></ul>
  13. 13. Classification: 3 Step Process <ul><li>1. Model construction ( Learning ): </li></ul><ul><ul><li>Each record (instance) is assumed to belong to a predefined class, as determined by one of the attributes, called the class label </li></ul></ul><ul><ul><li>The set of all records used for construction of the model is called training set </li></ul></ul><ul><ul><li>The model is usually represented in the form of classification rules, (IF-THEN statements) or decision trees </li></ul></ul><ul><li>2. Model Evaluation ( Accuracy ): </li></ul><ul><ul><li>Estimate accuracy rate of the model based on a test set </li></ul></ul><ul><ul><li>The known label of test sample is compared with the classified result from model </li></ul></ul><ul><ul><li>Accuracy rate: percentage of test set samples correctly classified by the model </li></ul></ul><ul><ul><li>Test set is independent of training set otherwise over-fitting will occur </li></ul></ul><ul><li>3. Model Use ( Classification ): </li></ul><ul><ul><li>The model is used to classify unseen instances (assigning class labels) </li></ul></ul><ul><ul><li>Predict the value of an actual attribute </li></ul></ul>
  14. 14. Decision Trees <ul><li>What is a Decision Tree </li></ul><ul><ul><li>it takes as input the description of a situation as a set of attributes (features) and outputs a yes/no decision (so it represents a Boolean function) </li></ul></ul><ul><ul><li>each leaf is labeled &quot;positive” or &quot;negative&quot;, each node is labeled with an attribute (or feature), and each edge is labeled with a value for the feature of its parent node </li></ul></ul><ul><li>Attribute-value language for examples </li></ul><ul><ul><li>in many inductive tasks, especially learning decision trees, we need a representation language for examples </li></ul></ul><ul><ul><ul><li>each example is a finite feature vector </li></ul></ul></ul><ul><ul><ul><li>a concept is a decision tree where nodes are features </li></ul></ul></ul>
  15. 15. Decision Trees <ul><li>Example: “is it a good day to play golf?” </li></ul><ul><ul><li>a set of attributes and their possible values : </li></ul></ul><ul><ul><li>outlook sunny, overcast, rain </li></ul></ul><ul><ul><li>temperature cool, mild, hot </li></ul></ul><ul><ul><li>humidity high, normal </li></ul></ul><ul><ul><li>windy true, false </li></ul></ul>A particular instance in the training set might be: < overcast , hot , normal , false >: play In this case, the target class is a binary attribute, so each instance represents a positive or a negative example.
  16. 16. Using Decision Trees for Classification <ul><li>Examples can be classified as follows </li></ul><ul><ul><li>1. look at the example's value for the feature specified </li></ul></ul><ul><ul><li>2. move along the edge labeled with this value </li></ul></ul><ul><ul><li>3. if you reach a leaf, return the label of the leaf </li></ul></ul><ul><ul><li>4. otherwise, repeat from step 1 </li></ul></ul><ul><li>Example (a decision tree to decide whether to go play golf): </li></ul>outlook humidity windy sunny overcast rain high normal true false yes yes no yes no
  17. 17. What is Clustering? <ul><li>Cluster: </li></ul><ul><ul><li>a collection of data objects that are “similar” to one another and thus can be treated collectively as one group </li></ul></ul><ul><ul><li>but as a collection, they are sufficiently different from other groups </li></ul></ul><ul><li>Clustering </li></ul><ul><ul><li>unsupervised classification </li></ul></ul><ul><ul><li>no predefined classes </li></ul></ul>Clustering is a process of partitioning a set of data (or objects) in a set of meaningful sub-classes, called clusters Helps users understand the natural grouping or structure in a data set
  18. 18. What Is Good Clustering? <ul><li>A good clustering will produce high quality clusters in which: </li></ul><ul><ul><li>the intra-class (that is, intra-cluster) similarity is high </li></ul></ul><ul><ul><li>the inter-class similarity is low </li></ul></ul><ul><li>The quality of a clustering result also depends on both the similarity measure used by the method and its implementation </li></ul><ul><li>The quality of a clustering method is also measured by its ability to discover some or all of the hidden patterns </li></ul><ul><li>The quality of a clustering result also depends on the definition and representation of cluster chosen </li></ul>
  19. 19. Applications of Clustering <ul><li>Clustering has wide applications in Pattern Recognition </li></ul><ul><li>Spatial Data Analysis: </li></ul><ul><ul><li>create thematic maps in GIS by clustering feature spaces </li></ul></ul><ul><ul><li>detect spatial clusters and explain them in spatial data mining </li></ul></ul><ul><li>Image Processing </li></ul><ul><li>Market Research </li></ul><ul><li>Information Retrieval </li></ul><ul><ul><li>Document or term categorization </li></ul></ul><ul><ul><li>Information visualization and IR interfaces </li></ul></ul><ul><li>Web Mining </li></ul><ul><ul><li>Cluster Web usage data to discover groups of similar access patterns </li></ul></ul><ul><ul><li>Web Personalization </li></ul></ul>
  20. 20. What is Memory-Based Reasoning? <ul><li>Basic Idea: classify new instances based on their similarity to instances we have seen before </li></ul><ul><ul><li>also called “ instance-based learning ” </li></ul></ul><ul><li>Simplest form of MBR: Rote Learning </li></ul><ul><ul><li>learning by memorization </li></ul></ul><ul><ul><li>save all previously encountered instance; given a new instance, find one from the memorized set that most closely “resembles” the new one; assign new instance to the same class as the “nearest neighbor” </li></ul></ul><ul><ul><li>more general methods try to find k nearest neighbors rather than just one </li></ul></ul><ul><ul><li>but, how do we define “resembles?” </li></ul></ul><ul><li>MBR is “lazy” </li></ul><ul><ul><li>defers all of the real work until new instance is obtained; no attempts are made to learn a generalized model from the training set </li></ul></ul><ul><ul><li>less data preprocessing and model evaluation, but more work has to be done at classification time </li></ul></ul>
  21. 21. Basic Issues in Applying MBR <ul><li>Choosing the right set of instances </li></ul><ul><ul><li>can do just random sampling since “unusual” records may be missed (e.g., in the movie database, poplar movies will dominate the random sample) </li></ul></ul><ul><ul><li>usual practice is to keep roughly the same number of records for each class </li></ul></ul><ul><li>Computing Distance </li></ul><ul><ul><li>general distance functions like those discussed before can be used </li></ul></ul><ul><ul><li>issues are how to normalize and what to do with missing values </li></ul></ul><ul><li>Finding the right “combination” function </li></ul><ul><ul><li>how many nearest neighbors need to be used </li></ul></ul><ul><ul><li>how to combine answers from nearest neighbors </li></ul></ul><ul><ul><ul><li>basic approaches: democracy, weighted voting </li></ul></ul></ul>
  22. 22. MBR in Collaborative Filtering <ul><li>“Social Learning” </li></ul><ul><ul><li>idea is to give recommendations to a user based on the “ratings” of objects by other users </li></ul></ul><ul><ul><li>usually assumes that features in the data are similar objects (e.g., Web pages, music, movies, etc.) </li></ul></ul><ul><ul><li>usually requires “explicit” ratings of objects by users based on a rating scale </li></ul></ul><ul><ul><li>there have been some attempts to obtain ratings implicitly based on user behavior (mixed results; problem is that implicit ratings are often binary) </li></ul></ul>Will Karen like “Independence Day?”