Docstoc
EXCLUSIVE OFFER FOR DOCSTOC USERS
Try the all-new QuickBooks Online for FREE.  No credit card required.

CBR - Computer Science at RPI

Document Sample
CBR - Computer Science at RPI Powered By Docstoc
					Soft Computing: Case-Based Reasoning                                        Soft Computing: Case-Based Reasoning




                                                                                                                     Contents
                                                                                       q    What is Case-Based Reasoning?
           Case-Based Reasoning                                                        q How does CBR work?
                        Watson chapters 1 - 4                                          q Advantages / Disadvantages

                                                                                       q    Who Uses CBR?
                                                                                             q case          study - Lockheed
                          Bill Cheetham, Kai Goebel
                                                                                             q lists        at web sites
                                                                                             q GE
                                  Slides modified from Dr. Ian Watson


                                                                        1                                                         2




Soft Computing: Case-Based Reasoning                                        Soft Computing: Case-Based Reasoning




                                       What is CBR?                                                                What Is CBR?
        q A case-based reasoner solves new                                         q How will you get home?
          problems by using or adapting solutions                                  q Generate a path
          that were used to solve old problems                                     q Or remember the way
        q offers a reasoning paradigm that is
          similar to the way many people routinely                                 q Path to new location?
          solve problems
                                                                                   q Remember close path
                                                                                   q Adapt it

                                                                        3                                                         4




Soft Computing: Case-Based Reasoning                                        Soft Computing: Case-Based Reasoning




                                       What Is CBR?                                                                What Is CBR?
                 What is 12 x 12?                                                In order to have a phone in every
                                                                                 house 1/10 of the entire US population
                 144                                                             would need to be phone operators
                 What is 12 x 13?
                 12 x 12 + 12
                                                                                   Create a phone book with people and
                 156                                                               their phone numbers


                                                                        5                                                         6




                                                                                                                                      1
Soft Computing: Case-Based Reasoning                                                Soft Computing: Case-Based Reasoning




                                 Who uses CBR?                                                                             Quotes
                                                                                             q    "We know nothing of what will happen in future, but
                 Lawyers                                                                          by the analogy of experience." -- Abraham Lincoln“
                        q find         previous ruling that applies to case                  q    "Study the past if you would divine the future." --
                        q show          that it applies to current case                           Confucius

                                                                                             q    "If at first you don't succeed, you are running about
                Real Estate Appraiser                                                             average." -- Bill Cosby
                       q find  similar comparable houses
                       q estimate   value of target based on value
                           of comparable
                                                                           7                                                                              8




Soft Computing: Case-Based Reasoning                                                Soft Computing: Case-Based Reasoning




    Problem           The Case-Based Cycle                                              Problem           The Case-Based Cycle
                                                                                                                           RETRIEVE               Similar
                                                                                                                                                  Cases



                                                                                                                               PRIOR
                                                                                                                               CASES


                                                                                                                           CASE-BASE



                                                                           9                                                                              10




Soft Computing: Case-Based Reasoning                                                Soft Computing: Case-Based Reasoning




    Problem           The Case-Based Cycle                                              Problem           The Case-Based Cycle
                                            RETRIEVE                 Similar                                               RETRIEVE               Similar
                                                                     Cases                                                                        Cases

                                                                 R                                                                            R
                                                                 E                                                                            E
                                                  PRIOR          U                                                             PRIOR          U
                                                  CASES                                                                        CASES
                                                                 S                                                                            S
                                                                 E                                                                            E
                                            CASE-BASE                                                                      CASE-BASE

                                                                                     Solution
                                                                         Solution                                           REVISE                      Solution
                                                                           11                                                                             12




                                                                                                                                                                   2
Soft Computing: Case-Based Reasoning                                                     Soft Computing: Case-Based Reasoning




    Problem           The Case-Based Cycle                                                                                      History of CBR
                                       RETRIEVE                           Similar
                                                                          Cases                  CBR can trace its roots to the field of psychology
                                                                                                  and theories about how human memory works
                                                                  R                              q    “Episodic Memory” [Tulving 1972] provides a method
                       $                                          E                                   for storing and recalling large chunks of related
                                           PRIOR                  U                                   information such as events, scenes, occurrences, and
              RETAIN                       CASES
                                                                  S                                   stories
                                                                  E                              q    “schema” [Rumelhart 1977] reasoning is the process of
                                       CASE-BASE                                                      applying chunks of information to new situations

 Solution
                                        REVISE                                Solution
                                                                                13                                                                                          14




Soft Computing: Case-Based Reasoning                                                     Soft Computing: Case-Based Reasoning




                      History of CBR- scripts                                                                  History of CBR - MOPs
        Roger Schank’s group invented scripts at Yale
         natural language lab during the mid-seventies                                           Schank’s lab began research based on the notion that
                                                                                                   for remembering and reasoning tasks both general
        “scripts represent generalizations about actions that
                                                                                                   knowledge structures, like scripts, and specific
           should take place in stereotypical situations”
                                                                                                   instances are crucial to understanding
       Restaurant sequence of events:                                                            Memory Organization Packets (MOPs) integrate
       1. enter restaurant,               7. order food,                                           general knowledge with experiences
       2. be seated by hostess,           8. wait for waiter,
       3. obtain menu from waiter,        9. waiter returns with food,
       4. order drinks,                   10. eat food,                                               go to restaurant                                          pay
                                                                                                                                        order food
       5. waiter leaves,                  11. waiter returns with bill,                                                     be seated                eat food
       6. waiter returns with drinks,     12. pay bill & leave
                                                                                15                     instance instance                instance                 instance   16
                                                                                                                                                     instance




Soft Computing: Case-Based Reasoning                                                     Soft Computing: Case-Based Reasoning




                       History of CBR - TOPs                                                              History of CBR - Software
                                                                                                 q    The 80’s
        Thematic Organization Packets (TOPs) categorize
          situations by the plans of the participants rather than                                       q theoriginal CBR programs CASEY, CHEF,
          the details of the situation                                                                    JULIA were written in LISP
                                                                                                        q research tools in public domain
             Schank’s daughter was diving in the ocean looking                                   q    The 90’s
             for sand dollars. He pointed out where a group of
             them were, yet she continued to dive elsewhere. He                                         q the  development of commercial CBR tools,
             asked why, and she told him that the water was                                                 mostly in C
             shallower where she was diving. This reminded him
             of the old joke about a drunk searching for his lost
                                                                                                 q    Today
             ring under the lamppost where the light was better.                                        q commercial               Web-based Java tools
                                                                                17
                                                                                                        q specific              application (customer self-service)18




                                                                                                                                                                                 3
Soft Computing: Case-Based Reasoning                                                      Soft Computing: Case-Based Reasoning




                                                   What is a Case?                                            2 types of case features
                                                                                                     Patient Ref #: 1024
                                                                                                     Patient Name: John Doe
        q several features describing a problem                                                      Address: 12 Elm Street
                                                                                                                                            unindexed features
                                                                                                     Next of Kin: Jane Doe                     Not predictive & not used for
        q plus an outcome or a solution                                                              Photo:                                    retrieval, they provide
                                                                                                                                               background information to users
        q cases can be very rich
               q text,                            numbers, symbols, plans, multimedia,               Age: 53

        q cases are not usually distilled knowledge                                                  Sex: Male
                                                                                                     Weight: 225 lbs                        indexed features
        q cases are records of real events                                                           Height: 5’ 11”                            Predictive and used for retrieval
                                                                                                     Blood Type: A neg.
        q and are excellent for justifying decisions                                                 ...


                                                                                     19                                                                                       20




Soft Computing: Case-Based Reasoning                                                      Soft Computing: Case-Based Reasoning




                       What is a Case-Base?                                                              How Does Retrieval Work?
        q    A case-base is a set of cases.                                                       q imagine a decision with two factors that
        q    Case-bases are usually just flat files or                                              influence it
             relational databases                                                                 q should you grant a person a loan?
                                                                                                     ‚ net monthly income
             a robust case-base, containing a representative and                                     ƒ monthly loan repayment
             well distributed set of cases, is the foundation for a
             good CBR system                                                                      q more factors in reality
                      [Kriegasman & Barletta, 1993].

                                                                                     21                                                                                       22




Soft Computing: Case-Based Reasoning                                                      Soft Computing: Case-Based Reasoning




                      How Does CBR Work?                                                                        How Does CBR Work?
        q    these factors can be used as axes for a                                              q    a previous loan can be plotted against
             graph                                                                                     these axes
                         monthly loan repayment




                                                                                                                   monthly loan repayment




                                                               net monthly income    23                                                      net monthly income               24




                                                                                                                                                                                   4
Soft Computing: Case-Based Reasoning                                                Soft Computing: Case-Based Reasoning




                      How Does CBR Work?                                                                  How Does CBR Work?
        q    and more good loans                                                            q    plus some bad loans
                         monthly loan repayment




                                                                                                             monthly loan repayment
                                                       net monthly income      25                                                     net monthly income    26




Soft Computing: Case-Based Reasoning                                                Soft Computing: Case-Based Reasoning




                                                  Lazy Learning                                           How Does CBR Work?
        q    past cases (loans) may tend to form                                            q    a new loan prospect can be plotted on
             clusters, but you don’t need to find them                                           the graph
                         monthly loan repayment




                                                                                                             monthly loan repayment




                                                                bad loans

                                                                                                                                                 new case
                                                                       good loans



                                                       net monthly income      27                                                     net monthly income    28




Soft Computing: Case-Based Reasoning                                                Soft Computing: Case-Based Reasoning




                      How Does CBR Work?                                                                  How Does CBR Work?
        q    and the distance to its nearest                                                q    the best matching past case is the
             neighbors calculated                                                                closest
                         monthly loan repayment




                                                                                            q this suggests a
                                                                                              precedent
                                                                                            q the loan should
                                                                                              be successful
                                                       net monthly income      29                                                                           30




                                                                                                                                                                 5
Soft Computing: Case-Based Reasoning                                                                  Soft Computing: Case-Based Reasoning




                      How Does CBR Work?                                                                                    How Does CBR Work?
        q    over time the prediction can be                                                                  q    the system is learning to differentiate
             validated                                                                                             good and bad loans better
                         monthly loan repayment




                                                                                                                               monthly loan repayment
                                                                               it was a good loan




                                                         net monthly income                      31                                                                  net monthly income     32




Soft Computing: Case-Based Reasoning                                                                  Soft Computing: Case-Based Reasoning




                      How Does CBR Work?                                                                                                                  Retrieval Issues
        q    as more cases are acquired its                                                                   q do all indexed features have the same
             performance improves                                                                               weight?
                         monthly loan repayment




                                                                                                              q Is the similarity linearly proportional to
                                                                                                                the distance a case is from the new
                                                                                                                problem?
                                                                                                              q What distance measure should be used
                                                                                                                (city block, line of sight, …)
                                                                                                              q Uniformity of solution space
                                                         net monthly income                      33                                                                                         34




Soft Computing: Case-Based Reasoning                                                                  Soft Computing: Case-Based Reasoning




                                                  Feature Shift                                                         How to weight the features
                                                                input problem description


                                                                             Problem Space                       q    First normalize the attributes
                                                     R
                                                                                                                       q find                           min. and max.
                                                                                                                       q set                            min = 0, max = 1
                                                                                                                 q    Real estate appraiser example
                                                         A
                                                                                                                       q living-area                           between 2,000 and 3,500 sq. ft.
                                                             Feature Shift   Solution Space
                                                                                                                       q 2,000 =0
                                                         = description of new problem to solve                         q 3,500 = 1
                                                         = description of solved problems
                                                         = stored solutions
                                                         = new solution created by adaptation    35                                                                                         36




                                                                                                                                                                                                 6
Soft Computing: Case-Based Reasoning                                         Soft Computing: Case-Based Reasoning




               How to weight the features                                                                            Adaptation
        q Ask an expert
                                                                                     In many situations the case returned is
        q Look for trends in data (plot, regression)
                                                                                       not the exact solution needed
        q Use leave-one-out testing
                                                                                     q Many techniques can be used
               q selectan item from the case base where
                                                                                            q rule-based              system
                 you know the solution
                                                                                            q heuristic             search
               q run your CBR system on the case
                                                                                            q other
               q determine error = difference in solution
                 suggested by CBR and actual solution                                q    The best technique depends on the
               q update rules to minimize this error (GA?)                                application
                                                                    37                                                            38




Soft Computing: Case-Based Reasoning                                         Soft Computing: Case-Based Reasoning




                                       Adaptation                                                  Rule Based Adaptation
                                                 input problem description
                                                                                     Example from real estate appraiser
                 Problem Space
                                                                                     q retrieved a house selling at $100,000
                                             R
                                                                                       that is exactly like the one being
the adapted solution can be                                                            appraised except it has a 2 car garage
created by many methods,
such as, interpolation or
                                                                                       and target has 1 car garage
extrapolation                                                                        q the value of an extra garage is $4,000
                                                    adapted solution
              Solution Space                 A
                                                                                     q adjusted value is $100,000 + $4,000

                                                                    39                                                            40




Soft Computing: Case-Based Reasoning                                         Soft Computing: Case-Based Reasoning




         How do you learn Adaptations                                                                                 Exercise
                                                                                     q Estimate height using students as the
        Analyze the Data                                                               case-base
        q Look for trends in data (plot, regression)                                 q 5 students come to front and be the
        q Compare similar items                                                        case base
               q Findtwo data items that are identical                               q Predict the height of a 6th student
                 except for one difference
               q The solution difference is the value of the
                 change in the attribute
        q    Evaluate rules by testing different ones
                                                                    41                                                            42




                                                                                                                                       7
Soft Computing: Case-Based Reasoning                                     Soft Computing: Case-Based Reasoning




                                        Summary                                                      Advantages of CBR
        q in real life the problem space is                                      q CBR is intuitive - it’s how we work
          N dimensional
                                                                                 q no knowledge elicitation to create rules
        q new features can be added if they
                                                                                   or methods
          become relevant
                                                                                 q this makes development easier
        q feature vectors can be weighted to
          reflect their relative importance                                      q systems learn by acquiring new cases
        q tolerant of noise & missing data                                         through use
        q k -Nearest Neighbor Retrieval                                          q this makes maintenance easy
                                                                                 q justification through precedent
                                                                    43                                                         44




Soft Computing: Case-Based Reasoning                                     Soft Computing: Case-Based Reasoning




                         When to Apply CBR?                                                          CBR is Transparent
        q when a domain model is difficult or                                    q precedent is an accepted method for
          impossible to elicit                                                     justifying a decision
        q when the system will require constant                                  q nearest neighbor retrieves the best
          maintenance                                                              matching past cases
        q when records of previously successful                                  q the process is transparent
          solutions exist                                                        q i.e., easily understood by users
                                                                                 q this increases acceptance

                                                                    45                                                         46




Soft Computing: Case-Based Reasoning                                     Soft Computing: Case-Based Reasoning




                         CBR with Confidence                                                    CBR with Confidence

                                                    New Solution
           New                         CBR System
           Problem                                  Confidence in
                                                    Solution
       Confidence based on:
       q Number of cases matching                                               Blue dots - data points
       q Similarity of matching cases to new problem                            Red line - actual line to be predicted
       q Similarity of matching cases to each other                             Yellow line - prediction by a neural network
                                                                    47                                                         48




                                                                                                                                    8
Soft Computing: Case-Based Reasoning                            Soft Computing: Case-Based Reasoning




                           CBR Systems Learn                                                   Case-Base Issues
        q decision making is dynamic                                    q How many cases are needed
        q CBR systems learn by acquiring new                            q How to remove overlapping cases
          cases                                                         q How to efficiently search
               q no addition of new rules                                      q create            abstractions from cases
               q no retraining of neural networks                              q multiple           case bases
               q no re-evolving new populations with new
                                                                        q What features to use for indexing
                 genomes
                                                                        q How to weight the features
               q no re-induction of rules from data

                                                           49                                                                50




Soft Computing: Case-Based Reasoning                            Soft Computing: Case-Based Reasoning




                      Disadvantages of CBR                                            Disadvantages of CBR
        q Can take large storage space for all the                      q    if you require the best solution or the
          cases                                                              optimum solution - CBR may not be for
        q Can take large processing time to find                             you
          similar cases in case-base                                    q    CBR systems generally give good or
        q Cases may need to be created by hand                               reasonable solutions
        q Adaptation may be difficult
                                                                        q    this is because the retrieved
        q Needs case-base, case selection                                    case often requires adaptation
          algorithm, and possibly case-adaptation
          algorithm                               51                                                                         52




Soft Computing: Case-Based Reasoning                            Soft Computing: Case-Based Reasoning




                   CBR vs linear regression                                CBR vs Rule-Based Systems
        q linear regression summarizes data while                        q CBR offers a cost-effective solution to
          CBR retains all data points                                      the ‘knowledge acquisition bottleneck’
                                                                           problem
        q hard for regression to learn strange
          shapes                                                         q CBR systems can learn from
                                                                           experience and so can be self-
                                                                           maintaining
                                                                         q Rule-based systems are better when it
                                                                           is hard to gather case data
                                                           53                                                                54




                                                                                                                                  9
Soft Computing: Case-Based Reasoning                                      Soft Computing: Case-Based Reasoning




             CBR vs Rule Based System                                                                            CBR vs NN
                                                                                   q neural nets cannot justify their decisions
        q rule-based systems justify decisions by                                  q users have to trust the computer is
          showing a rule trace
                                                                                     always correct
        q decision grant loan because
                                                                                   q Neural nets cannot take advantage of
               rule 24 -> rule 61 -> rule 43 -> rule 202                             domain knowledge
        q    rule traces are opaque &
             can be confusing to users


                                                                     55
                                                                                           input
                                                                                                                   ?          output
                                                                                                                                             56




Soft Computing: Case-Based Reasoning                                      Soft Computing: Case-Based Reasoning




                           Applications of CBR                                     Lockheed - CLAVER
        s    Classification: “The patient’s ear problems are like this         q    Lockheed makes
             prototypical case of otitis media”                                     aircraft parts from
        s    Compiling solutions: “Patient N’s heart symptoms can                   composite materials.                      Heating unit
                                                                                                                              and fan
             be explained in the same way as previous patient D’s”
                                                                               q    These materials are
        s    Assessing values: My house is like the one that sold
                                                                                    made from layers of
             down the street for $250,000 but has a better view”
                                                                                    carbon fibers that               Tables
        s    Justifying with precedents: “This Missouri case should
                                                                                    are formed into a
             be decided just like Roe v. Wade where the court held that
                                                                                    single component by
             a state’s limitations on abortion are illegal”
                                                                                    curing in a large
        s    Evaluating options: “If we attack Cuban/Russian missile
                                                                                    oven, called an
             installations, it would be just like Pearl Harbor”
                                                                                    autoclave
                                                                     57                                                                      58




Soft Computing: Case-Based Reasoning                                      Soft Computing: Case-Based Reasoning




                                       Lockheed                                                                  Lockheed
        q PROBLEM - how to optimize the                                            q 2 experienced operators relied on plans
          loading of an autoclave for curing                                         of previously successful layouts
          composite materials                                                      q New layouts were adapted from old
        q different materials need different                                       q If successful they were added to a
          heating & cooling procedures                                               library
        q materials interact with each other in the                                q they wanted to develop a decision
          autoclave                                                                  support tool to assist experts and to
        q mistakes are VERY costly                                                   retain expertise as a corporate asset
                                                                     59                                                                      60




                                                                                                                                                  10
Soft Computing: Case-Based Reasoning                    Soft Computing: Case-Based Reasoning




                                       Lockheed                                                   Lockheed
        q Lockheed had NO model of the                       Parts list                          Most similar case             Adapted case
          autoclave (a rule-based tool failed)
                                                                               retrieval                         adaptation
        q the manufacturers could not provide
          one
        q layouts did not repeat                                                               known layouts
        q materials were constantly changing                                                                                  learning
        q designs constantly change
        q elements interact
        q CBR was used                             61                                                                                    62




Soft Computing: Case-Based Reasoning                    Soft Computing: Case-Based Reasoning




                                                                                                CBR Web sites
                                       Lockheed
        q their system was implemented in 1990                  www.ai-cbr.org
        q CLAVIER started with 20 successful                    • CBR research, places, people, papers,
          layouts                                                 conferences summaries
        q CLAVIER now has hundreds of                           www.cbr-web.org
          successful layouts                                    • German perspective on CBR
        q it retrieves a successful layout or adapts
          one 90% of the time
        q acts as a corporate memory
                                                   63                                                                                    64




Soft Computing: Case-Based Reasoning                    Soft Computing: Case-Based Reasoning




                                                   65                                                                                    66




                                                                                                                                              11
Soft Computing: Case-Based Reasoning




                                       67




                                            12

				
DOCUMENT INFO
Shared By:
Categories:
Stats:
views:19
posted:7/13/2011
language:English
pages:12