Вы находитесь на странице: 1из 7

MATLAB EXERCISES To accompany Neural Networks and Artificial Intelligence for Biomedical Engineering D. Hudson, M.

Cohen, IEEE Press, 1999 The following MATLAB exercises will allow you to develop algorithms to gain more in-depth understanding of the techniques discussed in the above text. MATLAB has a number of toolboxes, many of which are relevant to the content of the text. The organization of the book is given below along with an indication of the toolboxes that are relevant to each chapter indicated by the letter(s) following the chapter title. Relevant MATLAB Toolboxes A: Neural Network B: Optimization C: Symbolic Math D: Fuzzy Logic E: Statistics Part I: Neural Networks Chapter 1:Foundations of Neural Networks Chapter 2 Classes of Neural Networks Chapter 3 Classification Networks and Learning Chapter 4 Supervised Learning Chapter 5 Unsupervised Learning Chapter 6 Design Issues Chapter 7 Comparative Analysis Chapter 8 Validation and Evaluation Part II: Artificial Intelligence Chapter 9 Foundations of Computer-Assisted Decision Making Chapter 10 Knowledge Representation Chapter 11 Knowledge Acquisition Chapter 12 Reasoning Methodologies Chapter 13 Validation and Evaluation Part III:Alternative Approaches Chapter 14 Genetic Algorithms Chapter 15 Probabilistic Systems Chapter 16 Fuzzy Systems Chapter 17 Hybrid Systems Chapter 18 HyperMerge, A Hybrid Expert System Chapter 19 Future Perspectives

A A, B A A A D A A

C C C

A, B, C A, C, E D A-E A, C

The following problems for each chapter are suggestions that should help you to better understand the material. There are many additional applications that you can try on your own for other algorithms in the text. Part I: Neural Networks Chapter 1: Foundations of Neural Networks 1. Use the MATLAB neural network toolbox to implement the perceptron training rule as defined in equation (1.6). For the training set, use the first two vectors in each set from Table 1.1. a. Write down the decision surface. b. Use MATLAB to determine if the remaining vectors are correctly classified. Choose two different vectors from each class from Table 1.1 for the training set. Do you get the same results a. In terms of the decision surface? b. In terms of the classification results?

2.

3.

Add the third variable that indicates whether PVCs are present on the ECG. This is a binary variable with 1 indicating presence and 0 indicating absence. The following are the additional values for the ten vectors x1 1 x2 0 x3 1 x4 1 x5 1 x6 0 x7 0 x8 1 x9 0 x10 0 Repeat exercises 1 and 2 with these three variables. Chapter 2: Classes of Neural Networks 1. Using MATLAB, implement an algorithm to evaluate the following input to implement each of the transfer functions illustrated in Figure 2.2. Test each of these with the following input values and weights: Input values: 1 Weights .5 -1 .3 -1 .2 1 .1 1 .1

2.

a. b.

Implement an algorithm for the BAM method. Design a set of test data for this model. Set up an algorithm for the Hopfield net as an association model. How does this algorithm change for the Hopfield net as an optimization model? Implement an algorithm for the radial basis function. In what important way is this method different from the previous algorithms?

3.

a. b.

4.

a. b.

Chapter 3: Classification Networks and Learning 1. 2. 3. Test the BAM algorithm that you wrote for Chapter 2 with the data in Table 3.1. Do the same with the Hopfield algorithm. Do you get the same results for 1 and 2?

Chapter 4: Supervised Learning 1. In chapter 1, we discussed a gradient descent procedure, the perceptron. A modification of the gradient descent is the relaxation algorithm. Implement the relaxation algorithm using MATLAB. Implement the Ho-Kashyap algorithm. Make up test data and compare the performance of the Ho-Kashyap with the relaxation algorithm. Set up an algorithm for backpropagation and test it using the same data as in (2).

2. 3.

Chapter 5: Unsupervised Learning 1. Set up an algorithm using MATLAB for Kohonen competitive learning. How is this algorithm different than those in Chapter 4? Make up test data to check your algorithm. How is this test data different from the test data you used in the problems in Chapter 4? Set up an algorithm using the ART (Adaptive Resonance Theory) algorithm. Compare results with the Kohonen competitive learning algorithm. Design and implement a clustering algorithm for three-dimensional data that uses the nearest neighbor rule. Use the Euclidean distance as the measure.

2. 3.

Chapter 6: Design Issues 1. 2. 3. 4. Figure 6.4 shows a fuzzy membership function. MATLAB define this membership function. Using the fuzzy logic toolbox in

Define the membership function for the patient data in Figure 6.4 Can you find a method for computing the intersection of the above membership functions? For the algorithms that you implemented in Chapters 1-5, which was the easiest to implement? Why?

Chapter 7: Comparative Analysis 1. 2. 3. 4. Implement a general algorithm for gradient descent procedures. List as many algorithms as you can that are special cases of the algorithm that you developed in problem 1. Test your general algorithm to see if each of these special cases works. Design a general clustering algorithm in which you can change the metric to any of the following: a. b. c. Chapter 8 1. Euclidean City block Hamming.

Validation and Evaluation

Design a training set for testing a supervised classification network with the following characteristics: a. Two-category problem b. Four features c. At least twelve cases with at least six in each category. Divide the data into two sets, a training set and a test set. Use the training set to establish a decision surface with one of the supervised learning algorithms you have designed in one of the previous exercises. Use the test set to see how successful your classification is.

2. 3. 4.

5.

Change your data to set up a training set for a self-organizing network. Use it in one of the previously implemented algorithms. How do you test to see how good your results are? Part II: Artificial Intelligence

Chapter 9: Foundations of Computer-Assisted Decision Making (No MATLAB problems for this chapter.) Chapter 10: Knowledge Representation 1. 2. 3. 4. 5. 6. Using the symbolic math toolbox, design an algorithm to evaluate binary production rules such as those shown in the example in Section 10.1.3. Design an algorithm to evaluation extended production rules as shown in Figure 10.1.4. Make certain that the binary production rules are a special case of this algorithm. Design an algorithm to do the EMERGE scoring as illustrated in Figures 10.2 and 10.3. Set up a symbolic structure for computer storage of frames such as those illustrated in Section 10.2.1. Design an algorithm for evaluating simple semantic information using the syntax defined in Section 10.4.1. Test your structure using the example in 10.4.4. Design an algorithm for evaluating the semantic tree in Figure 10.9.

Chapter 11: Knowledge Acquisition 1. 2. Develop a suitable symbolic representation for the arch problem in Figure 11.4 Implement the Winstons learning algorithm in Section 11.3.3.2 based on your symbolic representation from problem 1.

Chapter 12: Reasoning Methodologies 1. 2. 3. Implement an algorithm that performs graph unfoldment. Test in on examples 12.4-12.6. Implement an algorithm that converts a finite ordered directed forest into a binary tree. Implement an algorithm for a depth-first search.

4.

Implement an algorithm for the ordered searching of AND/OR trees.

Chapter 13: Validation and Evaluation (No MATLAB problems for this chapter.) Part III: Alternative Approaches Chapter 14 1. 2. 3. Genetic Algorithms

Set up an algorithm for the hill-climbing optimization approach. Set up an algorithm for the simulated annealing approach. Design a data set for the above and compare the performance of the two algorithms. Probabilistic Systems

Chapter 15 1. 2. 3. 4.

Using the Neural Network Toolbox, set up an algorithm for Bayesian learning. Implement an algorithm that will handle decision trees similar to the example in Figure 15.2. Using the Statistics Toolbox, set up an algorithm for parameter estimation for the normal distribution. Using the Statistics Toolbox, set up an algorithm for regression. Can you generate a tree such as the one in Figure 15.4? Fuzzy Systems

Chapter 16 1. 2. 3. 4.

Use the Fuzzy Logic Toolbox to set up trapezoidal membership functions that represent systolic blood pressure ranges for low, normal, and high. Set up a triangular membership function for a patients systolic blood pressure. Design an algorithm that will match the patient information with the ranges for low, normal, and high. Set up an algorithm that will perform the implication If (blood pressure is low) then (patient may have MI).

Chapter 17 1. 2.

Hybrid Systems

Design an algorithm that combines fuzzy logic concepts with a neural network structure. Design an algorithm that combines fuzzy logic concepts with a symbolic reasoning structure. HyperMerge, A Hybrid Expert System

Chapter 18 1. 2. 3.

Write an algorithm to implement the special case of Hypernet with the decision function given in equation (18.9). Expand the algorithm in (1) to include a symbolic layer as illustrated in Figure 18.5. Set up a sample application with data to test the algorithm in (2). Future Perspectives

Chapter 19

(No MATLAB problems for this chapter.)

Вам также может понравиться