DOC PREVIEW
USC CSCI 460 - session22-23

This preview shows page 1-2-3-4-5-38-39-40-41-42-43-76-77-78-79-80 out of 80 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 80 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 80 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 80 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 80 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 80 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 80 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 80 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 80 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 80 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 80 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 80 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 80 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 80 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 80 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 80 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 80 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 80 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

This time: Fuzzy Logic and Fuzzy InferenceWhat is fuzzy logic?Why use fuzzy logic?Tipping exampleTipping example: The non-fuzzy approachSlide 6Tipping example: ExtendedSlide 8Slide 9Slide 10Slide 11Tipping problem: the fuzzy approachTipping problem: fuzzy solutionSlide 14Fuzzy setsExample: Crisp set TallExample: Fuzzy set TallMembership functions: S-functionMembership functions: P-FunctionSimple membership functionsFuzzy SetsObservationOther representations of fuzzy setsFuzzy set operatorsExample fuzzy set operationsLinguistic HedgesFuzzy relationsFuzzy inferenceFuzzy logical operationsIf-Then RulesExample:ExampleEvaluation of fuzzy rulesA Very Simple ExampleSlide 35Slide 36Slide 37Full Example:FuzzificationSet Operators: AND/ORSlide 41Slide 42Set Operators: Max valueSlide 44QuestionFuzzy RulesFuzzification: Set DefinitionsFuzzification: InstanceSlide 49Rule EvaluationSlide 51Slide 52Slide 53Slide 54Rule AggregationSlide 56DefuzzificationRule Aggregation: Another caseSlide 59Matching for ExampleSlide 61AND/OR ExampleSlide 63Slide 64Scaling vs. ClippingEvaluation of fuzzy rules (cont’d)Summary: If-Then rulesSlide 68Multiple rulesmax-min rule of compositionDefuzzify the outputFuzzy inference overviewLimitations of fuzzy logicFuzzy tools and shellsCamcorder ExampleSlide 76Slide 77Slide 78Slide 79Slide 80CS 460, Sessions 22-231This time: Fuzzy Logic and Fuzzy Inference•Why use fuzzy logic?•Tipping example•Fuzzy set theory•Fuzzy inferenceCS 460, Sessions 22-232What is fuzzy logic?•A super set of Boolean logic•Builds upon fuzzy set theory•Graded truth. Truth values between True and False. Not everything is either/or, true/false, black/white, on/off etc.•Grades of membership. Class of tall men, class of far cities, class of expensive things, etc.•Lotfi Zadeh, UC/Berkely 1965. Introduced FL to model uncertainty in natural language. Tall, far, nice, large, hot, …•Reasoning using linguistic terms. Natural to express expert knowledge. If the weather is cold then wear warm clothingCS 460, Sessions 22-233Why use fuzzy logic?Pros:•Conceptually easy to understand w/ “natural” maths•Tolerant of imprecise data•Universal approximation: can model arbitrary nonlinear functions•Intuitive•Based on linguistic terms•Convenient way to express expert and common sense knowledgeCons:•Not a cure-all•Crisp/precise models can be more efficient and even convenient•Other approaches might be formally verified to workCS 460, Sessions 22-234Tipping example•The Basic Tipping Problem: Given a number between 0 and 10 that represents the quality of service at a restaurant what should the tip be?Cultural footnote: An average tip for a meal in the U.S. is 15%, which may vary depending on the quality of the service provided.CS 460, Sessions 22-235Tipping example: The non-fuzzy approach•Tip = 15% of total bill•What about quality of service?CS 460, Sessions 22-236Tipping example: The non-fuzzy approach•Tip = linearly proportional to service from 5% to 25%tip = 0.20/10*service+0.05•What about quality of the food?CS 460, Sessions 22-237Tipping example: Extended•The Extended Tipping Problem: Given a number between 0 and 10 that represents the quality of service and the quality of the food, at a restaurant, what should the tip be?How will this affect our tipping formula?CS 460, Sessions 22-238Tipping example: The non-fuzzy approach•Tip = 0.20/20*(service+food)+0.05•We want service to be more important than food quality. E.g., 80% for service and 20% for food.CS 460, Sessions 22-239Tipping example: The non-fuzzy approach•Tip = servRatio*(.2/10*(service)+.05) + servRatio = 80% (1-servRatio)*(.2/10*(food)+0.05);•Seems too linear. Want 15% tip in general and deviation only for exceptionally good or bad service.CS 460, Sessions 22-2310Tipping example: The non-fuzzy approachif service < 3, tip(f+1,s+1) = servRatio*(.1/3*(s)+.05) + ... (1-servRatio)*(.2/10*(f)+0.05);elseif s < 7,tip(f+1,s+1) = servRatio*(.15) + ... (1-servRatio)*(.2/10*(f)+0.05);else, tip(f+1,s+1) = servRatio*(.1/3*(s-7)+.15) + ... (1-servRatio)*(.2/10*(f)+0.05);end;CS 460, Sessions 22-2311Tipping example: The non-fuzzy approachNice plot but•‘Complicated’ function•Not easy to modify•Not intuitive•Many hard-coded parameters•Not easy to understandCS 460, Sessions 22-2312Tipping problem: the fuzzy approachWhat we want to express is:1. If service is poor then tip is cheap2. If service is good the tip is average3. If service is excellent then tip is generous4. If food is rancid then tip is cheap5. If food is delicious then tip is generousor1. If service is poor or the food is rancid then tip is cheap2. If service is good then tip is average3. If service is excellent or food is delicious then tip is generousWe have just defined the rules for a fuzzy logic system.CS 460, Sessions 22-2313Tipping problem: fuzzy solutionDecision function generated using the 3 rules.CS 460, Sessions 22-2314Tipping problem: fuzzy solution•Before we have a fuzzy solution we need to find out a) how to define terms such as poor, delicious, cheap, generous etc.b) how to combine terms using AND, OR and other connectivesc) how to combine all the rules into one final outputCS 460, Sessions 22-2315Fuzzy sets•Boolean/Crisp set A is a mapping for the elements of S to the set {0, 1}, i.e., A: S  {0, 1}•Characteristic function: A(x) ={1 if x is an element of set A0 if x is not an element of set A•Fuzzy set F is a mapping for the elements of S to the interval [0, 1], i.e., F: S  [0, 1]•Characteristic function: 0  F(x)  1•1 means full membership, 0 means no membership and anything in between, e.g., 0.5 is called graded membershipCS 460, Sessions 22-2316Example: Crisp set Tall•Fuzzy sets and concepts are commonly used in natural languageJohn is tallDan is smartAlex is happyThe class is hot•E.g., the crisp set Tall can be defined as {x | height x > 1.8 meters}But what about a person with a height = 1.79 meters?What about 1.78 meters?…What about 1.52 meters?CS 460, Sessions 22-2317Example: Fuzzy set Tall•In a fuzzy set a person with a height of 1.8 meters would be considered tall to a high degreeA person with a height of 1.7 meters would be considered tall to a lesser degree etc.•The function can changefor basketball players,Danes, women, children etc.CS 460, Sessions 22-2318Membership functions: S-function•The S-function can


View Full Document

USC CSCI 460 - session22-23

Documents in this Course
Load more
Download session22-23
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view session22-23 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view session22-23 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?