FUZZY CLUSTERING AND ANFIS 2009/2010. 2  Underfitting : M51 demolm2  Overfitting: M51: demolm3  ANFIS  ANFIS GUI  Example1 (training data: clusterdemo.dat)

Slides:



Advertisements
Similar presentations
FUNCTION FITTING Student’s name: Ruba Eyal Salman Supervisor:
Advertisements

Applied Econometrics Second edition
Microsoft Office 2007 Access Chapter 3 Maintaining a Database.
AI – CS289 Fuzzy Logic - Labs Fuzzy Logic – Lab 2 12 th October 2006 Dr Bogdan L. Vrusias
Microsoft Office 2007 Excel Chapter 8 Formula Auditing, Data Validation, and Complex Problem Solving.
Copyright 2003 Peter McDevitt 1 Microsoft Excel 2002 Lecture 3 – A Professional Looking Worksheet.
ASENT_FMECA_LAB.PPT FMECA Lab Last revised 08/14/2014.
1 Doing Statistics for Business Doing Statistics for Business Data, Inference, and Decision Making Marilyn K. Pelosi Theresa M. Sandifer Chapter 5 Analyzing.
By Hrishikesh Gadre Session II Department of Mechanical Engineering Louisiana State University Engineering Equation Solver Tutorials.
XP New Perspectives on Microsoft Office Excel 2003, Second Edition- Tutorial 3 1 Microsoft Office Excel 2003 Tutorial 3 – Developing a Professional- Looking.
The IDE (Integrated Development Environment) provides a DEBUGGER for locating and correcting errors in program logic (logic errors not syntax errors) The.
EGR 106 – Week 2 – Arrays & Scripts Brief review of last week Arrays: – Concept – Construction – Addressing Scripts and the editor Audio arrays Textbook.
Neuro-Fuzzy Control Adriano Joaquim de Oliveira Cruz NCE/UFRJ
Formula Auditing, Data Validation, and Complex Problem Solving
Generation of atlas graphs & charts. Objective The major objective this training session is to equip participants with the knowledge and skills of creating.
Matlab Fuzzy Toolkit Example
8/6/2015Auto Attendants 1 Smarter Communications.
Ranga Rodrigo April 5, 2014 Most of the sides are from the Matlab tutorial. 1.
XP 1 Microsoft Office Excel Developing a Professional-Looking Worksheet.
COMPREHENSIVE Excel Tutorial 8 Developing an Excel Application.
Digital Image Processing Lecture3: Introduction to MATLAB.
Technology Basics Creating Worksheet Formulas. 2 Understand Formulas Equations used to calculate values in cells are called formulas. Formulas consist.
EPSII 59:006 Spring Topics Using TextPad If Statements Relational Operators Nested If Statements Else and Elseif Clauses Logical Functions For Loops.
AE4131 ABAQUS Lecture Part IV
1 Doing Statistics for Business Doing Statistics for Business Data, Inference, and Decision Making Marilyn K. Pelosi Theresa M. Sandifer Chapter 11 Regression.
8 Copyright © 2004, Oracle. All rights reserved. Creating LOVs and Editors.
NUMERICAL EXAMPLE APPENDIX A in “A neuro-fuzzy modeling tool to estimate fluvial nutrient loads in watersheds under time-varying human impact” Rafael Marcé.
Microsoft Office Excel 2003 Tutorial 3 – Developing a Professional-Looking Worksheet.
Extraction of Fetal Electrocardiogram Using Adaptive Neuro-Fuzzy Inference Systems Khaled Assaleh, Senior Member,IEEE M97G0224 黃阡.
1 1 Slide © 2004 Thomson/South-Western Slides Prepared by JOHN S. LOUCKS St. Edward’s University Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
1 Performing Spreadsheet What-If Analysis Applications of Spreadsheets.
October 13, MATLAB Fuzzy Logic Toolbox Intelligent Control.
RAČUNARSKI ALGORITMI U BIOINFORMATICI
Recap Summary of Chapter 6 Interpolation Linear Interpolation.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Neuro-Fyzzy Methods for Modeling and Identification Part 2 : Examples Presented by: Ali Maleki.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
Fuzzy Logic Toolbox in MATLAB Praktikum 10. example  We want to buid FIS Mamdani, with this rules :  1. If the service is poor or the food is rancid,
ANFIS (Adaptive Network Fuzzy Inference system)
SPSS- Tutorial The following power-point slides show you how to use some of the features in SPSS. A survey of 20 randomly selected companies asked them.
Prof. dr Zikrija Avdagić, dipl.ing.el. ANFIS Editor GUI ANFIS Editor GUI.
Fall 2003Sylnovie Merchant, Ph.D. ACCESS Tutorial Note: The purpose of this tutorial is to provide an introduction to some of the functions of ACCESS in.
1 1 Slide © 2003 South-Western/Thomson Learning™ Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
Slide 1 Using Menu Bar & Common Dialog Boxes. Slide 2 Setting Up the Main Items v First open the form on which you want the menu located v Then start.
Image Source: ww.physiol.ucl.ac.uk/fedwards/ ca1%20neuron.jpg
INTRODUCTION TO MATLAB Dr. Hugh Blanton ENTC 4347.
Modify Tables and FieldsModify Tables and Fields Lesson 4 © 2014, John Wiley & Sons, Inc.Microsoft Official Academic Course, Microsoft Word Microsoft.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
1 CA202 Spreadsheet Application Focusing on Specific Data using Filters Lecture # 5.
PMS RI 2010/2011 Prof. dr Zikrija Avdagić, dipl.ing.el. ANFIS Editor GUI ANFIS Editor GUI.
MATLAB and SimulinkLecture 61 To days Outline Graphical User Interface (GUI) Exercise on this days topics.
Introduction to Programming on MATLAB Ecological Modeling Course Sep 11th, 2006.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
Introduction of Fuzzy Inference Systems By Kuentai Chen.
Microsoft Visual C# 2010 Fourth Edition Chapter 3 Using GUI Objects and the Visual Studio IDE.
It’s always important that all of your nodes be numbered. So the way to do that is to go to Options at the top of the screen then select Preferences. When.
A Presentation on Adaptive Neuro-Fuzzy Inference System using Particle Swarm Optimization and it’s Application By Sumanta Kundu (En.R.No.
Formula Auditing, Data Validation, and Complex Problem Solving
Excel Tutorial 8 Developing an Excel Application
TUTORIAL 4 POST-PROCESSING
IET 603 Minitab Chapter 12 Christopher Smith
Fuzzy Logic Toolbox Analysis and Design.
MATLAB Fuzzy Logic Toolbox
3.01 Apply Controls Associated With Visual Studio Form
3.01 Apply Controls Associated With Visual Studio Form
Dr. Unnikrishnan P.C. Professor, EEE
Digital Image Processing
A Step-by-Step Procedure for Preparing BBS Sheets with Manual Entry of Each Bar is shown here Select BarBeQue 2009 Icon From Desktop Start Program BarBeQue.
INTRODUCTION TO MATLAB
Analyzing Bivariate Data
Presentation transcript:

FUZZY CLUSTERING AND ANFIS 2009/2010

2  Underfitting : M51 demolm2  Overfitting: M51: demolm3  ANFIS  ANFIS GUI  Example1 (training data: clusterdemo.dat)  Example2 (training data: fuzex1trnData.dat checking data: fuzex1chkdata.dat ) TOPICS

Sugeno Fuzzy Sistem Fuzzy Pravila If x is A 1 and y is B 1 then f = p 1 *x + q 1 *y + r 1 If x is A 2 and y is B 2 then f = p 2 *x + q 2 *y + r 2 Fuzzy Skupovi i Fuzzy rezonovanje A1A1 B1B1 A2A2 B2B2 x=3 X X Y Y y=2 w1 w2 f 1 = p 1 *x+q 1 *y+r 1 f = f 2 = p 2 *x+q 2 *y+r 2 w 1 +w 2 w 1 *f 1 +w 2 *f 2  f 1 =y 1 * f 2 =y 2 *

PARALELA SUGENO MODEL-ANFIS A1A1 B1B1 A2A2 B2B2 w1 w2 f 1 = p 1 *x+q 1 *y+r 1 f 2 = p 2 *x+q 2 *y+r 2 f = w 1 +w 2 w 1 *f 1 +w 2 *f 2 x y parametri premise parametri posljedice A1A1 A2A2 B1B1 B2B2  x y w1w1 w2w2 w 1 *f 1 w 2 *f 2  w i *f i     x y w1w1 w2w2 Sloj 1Sloj 2Sloj 3Sloj 4Sloj 5 ANFIS Funkcionalno govoreći, ANFIS arhitektura je kompletno ekvivalenta Sugeno fuzzy sistemu zaključivanja. Takođe, implementiranjem fuzzy kontrolera kao ANFIS-a, možemo lako primijeniti backpropagation metod učenja kako bi pronašli parametre kontrolera za koje se postiže najmanja izmjerena greška. SUGENO

Sloj 1 ANFIS-a Parametri premise Parametri posljedice A1A1 A2A2 B1B1 B2B2  x y w1w1 w2w2 w 1 *f 1 w 2 *f 2  w i *f i     x y w1w1 w2w2 Sloj 1Sloj 2Sloj 3Sloj 4Sloj 5 ili se nazivaju Parameteri Premise

Sloj ANFIS-a Parametri premise parametri posljedice A1A1 A2A2 B1B1 B2B2  x y w1w1 w2w2 w 1 *f 1 w 2 *f 2  w i *f i     x y w1w1 w2w2 Sloj 1Sloj 2Sloj 3Sloj 4Sloj 5 2

Sloj of ANFIS parametri premise Parametri posljedice A1A1 A2A2 B1B1 B2B2  x y w1w1 w2w2 w 1 *f 1 w 2 *f 2  w i *f i     x y w1w1 w2w2 Sloj 1Sloj 2Sloj 3Sloj 4Sloj 5 3

Sloj ANFIS-a parametri premise parametri posljedice A1A1 A2A2 B1B1 B2B2  x y w1w1 w2w2 w 1 *f 1 w 2 *f 2  w i *f i     x y w1w1 w2w2 Sloj 1Sloj 2Sloj 3Sloj 4Sloj 5 se nazivaju Parameteri Posljedice 4

Sloj ANFIS-a parametri premise parametri posljedice A1A1 A2A2 B1B1 B2B2  x y w1w1 w2w2 w 1 *f 1 w 2 *f 2  w i *f i     x y w1w1 w2w2 Sloj 1Sloj 2Sloj 3Sloj 4Sloj 5 O5O5 5

ANFIS učenje A1A1 A2A2 B1B1 B2B2  x y w1w1 w2w2 w 1 *f 1 w 2 *f 2  w i *f i   Parametri premise Parametri posljedice   x y w1w1 w2w2 fiksni najmanji kvadrat back propagation fiksni Forward prolazBackward prolaz Param.MF (premise) Param.pravila (posljedice)

Modeling Scenario Suppose you want to apply fuzzy inference to a system for which you already have a collection of input/output data that you would like to use for modeling, You do not necessarily have a predetermined model structure based on characteristics of variables in your system. In some modeling situations, you cannot discern what the membership functions should look like simply from looking at data. Rather than choosing the parameters associated with a given membership function arbitrarily, these parameters could be chosen so as to tailor the membership functions to the input/output data in order to account for these types of variations in the data values. In such cases, you can use the Fuzzy Logic Toolbox neuro-adaptive learning techniques incorporated in the anfis command.

What is ANFIS?  The acronym ANFIS derives its name from adaptive neuro-fuzzy inference system.  Using a given input/output data set, the toolbox function anfis constructs a fuzzy inference system (FIS) whose membership function parameters are tuned (adjusted) using either a backpropagation algorithm alone or in combination with a least squares type of method.  This adjustment allows your fuzzy systems to learn from the data they are modeling.

ANFIS EDITOR GUI Model validation using testing and checking data

14 Loading and Plotting the Data To load a data set in the GUI, perform either of the following actions: Click Load Data, and select the file containing the data. Open the GUI with a data set directly by invoking findcluster with the data set as the argument, in the MATLAB Command Window. The data set must have the extension.dat. For example, to load the data set, clusterdemo.dat, type findcluster('clusterdemo.dat'). The Clustering GUI Tool works on multidimensional data sets, but displays only two of those dimensions on the plot. Clustering GUI Tool

PROCEDURE 1. Run MATLAB 2. load clusterdemo.dat 3. anfisedit choice subclustering 6. generate FIS Model validation using testing data from clusterdemo.dat

FIS: INPUT/OUTPUT

RULES AND SURFACE

MODEL STRUCTURETRAINING A F T E R T R A I N I N G

TEST

Model validation using testing and checking data Model validation is the process by which the input vectors from input/output data sets on which the FIS was not trained, are presented to the trained FIS model, to see how well the FIS model predicts the corresponding data set output values. This is acomplished with the ANFIS editor GUI using the so-called testing data set. We can also use another type of data set for model validation and that data validation set is referred to as the checkong data set and this set is used to conrol the potential for model overfitting the data When checking data is presented to ANFIS as well as training data, the FIS model is selected to have parameters associated with the minimum checking data model error.

ANFIS Editor GUI Example 1: Checking Data Helps Model Validation Loading data

The training data set The horizontal axis is marked data set index. This index indicates the row from which that input data value was obtained (whether or not the input is a vector or a scalar).

4 To load the checking data set from the workspace: a In the Load data portion of the GUI, select Checking in the Type column. b Click Load Data to open the Load from workspace dialog box. c Type fuzex1chkData as the variable name and click OK. The checking data appears in the GUI plot as pluses superimposed on the training data.

Initializing and Generating Your FIS Automatic FIS Structure Generation To initialize your FIS using anfis: 1 Choose Grid partition, the default partitioning method. The two partition methods, grid partitioning and subtractive clustering,. 2 Click on the Generate FIS button. Clicking this button displays a menu from which you can choose the number of membership functions, MFs, and the type of input and output membership functions. There are only two choices for the output membership function: constant and linear. This limitation of output membership function choices is because anfis only operates on Sugeno-type systems. 3 Fill in the entries as shown in the following figure, and click OK.

Viewing Your FIS Structure After you generate the FIS, you can view the model structure by clicking the Structure button in the middle of the right side of the GUI. A new GUI appears, as follows. The branches in this graph are color coded. Color coding of branches characterize the rules and indicate whether or not and, not, or or are used in the rules. The input is represented by the left- most node and the output by the right-most node. The node represents a normalization factor for the rules. Clicking on the nodes indicates information about the structure. You can view the membership functions or the rules by opening either the Membership Function Editor, or the Rule Editor from the Edit menu.

ANFIS Training The two anfis parameter optimization method options available for FIS training are hybrid (the default, mixed least squares and backpropagation) and backpropa (backpropagation). Error Tolerance is used to create a training stopping criterion, which is related to the error size. The training will stop after the training data error remains within this tolerance. This is best left set to 0 if you are unsure how your training error may behave. To start the training: 1 Leave the optimization method at hybrid. 2 Set the number of training epochs to 40, under the Epochs listing on the GUI. 3 Select Train Now. The following window appears on your screen. The plot shows the checking error as ♦ ♦ on the top. The training error appears as * * on the bottom. The checking error decreases up to a certain point in the training, and then it increases. This increase represents the point of model overfitting. anfis chooses the model parameters associated with the minimum checking error (just prior to this jump point). This example shows why the checking data option of anfis is useful.

Testing Your Data Against the Trained FIS To test your FIS against the checking data, select Checking data in the Test FIS portion of the ANFIS Editor GUI, and click Test Now. When you test the checking data against the FIS, it looks satisfactory.

Loading More Data with ANFIS If you load data into ANFIS after clearing previously loaded data, you must make sure that the newly loaded data sets have the same number of inputs as the previously loaded ones did. Otherwise, you must start a new anfisedit session from the command line. Without Checking Data Option and Clearing Data If you do not want to use the checking data option of ANFIS, then do not load any checking data before you train the FIS. If you decide to retrain your FIS with no checking data, you can unload the checking data in one of two ways: Select the Checking option button in the Load data portion of the ANFIS Editor GUI, and then click Clear Data to unload the checking data. Close the ANFIS Editor GUI, and go to the MATLAB command line, and retype anfisedit. In this case you must reload the training data. After clearing the data, you must regenerate your FIS. After the FIS is generated, you can use your first training experience to decide on the number of training epochs you want for the second round of training.

Questions 1.What is underfitting by neural network? 2.What is overfitting by neural network? 3.What is ANFIS? 4.Which learnig method can use ANFIS? 5.Why we use validation based on checking data? 6.What is diference between training data, test data and checking data?