A Method for Membership Function Generation from Training Samples Yvonne C. Lucero and Patricia A. Nava, Ph.D. Department of Electrical and Computer Engineering University of Texas at El Paso El Paso, TX 79968 Voice: (915) 747-5994 Fax: (915) 747-7871 Email: ylucero@utep.edu Email: pnava@ece.utep.edu ABSTRACT:In the early 1980’s, Japan became the first to implement fuzzy logic in various commercial products. Since then, fuzzy systems have been touted as the solution to complex problems because there is no need to develop a mathematical model for the problem to arrive at a solution. The solution consists of constructing rules that apply when input values lie within certain designer-defined categories. The major disadvantage of this approach lies in defining the categories, called membership functions, for each input parameter – i.e. use of this method requires some form of expert knowledge in order to define these membership functions. The efficiency or accuracy of the fuzzy system is then proportional to the designer’s expertise in the application area. In cases where expert knowledge is unavailable, defining the membership functions is a major hurdle. Several methods have been proposed for automatic generation of membership functions. This study describes the implementation of one such method, and examines its application to the identification of vowel sounds in spoken English. 1. INTRODUCTION Fuzzy logic and fuzzy sets are effective tools for modeling complex mathematical problems with parameters that demonstrate uncertainty [1]. Many current commercial applications, such as vacuum cleaners and cameras, benefit from using fuzzy logic. Extensive research has led to the creation of fuzzy logic software tools used to model and create solutions to many types of problems. The main obstacle faced by most software tools is the problem of effectively mapping specific, numerical data into linguistic variables and their associated membership functions. Linguistic variables are used for system input and output, and are represented by words such as “size,” “age,” and “temperature”. These words are ambiguous or uncertain. A fuzzy set is creat- ed to describe the linguistic variables in more detail. The linguistic variable “age,” for instance, may have overlapping categories (members) of “young,” “very young,” “middle age,” “old,” and “very old.” Once these categories, or members are defined, the fuzzy set is obtained, and a membership function is then developed for each member in the set. Historically, developing the number of members in a set and their associated membership functions was a task that required expert knowledge of the application area [2]. A recent methodology was developed to automatically generate membership functions by Hong, et al. [3]. This new methodology was applied to a set of data used for a speaker-independent voice recognition application. The following section gives an overview of fuzzy theory; section 3 describes the algorithm in detail, implementation and results are discussed in section 4, and conclusion in section 5. 2. FUZZY SETS Fuzzy logic and fuzzy sets were first introduced by Lotfi A. Zadeh. Fuzzy sets were derived from generalizing the concept of set theory. Fuzzy sets can be thought of as an extension of classical sets [4]. In a classical set or crisp set, the objects in a set are called elements or members of the set. An element x belonging to a set A is defined as x A, an element that is not a member in A is noted as x A. A characteristic function or membership function A(x) is defined as an element in the universe U having a crisp value of 1 or 0. For every x U, 1 for x A, 0 for x A. A x this can also be expressed as A x 0,1 . (1) For the classical set or crisp set, membership functions take a value of 1or 0, for fuzzy sets, the membership function can take values in the interval [0,1]. The range between 0 and 1 is referred to as the membership grade or degree of membership [5]. A fuzzy set A is defined below: A x, A x | x A, A x 0,1 (2) Where A(x) is a membership function belonging to the interval [0,1]. Two operations that are widely used in set theory are the union and intersection. The union and intersection of A and B can be defined as: and AB max A , B , (3) AB min A , B . (4) These two operations are used in the algorithm for deriving the membership functions in the following section. 3.0 GENERATING MEMBERSHIP FUNCTIONS The method proposed by Hong, et al. [3] automatically generates membership functions. This method partitions a set of data into classes that can be used to derive membership functions. The procedure of the algorithm has several major steps and consists of clustering the data into classes. The membership functions are then generated from the classes obtained. The algorithm is described for one parameter, and is detailed below. Step 1. Given a data set, there are n training samples. The values for the parameter in question, X x1 , x2 ,, xn , are sorted into ascending or der, denoted as Y sort[X ] y1, y2 ,, y n . The values are sorted to find an association between adjacent values. Step 2. The difference between adjacent values in the sorted data is determined. The difference obtained will provide a way to calculate the similarity between adjacent values. The difference for a set of training set data is: diff i yi 1 yi , for i=(1,2,3,…n-1), (5) where yi and yi+1 are adjacent values in the sorted data. Step 3. Find the similarities between adjacent values. The formula below finds the similarities between adjacent values and maps them into real numbers between 0 and 1. diff i for diff i C * s , 1 si C * s 0 otherwise, (6) where diffi is the difference between adjacent data, s is the standard deviation of diffi, and C is the control parameter. The control parameter is used to determine the shape of the membership function. Step 4. The data is grouped according to similarities. A threshold value, , divides adjacent values into classes. The number of classes determines the number of membership functions. Determination of the number of classes can be summarized by a rule: If the similarity is greater than the threshold value, then the two adjacent values belong to the same class, otherwise the values are divided into different classes. That is, a new class is created. Expressed as a formula, IF ( s i ) THEN y i , y i 1 C i , ELSE y i C i , y i 1 C i 1 (7) where Ci and Ci+1 denote two distinct classes for the same input or output parameter. Step 5. The membership function for each class is defined. There are several types of membership functions such as triangular, trapezoidal, and gaussian, to name a few. One of the simplest membership functions is the triangular membership function, and will be used for the remainder of the equations. The triangular membership function for class j consists of three points: the central vertex point, bj, and the two endpoints, aj and cj. The central vertex point is determined for each class and is calculated by the given formula: bj si si 1 s s k 1 y k 1 * k 2 y k * s k 1 2 2 s si 1 s s k 1 si i k 2 s k 1 2 2 yi * si yi 1 * (7) where j represents the jth class, k represents the ending data index for this class, i.e., data yi through yk fall into class j, and si is the similarity between yi and yi+1. The endpoints of the membership function, aj and cj, are obtained using interpolation. The following equations determine the left and right endpoints. a j bj cj bj b j yi (8) 1 j ( yi ) yk b j (9) 1 j ( yk ) Where aj is the left endpoint and cj is the right endpoint. j(yi) and j(yk) is the membership determined by the formula: j yi j yk minsi , si 1 ,, sk 1 (10) where k represents the maximum data index value within the class. The membership functions for the classes determined by this method are shown below: Fuzzy Values 1 ······ 0 ai ci ak ck 4. IMPLEMENTATION The algorithm described in the previous section was implemented in C, using equations (5) through (10). The C program is currently being tested using the Vowel data set, described below. Data The application problem that will serve as a testbench for this study is Vowel, one of a collection of data sets used as a neural network benchmarks [6]. It is used for speaker-independent speech recognition of the eleven vowel sounds from multiple speakers. The Vowel data set used in this study was originally collected by Deterding [7], who recorded examples of the eleven steady state vowels of English spoken by fifteen speakers for a “non-connectionist” [7] speaker normalization study. Four male and four female speakers were used to create the training data, and the other four male and three female speakers were used to create the testing data. The actual composition of the data set consists of 10 inputs, which are obtained by sampling, filtering and carrying out linear predictive analysis. Specifically, the speech signals were low pass filtered at 4.7 kHz and digitized to 12 bits with a 10 kHz sampling rate. Twelfth order linear predictive analysis was carried out on six 512 sample Hamming windowed segments from the steady part of the vowel. The reflection coefficients were used to calculate 10 log area parameters, giving a 10 dimensional input space [7]. Each speaker thus yielded six frames of speech from eleven vowels. This results in 528 frames from the eight speakers used for the training set, and 462 frames from the seven speakers used to create the testing set. This is a small database, but the values are diverse and thus Vowel is an excellent testbench for the module that produces these membership functions. The membership functions for each input parameter in the database are obtained using the code developed to implement the algorithm. Current work is being done in finding a systematic way of determining the threshold and control parameters. The similarities obtained in section 3 will be used as the starting point in determining the above parameters. 5. CONCLUSIONS Fuzzy logic has been used in many applications [8]. One study showed that fuzzy techniques incorporated into a neural network operation improved its performance [9]. In speakerindependent voice recognition, studies have shown that there is an improvement in performance compared to a neural network alone [10]. The study being carried out, and presented in this paper, intends to provide a tool to improve and potentially automate the selection of membership functions. With a module that automatically creates membership functions for a system’s input parameters, neuro-fuzzy systems that utilize fuzzy sets will be much more efficient. The author’s current neurofuzzy system requires expert knowledge for its membership functions [11]. By incorporating the results of this study, the applications for this system abound. REFERENCES [1] Kosko, Bart, Neural Networks and Fuzzy Systems: A Dynamical Approach to MachineIntelligence, Prentice Hall, Englewood Cliffs, NJ, 1992. [2] Self, Kevin, “Designing with fuzzy logic,” IEEE Spectrum, Nov. 1990, p. 42-44, 105. [3] Hong, Tzung-Pei and C. Lee, “Induction of fuzzy rules and membership functions from training examples,” Fuzzy Sets and Systems, Vol. 84, pp. 33-47, Nov. 1996. [4] Klir, G.J., and Yuan, B., Fuzzy Sets and Fuzzy Logic: Theory and Applications, Prentice Hall Inc., Upper Saddle River, NJ, 1995. [5] Bojadziev, G. and M. Bojadziev, Fuzzy Sets, Fuzzy Logic, Application, World Scientific, New Jersey, 1995. [6] Carnegie Mellon University Neural Network Benchmark Collection, Pittsburgh, PA, 1994. [7]Deterding, D.H. Speaker Normalization for Automatic Speech Recognition, Ph.D. Dissertation, Cambridge, England, 1989. [8] Zadeh, L.A., Fuzzy Sets and Applications: Selected Papers by L. A. Zadeh, John Wiley & Sons, New York, 1987. [9] Nava, P. and J. Taylor, “The Optimization of Neural Network Performance through Incorporation of Fuzzy Theory,” Proceedings of The Eleventh International Conference on Systems Engineering (ICSE’96), pp. 897-901. [10] Nava, P. “A Neuro-Fuzzy System for Speech Recognition,” Proceedings of the 1998 International Congress on Electronics and Electrical En- gineering (ELECTRO 98), pp. 503-507, Chihuahua, Mexico, October 1998. [11] Nava, P., “Implementation of Neuro-Fuzzy Systems Through Interval Mathematics,” Proceedings of the 1998 IEEE International Joint Conference on the Science and Technology of Intelligent Systems: IEEE International Symposium on Intelligent Control, IEEE International Symposium on Computational Intelligence in Robotics and Automation, Intelligent Systems and Semiotics (ISIC/CIRA/ISAS 98), pp. 365 – 369, NIST, Gaithersburg, MD, September 1998.