A set is an unordered collection of different elements THE CLASSICAL SET THEORY Example A set of all positive integers A set of all the planets in the solar system A set of all the states in India
MATHEMATICAL REPRESENTATION OF A CLASSICAL SET Roster or Tabular Form Set of vowels in English alphabet, A = { a,e,i,o,u } Set of odd numbers less than 10, B = {1,3,5,7,9} Set Builder Form Example 1 − The set { a,e,i,o,u } is written as A = {x : x is a vowel in English alphabet} Example 2 − The set {1,3,5,7,9} is written as B = {x:1 ≤ x < 10 and (x%2) ≠ 0}
Cardinality of a Set MORE ABOUT CLASSICAL/CRISP SETS Cardinality of a set S, denoted by |S |, is the number of elements of the set. Example |{1,4,3,5}| = 4
Types of Sets Finite Set Infinite Set Subset Proper Subset Universal Set Equal Set Equivalent Set Overlapping Set
A = [1,2,3,4,5,6] B = [5,6,7,8,9,0] U = [1,2,3,4,5,6,7,8,9,0]
Operations on Classical Sets UNION INTERSECTION A U B = [1,2,3,4,5,6,7,8,9,0] A∩ B = [5,6]
DIFFERENCE COMPLEMENT OF A SET A-B = [1,2,3,4] B-A = [7,8,9,0] A’ = [7,8,9,0]
What is Fuzzy Logic? FUZZY refers to things which are NOT CLEAR VAGUE UNQUANTIFIABLE INDEFINITE ROUGH SUBJECTIVE
Words like young , tall , good , shades of a colour , high are Fuzzy
What are Fuzzy Sets?
U = CRISP SET [ ] Distinguish Apples
U = CRISP SET [ ] Set (Apples ) = CRISP SET [ ] Distinguish Apples ASSIGN DEGREES OF MEMBERSHIP [1] [0] [0] [0] [1] [0] [1]
Distinguish Red Apples FUZZY SET
Distinguish Red Apples 1 2 3 4 5 6 7 8 9 10
Distinguish Red Apples 1 2 3 4 5 6 7 8 9 10 ( Assign membership functions)
MEMBERSHIP FUNCTION DEGREE OF BELONGINGNESS PROBABILITY OF AN ELEMENT BELONGING TO A SET VARY BETWEEN 0 AND 1 DENOTED BY µ
[ (1,0.1), (2,0.8), (3,1), (4,0.2), (5,0.5), (6,0.3), (7,0.6), (8,0.7), (9,0.9), (10,4) ] Ã = Representation of a FUZZY SET = { (x, µ(x )), x є X } Ã Here , µ = membership function
SOME MORE EXAMPLES OF FUZZY SETS AND SITUATIONS
20, 40, 60, 80, 100
Conventional Logic: HOT ≥ 80 Membership Functions: HOT = 1 NOT HOT = 0 Let set of temperatures qualified as Hot be H Crisp Set Representation: H = [80, 100] U = [ 20 , 40, 60, 80, 100 ] [0] [0] [0] [1] [1]
Fuzzy Logic: Hotness defined by degrees of membership Membership Functions: 2 0 (NOT HOT) = 0.2 40 (SOMEWHAT HOT) = 0.4 60 (HOT) = 0.6 80 (VERY HOT) = 0.8 100 (EXTREMELY HOT) = 1 Let set of temperatures qualified as Hot be H Fuzzy Set Representation : {(x, µ(x)), x є U } H = [ (20,0.2), (40,0.4), (60,0.6), (80,0.8), (100,1) ] U = [ 20 , 40 , 60 , 80 , 100 ] [0.2] [0.4] [0.6] [0.8] [1]
LINGUISTIC VARIABLE HEIGHT WEIGHT AGE EDUCATION LINGUISTIC TERM TALL, VERY TALL, SHORT, SOMEWHAT SHORT HEAVY, LIGHT, VERY HEAVY, VERY LIGHT YOUNG, OLD, NOT OLD, VERY YOUNG PRIMARY, SECONDARY, 10, 10+2, GRADUATE, POST GRADUATE, PhD
FUZZY INFERENCE SYSTEM key unit of a fuzzy logic system having decision making as its primary work output from FIS is always a fuzzy set irrespective of its input which can be fuzzy or crisp A de- fuzzification unit would be there with FIS to convert fuzzy variables into crisp variables
Functional Blocks of Fuzzy Inference System Fuzzification Interface Unit − converts the crisp quantities into fuzzy quantities Rule Base − contains fuzzy IF-THEN rules Database − defines the membership functions of fuzzy sets used in fuzzy rules Decision-making Unit − performs operation on rules De- fuzzification Interface Unit − converts the fuzzy quantities into crisp quantities
Fuzzification unit - converts the crisp input into fuzzy input K nowledge base - collection of rule base and database is formed upon the conversion of crisp input into fuzzy input De- fuzzification unit - fuzzy input is finally converted into crisp output Working of Fuzzy Inference System
Determine the best circulation level Inputs are the current temperature and moisture level FUZZY RULES IF the room is hot THEN circulate the air a lot IF the room is cool THEN do not circulate the air IF the room is cool and moist THEN circulate the air slightly If an input does not precisely correspond to an IF THEN rule, partial matching of the input data is used to interpolate an answer Fuzzy IF - THEN Rules
RULE BASE Rule 1: IF x is low AND y is low THEN z is high Rule 2: IF x is low AND y is high THEN z is low Rule 3: IF x is high AND y is low THEN z is low Rule 4: IF x is high AND y is high THEN z is high
Adaptive Neuro -Fuzzy Inference System Integration system in which neural networks are applied to optimize the fuzzy inference system Constructs a series of fuzzy if–then rules with appropriate membership functions I nitial fuzzy rules and membership functions are first set by using human expertise about the outputs to be modeled Then , ANFIS can modify these fuzzy if–then rules and membership functions to minimize the output error measure
Architecture Of ANFIS
Two fuzzy if–then rules are considered Rule 1: If (x is A1) and (y is B1) then (z1 = p1x + q1y+r1 ) Rule 2: If (x is A2) and (y is B2) then (z2 = p2x + q2y+r2) Where, x and y are the inputs Ai and Bi are the fuzzy sets zi (i = 1,2) are the outputs within the fuzzy region pi , qi , and ri are the parameters determined during the training process
Layer 1: Input membership function first layer is used to fuzzificate the inputs, and all the nodes of this layer are adaptive. Its outputs are the membership grade of the inputs. Layer 2: Rule The nodes of this layer are fixed nodes. They are labeled with M, which indicates that they perform as multipliers. The outputs of this layer represent the fuzzy strengths ωi of each rule.
Layer 3: Normalization the nodes are also fixed. These nodes are labeled with N, which means that they play a normalization role to the fuzzy strengths from the previous layer. The normalization factor is computed by the sum of the weight functions. The outputs of this layer are called normalized fuzzy strengths
Layer 5: Output Only one single fixed node, labeled with S, is in this layer. This node performs the sum of the incoming signals Layer 4: Output membership function The nodes of this layer are adaptive ones
Why use Fuzzy Logic in Neural Network? Fuzzy logic is largely used to define the weights, from fuzzy sets, in neural networks. When crisp values are not possible to apply, then fuzzy values are used. We have already studied that training and learning help neural networks perform better in unexpected situations. At that time fuzzy values would be more applicable than crisp values. When we use fuzzy logic in neural networks then the values must not be crisp and the processing can be done in parallel.