UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

Estimation of the level of anesthesia during surgery by automatic EEG pattern recognition McEwen, James Allen 1975

Your browser doesn't seem to have a PDF viewer, please download the PDF to view this item.

Item Metadata

Download

Media
831-UBC_1975_A1 M33_6.pdf [ 10.56MB ]
Metadata
JSON: 831-1.0065438.json
JSON-LD: 831-1.0065438-ld.json
RDF/XML (Pretty): 831-1.0065438-rdf.xml
RDF/JSON: 831-1.0065438-rdf.json
Turtle: 831-1.0065438-turtle.txt
N-Triples: 831-1.0065438-rdf-ntriples.txt
Original Record: 831-1.0065438-source.json
Full Text
831-1.0065438-fulltext.txt
Citation
831-1.0065438.ris

Full Text

ESTIMATION OF THE LEVEL OF ANESTHESIA DURING SURGERY BY AUTOMATIC EEG PATTERN RECOGNITION by O JAMES ALLEN McEVJEN B.A.Sc.(Hons.), University of British Columbia, 1971 A THESIS SUBMITTED IN PARTIAL FULFILMENT OF THE REQUIREMENTS FOR THE DEGREE OF . DOCTOR OF PHILOSOPHY in the Department of E l e c t r i c a l Engineering We accept this thesis as conforming to the required standard THE UNIVERSITY OF BRITISH COLUMBIA July 1975 In presenting th i s thesis in pa r t i a l fu l f i lment of the requirements for an advanced degree at the Un ivers i ty of B r i t i s h Columbia, I agree that the L ibrary shal l make it f ree ly ava i l ab le for reference and study. I fur ther agree that permission for extensive copying of th is thes is for scho lar ly purposes may be granted by the Head of my Department or by his representat ives. It is understood that copying or pub l i ca t ion of th i s thes is for f i nanc ia l gain sha l l not be allowed without my wr i t ten permission. Depa rtment The Univers i ty of B r i t i s h Columbia 2075 Wesbrook Place Vancouver, Canada V6T 1W5 A B S T R A C T The f e a s i b i l i t y of developing an automatic electroencephalographic (EEG) pattern recognition system for reliably estimating the level of con-• -sciousness of surgical patients during general anesthesia i s investigated. An effort was made to establish a valid methodology, by iden-t i f y i n g and controlling as many extraneous variables as possible and by ensuring that the work would be relevant to current anesthetic practice. The data base that was established for use i n a l l experimental investiga-tions consists of 938 EEG pattern samples from 72 subjects and three types of anesthesia. Each EEG pattern sample corresponds to one of five possible c l i n i c a l levels of anesthesia. The use of automatic pattern recognition techniques, i n con-junction with heuristic techniques of c l i n i c a l EEG analysis, to develop spectral and time domain EEG pattern recognition systems i s described. A l l of the i n i t i a l l y developed systems extract a small number of heuris-t i c a l l y derived features from unknown EEG pattern samples. The classif i e r s in these systems employ Bayes decision rule under the assumption that the extracted features are s t a t i s t i c a l l y independent. A rationale concerning the choice of this particular feature extraction scheme and pattern clas-s i f i c a t i o n algorithm is presented and discussed. Consideration is given to the general problem of how to use a relatively small set of available EEG pattern samples to effectively evaluate the performance of EEG pattern recognition systems. Two non-parametric techniques which provide particularly informative and efficient estimates of the performance of such systems are formulated. Results obtained by employing these techniques to estimate the performance of the i n i t i a l l y developed spectral and time domain EEG pattern recognition systems are presented. The results clearly demonstrate the f e a s i b i l i t y i i of estimating the level of anesthesia by means of automatic EEG pattern recognition. However, the results also indicate that the i n i t i a l l y dev-eloped systems are not sufficiently reliable for immediate and general c l i n i c a l application. Theoretical techniques are developed to model some relevant s t a t i s t i c a l properties of spontaneous EEG activity, with a view to im-proving the performance of the i n i t i a l l y developed EEG pattern recognition systems. Results which were obtained by applying the modelling techniques to some specific ensembles of EEG pattern samples are presented. The comparative advantages of employing alternate methods of EEG analysis are then discussed i n relation to the estimated s t a t i s t i c a l characteristics of the particular EEG ensembles under consideration. Several factors which, could adversely affect the reliable per-formance of EEG pattern recognition systems in general, and the i n i t i a l l y developed systems in particular, are identified and discussed. Various schemes for improving the performance of the i n i t i a l l y developed systems are suggested and an evaluation of the practicability of each i s presented. i i i TABLE OF CONTENTS Page ABSTRACT . i i TABLE OF CONTENTS iv LIST OF ILLUSTRATIONS V i i i LIST OF TABLES. X ACKNOWLEDGEMENT xi I. INTRODUCTION . . 1 1.1 Problem Area 1 1.2 Evaluation of Previous Research . . . . . . . . . . . . . . 3 1.3 Scope of Thesis 5 II. EXPERIMENTAL CONTROLS AND DATA ACQUISITION 10 2.1 Objectives • • 1 0 2.2 Establishment of Anesthesia Levels . . . 11 2.2.1 Introduction 11 2.2.2 Historical perspective . . . . . . . . . 11 2.2.3 Definition of anesthesia levels . 12 2.3 Acquisition of Experimental Data 14 2.3.1 Types of anesthesia considered 14 2.3.2 Standardized anesthetic technique 14 2.3.3 Data acquisition . . . 16 2.3.4 Control of variables during data acquisition . . . . 19 2.4 Establishment of EEG Data Base 21 2.4.1 Description of analog EEG data collected . . . . . . 21 2.4.2 Digitization and preparation of d i g i t a l EEG data base • 23 III. DEVELOPMENT OF EEG PATTERN RECOGNITION SYSTEMS . . 28 3.1 EEG Pattern Recognition Systems 28 3.1.1 Basic description . . . . . . . . . 28 3.1.2 Development and performance evaluation 29 3.2 Spectral Feature Extraction . . . . 30 3.2.1 EEG spectral analysis 30 iv 3.2.2 Computation of EEG spectra . . . . . . . . . . . . . 31 3.2.3 Spectral feature vectors 33 3.3 Time Domain EEG Feature Extraction 35 3.3.1 Time domain EEG analysis 35 3.3.2 Time domain feature vectors . . . . . . 37 3.4 Classification Algorithm . , 39 3.5 Evaluation of System Performance . . . 43 3.5.1 The performance estimation problem . . . . . . . . . 43 3.5.2 Performance estimation techniques . . 43 3.5.3 The II* technique . 46 3.5.4 The U* technique 47 3.6 Results 48 3.6.1 EEG spectral pattern recognition systems . . . . . . 48 3.6.2 Time domain EEG pattern recognition systems . . . . 53 3.7 Discussion 3.7.1 Spectral and time domain EEG pattern recognition systems 57 3.7.2 Evaluation of EEG pattern recognition approach . . . 60 3.7.3 Further work 63 IV. MODELLING THE STATIONARITY AND GAUSSIANITY OF EEG ACTIVITY . . . 65 4.1 Introduction 65 4.1.1 Motivation 65 4.1.2 Evaluation of previous investigations 65 4.1.3 Outline of chapter 67 4.2 Random Process Characterization 67 4.3 Establishment of Empirical Testing Procedures . 70 4.3.1 Testing for wide-sense stationarity 70 4.3.2 Testing for Gaussianity 71 4.4 Experiment 72 4.4.1 Selection of sample EEG data 72 4.4.2 Determination of optimum sampling rate 73 v 4.4.3 Application of tests for wide-sense stationarity and Gaussianity 75 4.5 Results ?8 4.5.1 Interpretation of results . . . . . . . . . 78 4.5.2 Effect of sampling rate on empirical tests . . . . . 79 4.5.3 Estimated baseline EEG characteristics . . . . . . . 83 4.5.4 Wide-sense stationarity 84 4.5.5 Gaussianity . 84 4.5.6 Wide-sense stationarity and Gaussianity 85 4.6 Significance of Results . . 85 4.6.1 Development of EEG monitoring systems 85 4.6.2 Evaluation of alternate analytic techniques 87 4.6.3 Further work . 88 V. PERFORMANCE IMPROVEMENT SCHEMEF •. 90 5.1 Introduction . . . . . . . . 90 5.2 Extraction of Additional Features . . . . . . . . . . . . . 93 5.2.1 Rationale 93 5.2.2 Definition of additional features . 94 5.2.3 Feature selection 98 5.2.4 Resulting improvement in performance 101 5.3 Exploitation of S t a t i s t i c a l Interdependencies Among Features 107 5.3.1 Method of investigation . . 107 5.3.2 Results and discussion 110 5.4 "Nearest Subject" Scheme . 113 5.4.1 Rationale ." 113 5.4.2 Feas i b i l i t y 114 5.4.3 Discussion - H6 VI. CONCLUSIONS AND SUGGESTIONS FOR FUTURE RESEARCH 118 6.1 Conclusions . 118 6.1.1 Summary 118 6.1.2 Major Original Contributions . 1 . 118 6.1.3 Establishment of a valid research methodology . . . . 119 v i 6.1.4 Introduction of automatic pattern reco g n i t i o n techniques 120 6.1.5 Formulation of performance estimation techniques . . 120 6.1.6 Demonstration of f e a s i b i l i t y 121 6.1.7 Development of t h e o r e t i c a l modelling techniques . . 121 6.1.8 Establishment of a s t a t i s t i c a l model of EEG a c t i v i t y 121 6.1.9 Evaluation of performance improvement schemes . . . 122 6.2 Suggestions f o r Future Research 122 6.2.1 Performance improvement schemes 122 6.2.2 Experimental controls 123 6.2.3 Time domain EEG pattern recognition systems . . . . 123 6.2.4 The r e l i a b i l i t y of v i s u a l EEG assessment 124 6.2.5 Modelling 125 6.2.6 I d e n t i f i c a t i o n of a r t i f a c t 126 APPENDIX A LEVEL OF ANESTHESIA EVALUATION FORM 127 APPENDIX B DESCRIPTION OF EEG DATA BASE 128 APPENDIX C COMPUTATION OF EEG SPECTRA 131 APPENDIX D SPECTRAL FEATURE EXTRACTION PROGRAM 134 APPENDIX E TIME DOMAIN ANALYSIS OF FEATURE EXTRACTION PROGRAM . . . 136 APPENDIX F PERFORMANCE ESTIMATION BY THE I I * TECHNIQUE 140 APPENDIX G PERFORMANCE ESTIMATION BY THE U* TECHNIQUE 143 APPENDIX H EVALUATION OF K-S STATISTICS FOR EEG AMPLITUDE DISTRIBUTIONS 147 APPENDIX I EVALUATION OF K-S STATISTICS FOR EEG SPECTRAL DISTRIBUTIONS 150 APPENDIX J TESTS OF K-S STATISTICS 154 REFERENCES 156 v i i LIST OF ILLUSTRATIONS Figure Page 2-1 (a) Data acquisition equipment . . . . . . . . . . . . . 17 (b) Acquisition of data i n the operating room 17 2-2 Sample segments of multichannel EEG activity 22 2- 3 Configuration of system used for preparing and screening EEG pattern samples . . 24 3- 1 EEG pattern recognition system 29 3-2 Preparation of spectral and time domain feature vectors . 39 3- 3 Estimating c l a s s i f i e r performance 44 4- 1 Effect of increased sampling rates on K-S goodness of f i t tests for Gaussianity 75 4-2 Mean ensemble characteristics of the baseline EEG activity of 30 subjects who were resting with eyes closed . . . . • . . . . . 79 4-3 Estimated percentage of EEG segments of various durations from three different ensembles which can be modelled as wide-sense stationary 80 4-4 Estimated percentage of EEG segments of various durations from three different ensembles which can be modelled as Gaussian . 81 4- 5 Estimated percentage of EEG segments of various durations from three different ensembles which can be modelled as both wide-sense stationary and Gaussian . 82 5- 1 Confusion matrices for systems which extracted 13 spectral features 91 5-2 Improvement in the performance of an EEG spectral pattern recognition system developed for halothane anesthesia . 102 5-3 Improvement in the performance of an EEG spectral pattern recognition system developed for narcotic anesthesia 103 5-4 Improvement in the performance of an EEG spectral pattern recognition system developed for enflurane anesthesia 104 5-5 Confusion matrices for systems which extracted 26 spectral and coherence features 106 v i i i Figure Pkge 5-6 (a) Spectral feature correlation matrix for halothane anesthesia data . . . . . . . . . I l l (b) Spectral feature correlation matrix for narcotic anesthesia data I l l (c) Spectral feature correlation matrix for enflurane anesthesia data . . . . . . . . 112 ix LIST OF TABLES Table Page 2-1 C l i n i c a l c r i t e r i a for estimating levels of anesthesia . . 13 2- 2 Description of resulting EEG data base 27 3- 1 Description of spectral feature set 34 3-2 Description of time domain EEG feature set 37 3-3 Performance of spectral pattern recognition systems on EEG data from halothane anesthesia 51 3-4 Performance of spectral pattern recognition systems on EEG data from narcotic anesthesia 51 3-5 Performance of spectral pattern recognition systems on EEG data from enflurane anesthesia 52 3-6 Performance of time domain pattern recognition systems on EEG data from halothane anesthesia . . . . . . . . . . 55 3-7 Performance of time domain pattern recognition systems on EEG data from narcotic anesthesia 56 3-8 Performance of time domain pattern recognition systems on EEG data from enflurane anesthesia . 57 5-1 Spectral and coherence features chosen for extraction from each EEG channel 97 5-2 Summary of selected spectral and coherence features . . . 100 5-3 Average correlation coefficient magnitudes . 110 B-l EEG data base 128 x ACKNOWLEDGEMENT I would l i k e to express my appreciation to Dr. Grant B. Anderson for his invaluable supervision and for his constant encouragement and support throughout the research. I am indebted to Dr. Morton D. Low of the Department of Electro-encephalography, Vancouver General Hospital, and to Drs. Leonard C. Jen-kins and Brian A. Saunders of the Department of Anaesthesia for their participation in the research and for their many helpful comments and suggestions. The assistance provided by Drs. John L. Berezowskyj, Douglas L. McAthey and Sherri J. Purves i n establishing the EEG data base i s greatly appreciated, as is the technical assistance so generously provided i n many phases of the work by Mr. Les S. Root of the Department of Anaesthesia. I wish to express my appreciation to the following people at the El e c t r i c a l Engineering Department for their contributions: Mr. Michael E. Koombes for his technical guidance and for providing the software to digitize and display EEG data, Mr. A l MacKenzie for the preparation of numerous diagrams and graphs, Mr. Herb Black for his photographic assis-tance, and Ms. Shelagh Lund for her very efficient typing of the thesis. I would also lik e to thank a l l of my friends and colleagues, particularly Ossama Hassanein, Sandy B a i l l i e and Ole Jensen, for creating a very enjoyable and stimulating working environment. Finally, the financial support received from the National Re-search Council in the form of a Postgraduate Scholarship i s gratefully acknowledged. xi 1 CHAPTER I INTRODUCTION 1.1 Problem Area The need for a reliable method of assessing the level of conscious-ness of surgical patients during general anesthesia has existed since the introduction of the f i r s t general anesthetic agents more than a century ago. The c l i n i c a l signs and stages of anesthetic depth that traditionally have been employed have never been entirely satisfactory. However, as a result of recent advances in anesthesiology, many of these traditional signs and stages have clearly become unreliable and inadequate i n terms of modern anesthetic practice. It i s significant that the electroencephalogram, an intuitively appealing indicator of the gross e l e c t r i c a l activity of the brain, is not among the indicators which are routinely evaluated i n attempt-ing to assess the level of anesthesia. In fact, electroencephalographic activity is rarely even monitored during general anesthesia at present. The possibility of developing a computer-based system for reliably e s t i -mating the level of anesthesia by means of electroencephalographic pattern recognition i s the subject of this thesis. General anesthesia can be defined as a state of unconsciousness, produced by anesthetic agents, with an absence of pain sensation over the entire body and a greater or lesser degree of muscular relaxation. An electroencephalogram (EEG) is an e l e c t r i c a l signal which i s generated by the brain and recorded from electrodes attached to the scalp. Spontaneous electroencephalographic activity (or EEG activity) i s characterized by voltages which are usually less than 100 yV, by frequencies which are essentially bandlimited to 30 Hz and by a wide range of patterns or wave-forms, some of which are associated with different states of consciousness. 2 Because a number of general references are available i n the areas of anes-thesiology (e.g. [1-4]) and electroencephalography (e.g. [5-8]), further information of a fundamental nature i n these particular areas w i l l not be included i n the thesis. Intuitively, because general anesthesia i s defined primarily i n 'terms of brain function, i t i s reasonable to suspect that different levels of anesthesia, i.e..different levels of consciousness, could be manifested by different spontaneous EEG patterns. Considerable motivation exists for the development of an automatic system which could reliably-estimate the level of anesthesia by means of spontaneous EEG pattern'recognition. Some of the potential applications are immediately apparent. 1) Such a system could be employed to monitor the level of anesthesia "throughout surgery, i.e. to•'•provide a~continually-updated estimate of the anesthesia le v e l . This would permit an anesthesiologist to more accurately control the administration of anesthetic agents, ~ "thereby reducing -the -probability t>f"subjecting the patient to unnecessarily deep, Iiie-threatening levels of anesthesia or, .alternatively, to very light levels of anesthesia which might resul sin-periods of consciousness or awareness during surgery. 2) The system could provide a rapid and sensitive indication of the occurrence of anesthetic accidents. 3) It would be particularly valuable i n certain kinds of operations -where most c l i n i c a l , non-EEG signs of anesthetic depth are un-available, e.g. during the c r i t i c a l cardiopulmonary bypass phase of open-heart surgery. 4) It could be employed i n the c l i n i c a l evaluation of new anesthetic agents. 5) It could be of value i n the instruction of anesthesiologists. 3 1.2 Evaluation of Previous Research The prospect of using the EEG to estimate the level of anesthesia was f i r s t suggested in 1937 as a practical application of observed correla-tions between different EEG patterns and various levels of anesthesia induced by ether [9]. During the next two decades similar correlations between ob-served EEG patterns and anesthetic depth were described for other anesthetic agents including cyclopropane, nitrous oxide - ether and nitrous oxide -thiopental [10-12]. More quantitative correlations were also investigated by relating observed EEG patterns to the a r t e r i a l blood concentrations of different anesthetic agents [13,14]. Over the years, subjective descriptions of recognizable time domain EEG patterns at various anesthetic levels have been reported for most of the commonly used anesthetic agents. An extensive review of the correlations between various general anesthetics and observed EEG patterns was recently published [15]. In a 1959 review paper, Martin et a l . proposed that most of the general anesthetics that were then i n common use had a similar, dose-depen-dent relationship to a recognizable sequence of EEG patterns L16]. This relationship seemed to suggest that a reliable method for estimating the level of anesthesia could eventually be developed by identifying and clas-sifying the various EEG patterns produced by different patients and d i f -ferent anesthetics. This expectation was not realized, however, largely because of a variety of methodological problems relating to the v a l i d i t y and r e l i a b i l i t y of previous work. EEG v a l i d i t y i n this instance may be defined as the extent to which the EEG contains information concerning the actual level of anesthesia, while r e l i a b i l i t y refers to the dependability of a particular method for extracting such information from the EEG i n order to correctly estimate the level of anesthesia. 4 Four major unresolved problems r e l a t i n g to the v a l i d i t y and r e l i a -b i l i t y of previous work can be i d e n t i f i e d . Martin et a l . recognized the b a s i c problem of l e v e l d e f i n i t i o n : a precise d e f i n i t i o n of the d i f f e r e n t p o s s i b l e l e v e l s of anesthesia i s necessary before one can properly consider the question of whether or not the EEG constitutes a v a l i d i n d i c a t o r of those l e v e l s . A second problem i n v o l v i n g the r e l i a b i l i t y of EEG pattern d e f i n i t i o n has also been acknowledged: d i f f e r e n t i n v e s t i g a t o r s may vary considerably i n t h e i r subjective d e f i n i t i o n s of what constitutes recognizably d i f f e r e n t EEG patterns [17]. In a d d i t i o n , the use of a v a r i e t y of anesthetic agents r e s u l t s i n pattern v a r i a b i l i t y , thereby i n c r e a s i n g the complexity of the pattern recognition task. F i n a l l y , the i n t e r - r a t e r r e l i a b i l i t y of v i s u a l EEG assessment among experienced c l i n i c a l r a t e r s , even with an established set of objective c r i t e r i a f o r pattern i d e n t i f i c a t i o n , may be s u r p r i s i n g l y low. No study of i n t e r - r a t e r r e l i a b i l i t y has been conducted using EEG data from d i f f e r e n t l e v e l s of anesthesia. However, i n a recent study based on c l i n i c a l EEG data, the highest average i n t r a c l a s s c o r r e l a t i o n reported among seven experienced c l i n i c a l EEG r a t e r s was 0.56 [18]. Largely because of such methodological problems, the r e s u l t s of many attempts to estimate anesthesia l e v e l s on the basis of v i s u a l EEG as-sessment have been confusing and contradictory. For example, one group which studied EEG a c t i v i t y at d i f f e r e n t l e v e l s of halothane anesthesia reported that seven d i s t i n c t EEG patterns were observed [19], but a second group which studied the same type of anesthesia reported that only two d i s t i n c t EEG patterns could be i d e n t i f i e d [20]. Furthermore, the second group stated that the c l a s s i c a l sequence of EEG changes associated with p r o g r e s s i v e l y deeper l e v e l s of ether anesthesia could not be observed during halothane anesthesia. It should be noted that the issue of whether or not the EEG con-s t i t u t e s a v a l i d i n d i c a t o r of the l e v e l of anesthesia was not resolved simply because the results of investigations based on visual EEG assessment were not reliable. Intuitively, the EEG s t i l l appears to be the single, most valid parameter to evaluate i n attempting to estimate the level of anesthesia. From a practical viewpoint EEG monitoring i s safe, non-invasive, and can usually be performed with relative ease i n the operating room. Recent advances in the fields of automatic EEG analysis [21-23] and pattern recognition [24-26] have provided a valuable new perspective for reconsidering the anesthetic level estimation problem. A few automatic techniques have already been used to analyse EEG activity during anesthesia, e.g. [27-32], but this work has been confined to the implementation of var-ious methods of EEG data compression and parameter identification. Hence the pattern recognition task, i.e. the identification and interpretation of any changes in EEG characteristics during anesthesia, would s t i l l be per-formed subjectively, presumably by an experienced anesthesiologist. The work to be described in this thesis represents a significant departure from previous research: i t constitutes the f i r s t comprehensive investigation into the. p o s s i b i l i t y of developing a computer-based EEG pattern recognition sys-tem for reliably estimating the level of anesthesia during surgery. 1.3 Scope of Thesis The overall objective of the research described i n this thesis was to investigate the f e a s i b i l i t y of reliably estimating the level of anesthesia during surgery by means of an EEG pattern recognition system. The specific objectives were: 1) to define a set of c l i n i c a l l y v a l i d levels of anesthesia i n terms of objective, non-EEG c r i t e r i a ; 2) to establish a sample EEG data base, consisting of a set of EEG pattern samples corresponding to known c l i n i c a l anesthesia levels, for one or more commonly used types of anesthesia; 3) to develop systems for estimating anesthesia levels by the recog-nition of different spectral and time domain EEG patterns; 4) to establish a method for effectively evaluating the performance of EEG pattern recognition systems on the basis of a f i n i t e set of available EEG pattern samples; 5) to,evaluate the performance of the i n i t i a l l y developed spectral and time domain EEG pattern recognition systems; 6) to develop theoretical techniques which enable the degree of wide-sense stationarity and Gaussianity of spontaneous EEG activity to be modelled; 7) to model the degree of wide-sense stationarity and Gaussianity of some specific ensembles of EEG pattern samples, with a view to improving the performance of the i n i t i a l l y developed pattern rec-ognition systems; 8) to identify the major factors which affect the performance of EEG pattern re.cognition systems; and 9) to investigate any schemes which appear l i k e l y to improve the ..performance of the i n i t i a l l y developed systems. Chapter II describes the establishment of a sample EEG data base, consisting of a number of digitized, multichannel EEG segments which cor-respond to different levels of anesthesia. In the course of establishing the data base, a considerable effort was made to control a wide range of -extraneous variables because i t was recognized that the control of such variables was crucial to the success of subsequent work involving the data base. Accordingly, i n addition to describing the preparation and organi-zation of the sample EEG data base, Chapter II outlines the effort that was made to identify and control as many extraneous variables as possible. For example, explicit definitions of the different possible levels of anes-thesia were established to control the incidence of errors i n c l i n i c a l , non-EEG assessments of anesthetic depth. Chapter II also describes how a number of other potential sources of v a r i a b i l i t y were controlled, e.g. by res t r i c t i n g the number of different types of anesthesia under consideration, by estab-lishing a standardized anesthetic technique and by taking a variety of pre-cautions during the preparation of d i g i t a l EEG pattern samples. Chapter III describes the i n i t i a l development and performance evaluation of spectral and time domain EEG pattern recognition systems. A l l of the i n i t i a l l y developed systems extract a small number of h e u r i s t i -cally derived features from unknown EEG pattern samples. The c l a s s i f i e r s in these systems employ Bayes decision rule under the assumption that the extracted features are s t a t i s t i c a l l y independent. A ration<--le concerning the choice of this particular feature extraction scheme and c l a s s i f i c a t i o n rule i s presented and discussed i n Chapter.III. Then the general problem of how to use a relatively small set of available EEG pattern samples to effectively evaluate the performance of an EEG pattern recognition system is discussed. Two nonparametric techniques which provide particularly informative and efficient estimates of the performance of such systems are suggested. Results which were obtained by employing these techniques to estimate the performance of the i n i t i a l l y developed spectral and time domain EEG pattern recognition systems are then presented. These results clearly demonstrate the f e a s i b i l i t y of estimating the level of anesthesia by means of automatic EEG pattern recognition. Chapter IV describes the development of a s t a t i s t i c a l model of spontaneous EEG activity. It was thought that such a model could be of value i n improving the performance of the i n i t i a l l y developed EEG pattern r e c o g n i t i o n systems. Almost a l l methods of quantitative EEG analysis are based on c e r t a i n i m p l i c i t assumptions regarding the s t a t i s t i c a l character-i s t i c s of the underlying random process, p a r t i c u l a r l y with respect to the extent of s t a t i o n a r i t y and Gaussianity of the process. The e f f i c a c y of alt e r n a t e methods of analysis therefore depends upon the degree to which such assumptions are j u s t i f i e d by the c h a r a c t e r i s t i c s of the p a r t i c u l a r ensembles of EEG segments being analysed. In Chapter IV, t h e o r e t i c a l tech-niques are developed which enable the degree of wide-sense s t a t i o n a r i t y and Gaussianity of spontaneous EEG a c t i v i t y to be modelled. Results which were obtained by applying these techniques to some s p e c i f i c ensembles of EEG pattern samples are presented. The comparative advantages of employing a l t e r n a t e methods of EEG ana l y s i s are then discussed i n r e l a t i o n o the estimated degree of s t a t i o n a r i t y and Gaussianity of the p a r t i c u l a r EEG ensembles under consideration. Chapter IV contains a discussion of pos s i b l e methods f o r improving the performance of the i n i t i a l l y developed pattern recognition systems by taking i n t o account the a c t u a l s t a t i s t i c a l c h a r a c t e r i s t i c s of the EEG data being analysed. Chapter V describes the i n v e s t i g a t i o n of other p o s s i b l e s t r a t e g i e s f o r improving the performance of the i n i t i a l l y developed systems. Most of these s t r a t e g i e s involve changes i n the i n i t i a l feature e x t r a c t i o n scheme and pattern c l a s s i f i c a t i o n algorithm. In the same chapter, i t i s argued that i n t e r s u b j e c t EEG v a r i a t i o n i s one of the major factors which adversely a f f e c t the performance of EEG pattern recognition systems. Accordingly, most of the work described i n Chapter V was di r e c t e d toward estimating and reducing the e f f e c t of in t e r s u b j e c t EEG v a r i a t i o n . A few concluding remarks are presented i n Chapter VI. In addi-t i o n , the major o r i g i n a l contributions of the research described i n the the s i s are b r i e f l y summarized and some suggestions are made regarding 9 possible areas for further research. The Appendices contain detailed i n -formation about the sample EEG data base that was established. This infor-mation should be sufficient to allow the data base to be readily used and expanded in future investigations. The Appendices also contain l i s t i n g s of the major programs that were written i n the course of this investigation. The program l i s t i n g s serve a dual purpose: they provide detailed documenta-tion concerning specific computational procedures and they f a c i l i t a t e the use of such procedures by others. For reference purposes, i t should be noted that some of the o r i -ginal results presented i n subsequent chapters have already been published elsewhere [33-39,140]. CHAPTER II EXPERIMENTAL CONTROLS AND DATA ACQUISITION 2.1 Objectives This chapter describes the establishment of a data base, con-sisting of a relatively large number of sample EEG segments which corres pond to different c l i n i c a l anesthesia levels. During the establishment of this data base a substantial effort was made to identify and control as many extraneous variables as practicable, because i t was recognized that the subsequent value of the acquired data would obviously be depen-dent on the extent to which such variables could be identified and con-trolled. To control the incidence of errors i n c l i n i c a l , non-EEG assess ments of the level of anesthesia, i t was necessary to establish e x p l i c i t definitions of the different possible anesthesia levels i n terms of r e l -iable c l i n i c a l c r i t e r i a . Section 2.2.2 discusses the inadequacy of the traditional stages and signs of anesthesia for this purpose; section 2.2 describes how five c l i n i c a l l y significant levels of anesthesia were de-fined, in terms of relatively objective non-EEG c r i t e r i a , for this re-search. To eliminate some potential sources of v a r i a b i l i t y , the number of different types of anesthesia under consideration was restricted and a standardized anesthetic technique was established, as described in sec tion 2.3.1 and section 2.3.2. The data acquisition procedure which was followed i s outlined in section 2.3.3 and the control of extraneous vari ables during data acquisition i s discussed i n section 2.3.4. Fin a l l y , sections 2.4.1 and 2.4.2 describe the preparation of a d i g i t a l EEG data base from the experimental data collected. 11 2.2 Establishment of Anesthesia Levels 2.2.1 Introduction General anesthesia may be defined as a state of unconsciousness produced by anesthetic agents, with absence of pain sensation over the entire body and a greater or lesser degree of muscular relaxation [40]. At present, different dosages of a wide variety of anesthetic agents and drugs, administered either by inhalation or intravenously, can be used to produce different levels of general anesthesia. For the purposes of this research a set of five possible levels of general anesthesia was e x p l i c i t l y defined in terms of c l i n i c a l , non-EEG signs of anesthetic depth. 2.2.2 Historical Perspective The f i r s t description of different stages of anesthesia was contained in a monograph published i n 1847 [41], The monograph described five recognizable stages of anesthesia with ether, based primarily on changes i n the character of respiration and the degree of suppression of reflex activity. In subsequent years, various possible c l i n i c a l signs of different anesthesia stages were investigated, including heart rate, blood pressure, respiration, pupil diameter and reactivity to li g h t , tearing and eye movement. Several of these signs were eventually incorporated into a detailed description of four different stages of anesthesia which was published i n a f a i r l y complete form i n 1937 [42]. For many years this description of c l i n i c a l signs and stages served as the standard reference for inhalational anesthesia. It should be noted, however, that only a small number of inhalational aresthetic agents were then i n common use and the primary goal of the anesthesiologist i n this period was simply to administer one of the available agents i n sufficient concentration to produce a stage of anesthesia associated with unconsciousness and an ad-equate degree of muscular relaxation, without seriously endangering the 12 patient's l i f e . Unfortunately, this rather admirable goal was not always satisfactorily achieved. Recent developments i n anesthesiology have decreased the mortality rate associated with the administration of general anesthesia, but have e l -iminated or obscured many of the traditional c l i n i c a l signs and stages of anesthesia [43], For example, the c l i n i c a l use of drugs which spe c i f i c a l l y produce good muscle relaxation and the emergence of controlled respiration to assure adequate patient ventilation have largely eliminated two formerly valuable c l i n i c a l signs: the degree of muscle relaxation and the character of respiration [44]. Furthermore, factors such as the introduction of pre-anesthetic medication, the use of a combination of drugs during anesthesia and the increasing variety of anesthetic agents have contributed to the complexity of correctly interpreting changes i n many of the remaining c l i n -i c a l signs [43-46], In addition, modern anesthetic practise has reduced the significance of some of the traditional stages of anesthesia and has pro-vided increased motivation for the definition of some new stages: for ex-ample, the currentpractise of_ripid induction of anesthesia has essentially eliminated one of the traditional stages, while recent reports of conscious-ness occurring at apparent surgical levels of anesthesia [47-52] indicate the need for a new definition of anesthesia levels. Thus, at least two important problems associated with the defin-i t i o n of anesthesia levels are apparent* F i r s t , many of the traditional c l i n i c a l signs and stages of anesthesia are not relevant to modern anes-thetic practise. Second, any available c l i n i c a l signs may often be equiv-ocal and require considerable subjective interpretation. 2 . 2 . 3 Definition of Anesthesia Levels For. this research, the set of possible levels of anesthesia was defined i n a unique manner to clearly establish i t s v a l i d i t y i n terms of modern anesthetic practise. After considerable discussion, experienced anesthesiologists 1 defined five c l i n i c a l l y significant levels of anesthesia in terms of non-EEG c r i t e r i a that they considered to be meaningful and ap-propriate. Subsequently, minor revisions of the c r i t e r i a were made to re-solve possible ambiguities in the wording, to allow for a more objective differentiation of levels, and to f a c i l i t a t e the use of the same set of c r i t e r i a with three common types of general anesthesia (to be described i n section 2.3.1). The resultant set of c l i n i c a l c r i t e r i a i s given in Table 2-1. The c r i t e r i a are based primarily upon a patient's responsiveness to various stimuli and upon changes in his blood pressure and pulse rate. A concerted effort was made to keep a l l c r i t e r i a as objective and quantitative as practicable. Table 2-1 C l i n i c a l C r i t e r i a for Estimating Levels of Anesthesia Level C l i n i c a l C r i t e r i a (Consciousness) Patient i s alert with spontaneous speech. (Light Anesthesia) Movement i n response to the pre-paration and surgery i f not paralyzed. Movement i n response to vocal command during emergence. Tachy-cardia and hypertension during surgery. (Light Surgical Anesthesia) Movement i n response to surgical stimulation but not i n response to the pre-paration or similar light stimulation. Tachycardia and hypertension during surgery. (Surgical Anesthesia) No movement i n response to the preparation or surgical stimulation. No tachycardia or bradycardia. Patient i s either normotensive or mildly hypotensive, i . e . within 20 percent of normal. (Deep Surgical Anesthesia) No movement i n response to the preparation or surgical stimulation. Brady-cardia and hypotension, i . e . greater than a 20 per-cent deviation from normal. 1 Dr. L.C. Jenkins, Professor and Head of the Department, and Dr. B.A. Saunders, C l i n i c a l Assistant Professor, Department of Anesthesiology, Faculty of Medicine, University of B.C. 14 2.3 Acquisition of Experimental Data 2.3.1 Types of Anesthesia Considered The different types of general anesthesia are commonly d i f f e r -entiated by referring to the combination of agents employed to maintain an adequate level of anesthesia. Hence the three types of anesthesia to be considered in this thesis are generally known to anesthesiologists as halothane-nitrous oxide-relaxant anesthesia, narcotic-nitrous oxide-relax-ant anesthesia and enflurane-nitrous oxide-relaxant anesthesia. The f i r s t two types of anesthesia account for most of the general anesthetics ad-ministered i n North America today. For example, of 28,988 inhalational anesthetics which were administered at the Vancouver General Hospital in 1974, approximately 33 percent employed some variation of the halothane-nitrous oxide-relaxant technique and 63 percent employed some variation of the narcotic-nitrous oxide-relaxant technique [53]. The third type of anesthesia, i.e. enflurane-nitrous oxide-relaxant anesthesia, i s re l a -tively new but is rapidly gaining i n popularity and may be in common usage within a few years. For convenience, these three types of anes-thesia w i l l subsequently be referred to i n the thesis as halothane anes-thesia, narcotic anesthesia and enflurane anesthesia, respectively. 2.3.2 Standardized Anesthetic Technique The following standardized technique was established for the administration of a l l three types of anesthesia. Approximately one hour t before surgery, a premedication consisting of morphine (10-15 mg) or me-peridine (50-100 mg) and atropine (0.6 mg) or scopolamine (0.4 mg) was administered. Induction of anesthesia was accomplished with sodium thio-pentone (5 mg/kg body weight) and tracheal intubation was f a c i l i t a t e d by the administration of succinylcholine (1 mg/kg). Halothane anesthesia 15 was maintained with halothane vapour (0.75 percent i n i t i a l l y ) as the p r i -mary anesthetic agent supplemented by a mixture of 60 percent nitrous ox-ide and 40 percent oxygen. Similarly, enflurane anesthesia was maintained with enflurane vapour (1.0 percent i n i t i a l l y ) as the primary anesthetic agent supplemented by a mixture of 60 percent nitrous oxide and 40 percent oxygen. The administered concentration of both primary anesthetic agents was changed occasionally during surgery to change the level of anesthesia of patients. The third type of anesthesia, narcotic anesthesia, was main-tained with a mixture of 60 percent nitrous oxide and 40 percent oxygen in conjunction with small increments (5-15 mg) of alphaprodine, a narcotic analgesic, which were given intravenously as necessary during surgery. In a l l cases, adequate muscle relaxation was obtained with d-tubocurarine (0.3 mg/kg i n i t i a l l y , with more as required during longer operations). A Bird Mark 8 Respirator was used to provide controlled respiration, with respiratory rates and t i d a l volumes i n i t i a l l y determined by a Radford nomogram [54]. To ensure adequate ventilation during anesthesia, a Beck-man LB-1 Medical Gas Analyzer was used to monitor each patient's end-tidal carbon dioxide concentration and the respirator was adjusted so that the end-tidal carbon dioxide concentration and the respirator was adjusted so that the end-tidal carbon dioxide concentration was always between 35 and 45 mm Hg. At the end of each operation the action of the muscle relaxant was reversed with atropine (1.2 mg) and neostigmine (2.5 mg). Detailed information regarding the different anesthetic tech-niques and procedures and the properties of various anesthetic agents and drugs can be found in many general references, e.g. [ 7t s ], and w i l l not be given here. Thorough reviews of possible EEG effects of a wide variety of general anesthetics are also available, e.g. [15-17], as are many 16 papers dealing specifically with relevant EEG and cardiovascular effects of the anesthetic agents and drugs used in the thesis research, e.g. n i -trous oxide [55,56], sodium thiopentone [12], d-tubocurarine [57], halo-thane [19,20,58-60], narcotics [50,61] and enflurane [62-66]. At present, the most serious c l i n i c a l problems associated with the three types of anes-thesia considered in the thesis are: possible hepatitis resulting from halothane anesthesia [67-69], reported incidents of awareness during nar-cotic anesthesia [47-52] and occasional central nervous system i r r i t a b i l -i t y during enflurane anesthesia [62,64]. It should be noted in passing that the lat t e r two problems are currently being investigated by means of EEG analysis. 2.3.3 Data Acquisition Fig. 2-la shows most of the equipment employed to acquire ex-perimental data, as well as some of the usual anesthetic equipment in the operating room. Fig. 2-lb shows the actual configuration of the equipment for data acquisition during an operation. The anesthetic ^ equipment cart seen i n Fig. 2-la contains a Bird Respirator, an anesthetic gas vapor-izer and supplies of various anesthetic agents and drugs. The EEG elec-trodes seen in Fig. 2-lb are standard cup electrodes, f i l l e d with conduc-tive paste, which have been attached to the patient at positions defined by the International 10-20 System [70] to establish four d i f f e r e n t i a l EEG channels: F3-C3, C3-01, F4-C4 and C4-02. The relative locations of these two b i l a t e r a l l y symmetric pairs of channels are indicated i n Fig. 2-3. The EEG electrodes were connected to a termination box (Fig. 2-la) which can be used in one mode to measure the electrode contact resistance and i n another mode as a preamplifier for the EEG machine. A Beckman 8-channel EEG machine, with i t s lowpass f i l t e r s set at 50 Hz and i t s highpass 17 F i g . 2-la Data A c q u i s i t i o n Equipment F i g . 2-lb A c q u i s i t i o n of Data i n the Operating Room 18 f i l t e r s set at 0.54 Hz to reduce artifact,was used to amplify the EEG and to plot the amplified EEG on chart paper for immediate visual inspection. A Hewlett-Packard Model 3960A instrumentation tape recorder was connected to the EEG machine; at a tape speed of 15/16 ips the recorder could store four channels of EEG activity for more than four hours on one reel of 3M Type 871 instrumentation tape. The pulse generator seen in Fig. 2-lb was connected to the recorder so that short pulses could be inserted into one channel of the recording to identify EEG segments of interest. As men-tioned in section 2.3.2, an infrared C0£ analyser was used to monitor the end-tidal carbon dioxide concentration throughout each operation. Not evident in either Fig. 2-la or Fig. 2-lb i s a Tektronix 410 Monitor which was used to monitor electrocardiographic activity. The acquisition of experimental data proceeded in the following manner. After a suitable surgical patient had been identified by one of the anesthesiologists participating i n this research, the patient was visited pre-operatively and informed consent was obtained. EEG electrodes were then attached and, before the standard premedication was administered, the patient's baseline EEG activity was recorded for several minutes while he or she was resting with eyes closed; the pulse generator was used to mark at least two 64s segments of baseline EEG activity for subsequent analysis. EEG recording was later resumed when the patient entered the operating room and was continued u n t i l the patient was moved to a post-operative recovery area. Estimations of the level of anesthesia, based on the c l i n i c a l c r i t e r i a given in Table 2-1, were made by an anesthesiol-ogist at intervals of approximately five minutes during the operation. The pulse generator was used to mark 64s EEG segments which corresponded to the c l i n i c a l l y estimated anesthesia levels. If the anesthesiologist was uncertain of the level of anesthesia as defined by the c l i n i c a l 19 c r i t e r i a , e.g. during a period of transition between levels, no further attempt was made to estimate the level at that time. Similarly, no attempt was made to estimate the level of anesthesia when the EEG contained obvious and excessive art i f a c t , e.g. while the electrosurgical unit was i n use. The Level of Anesthesia Evaluation Form shown in Appendix A was employed to record each estimated level of anesthesia and the number of the pulse which identified the corresponding EEG segment, as well as a l l other r e l -evant information about the operation. 2.3.4 Control of Variables During Data Acquisition An attempt was made to control several extraneous variables during the acquisition of experimental data. Many of these variables tended to increase the range of EEG pattern v a r i a b i l i t y and the incidence of errors in c l i n i c a l l y estimated anesthesia levels. Obviously the sub-sequent value of the acquired data i s highly dependent on the extent to which such extraneous variables could be controlled. - To reduce the range of EEG v a r i a b i l i t y resulting from the use of different anesthetic agents and drugs, only the three most common types of general anesthesia were considered and a standardized anesthetic tech-nique was established. Furthermore, data was acquired only from healthy adult patients who underwent similar kinds of surgery, thus reducing the extent of EEG va r i a b i l i t y due to differences i n age, general health status, intensity of surgical stimulation and duration of anesthesia. EEG v a r i -a b i l i t y associated with abnormal carbon dioxide levels i n the blood [71] was controlled by monitoring the patient's carbon dioxide level and ad-justing the respirator to keep i t within normal limits, as described in section 2.3.2. Additional precautions were taken to reduce the amount of 20 artifact present in recorded EEG ac t i v i t y . The EEG electrodes were firmly attached with gauze pads soaked in collodion, a special glue and sealant which prevented the electrode paste from drying out during the operation and thus reduced the possibility of a r t i f a c t due to poor electrode con-tacts. Any artifact above 50 Hz, e.g. 60 Hz e l e c t r i c a l interference, and below 0.54 Hz, e.g. some movement a r t i f a c t , was eliminated by setting the lowpass and highpass f i l t e r s on the EEG machine to 50 Hz and 0.54 Hz res-pectively. EEG activity was not recorded while the electrosurgical unit was being used because artifa c t from the unit saturated the EEG amplifiers. Attempts were also made to reduce the incidence of incorrect estimations of anesthesia levels caused by errors i n c l i n i c a l judgement and by possible non-stationarities in the actual level of anesthesia over the 64s duration of the corresponding EEG segment. Errors i n c l i n i c a l judgement were reduced by developing an explici t set of objective c l i n i c a l c r i t e r i a (Table 2-1) and by minimizing the number of anesthesiologists who made c l i n i c a l estimations of levels; these anesthesiologists became fami-l i a r with the standardized anesthetic technique and became quite proficient at estimating anesthesia levels on the basis of the c l i n i c a l c r i t e r i a . When they could not confidently estimate levels on the basis of the c r i -teria, they were asked to refrain from guessing. The incidence of non-stationary anesthesia levels within the 64s intervals corresponding to i d -entified EEG segments was reduced in two ways. F i r s t , whenever possible, a c l i n i c a l level estimation was made at the beginning and end of a 64s i n -terval and the corresponding EEG segment was only retained for analysis i f both estimations were the same. Second, at least three minutes was allowed to elapse between a change in the administered concentration of the primary anesthetic agent and the time that the next c l i n i c a l level estimation was made, so that the concentration of anesthetic agents in the blood could approach equilibrium; 21 i t would have been preferable to determine a state of equilibrium by d i -rectly monitoring the a r t e r i a l blood concentrations of the various anes-thetic agents, but i t was not possible to do so because the appropriate equipment was not available. 2.4 Establishment of EEG Data Base 2.4.1 Description of Analog EEG Data Collected As stated previously, the operations from which data was collected consisted primarily of general surgical cases involving patients who were in the best surgical risk categories, i.e. who were in either Class I or Class II as defined by the American Society of Anesthesiologists ([8], pp. 401-402). Data which was collected from an operation was not retained for analysis when there was a significant deviation from the standardized anesthetic procedure outlined in section 2.3.2, or when i t was apparent that the control of variables described i n section 2.3.4 was inadequate. In total, EEG recordings and c l i n i c a l data from 72 operations were retained for analysis. Of this t o t a l , halothane anesthesia was used in 21 cases, narcotic anesthesia was used in 26 cases and enflurane anesthesia accounted for the remaining 25 cases. Fig. 2-2 shows sample multichannel segments of baseline EEG activity (Level 0) and EEG ac t i v i t y at a surgical level of anesthesia (Level 3) for the three different types of anesthesia. The halothane anesthesia data was obtained from 8 male and 13 female patients ranging in age from 17 to 65 years, with an average age of 46 years. The average duration of anesthesia was 70 min, .although the duration of individual cases varied from 30 min to 135 min. The number of anesthesiologists who made c l i n i c a l estimations of the level of anes-thesia during halothane anesthesia was limited to three. Of the 26 narcotic anesthesia cases, 9 involved male patients 22 F3-C3 C3-01 F4-C4 ' C4-02 I H 10 sec (a) F3-C3 C3-0/ F4-C4 C4-02 (c) I H /.0 sec FJ?- C3 F4- C4 C4-02 I H /.0 sec (e) F3- CJ.. C3-01 F4-C4 v v C4-02 1.0 sec (b) FJ-CJ F4-C4 C4-02 (d) /.O sec F3-C3 CJ-07 F4-C4 C4-02 10 sec (f) Fig. 2-2 Sample Segments of Multichannel EEG Activity. Samples of EEG acti v i t y at Anesthesia Level 0 and Anesthesia Level 3 for three sub-jects having similar baseline EEG characteristics are shown in (a)-(b), (c)-(d), and (e)-(f). Segments (b), (d) and (f) were recorded during halothane anesthesia, narcotic anesthesia and enflurane anesthesia, respectively. 23 and 17 involved female patients. Their ages ranged from 20 to 64 years, with an average age of 44 years. The anesthetic was administered for be-tween 30 min and 150 min; the average duration was 90 min. Thirteen an-esthesiologists made c l i n i c a l estimations of the level of anesthesia during narcotic anesthesia. The enflurane anesthesia data was obtained from 9 male and 16 female patients. A l l were between 23 and 70 years of age, with an average age of 47 years. The anesthesia varied from 60 min to 150 min i n dura-tion, with an average duration of approximately 90 min. Three anesthesi-ologists were involved in making c l i n i c a l estimations of anesthesia levels. For reasons which w i l l be given elsewhere in the thesis, i t was considered desirable to collect some data from patients who were under-going two successive operations within a short period of time. This was possible i n a few instances, i.e. where female patients underwent tissue biopsies followed by mastectomies or hysterectomies. Consequently, the halothane anesthesia data included data from one pair of operations per-formed on the same patient and the narcotic anesthesia data included data from three such pairs of operations. 2.4.2 Digitization and Preparation of D i g i t a l EEG Data Base Fig. 2-3 shows the general configuration of the system that was developed to prepare and screen digitized EEG pattern samples. As des-cribed i n section 2.3.3, throughout each operation an instrumentation tape recorder was used to record four channels (F3-C3, C3-01, F4-C4 and C4-02) of spontaneous EEG activity. Short pulses which were inserted i n one channel of the recording identified a l l EEG segments corresponding to known c l i n i c a l anesthesia levels. The system shown in Fig. 2-3 was used to digitize these EEG recordings, to separate digitized EEG pattern samples 24 L_ 8 CHANNEL EEG MACHINE PULSE GENERATOR ~1 4 CHANNEL TAPE RECORDER _ _ 1 ' _ _ I OPERATING ROOM LOW PASS FILTERS (30.0 Hz) 1 DIGITAL EEG DATA (ON MAG TAPE) i OUTPUT TAPE DRIVE PROCESSOR DIGITIZER 1 1 1 1 1 r i_ NOVA 840 SIGNAL PROCESSING FACILITY ~ — — — - ~ ~ ~ ~ \ • INPUT TAPE DRIVE PROCESSOR OUTPUT TAPE DRIVE 1 i — — . — _ _ _ ;_1 IBM 370/168 COMPUTER DIGITIZED EEG PATTERN SAMPLES r • — — — • — • — — — — - — — — — —| (ON MAG i DIGITAL TO ANALOG CONVERTERS PROCESSOR INPUT i L TAPE DRIVE 1 J -. . . _ _ — — — NOVA 840 SIGNAL PROCESSING FACILITY LOW PASS FIL TERS ]f30-0 Hz) 4 CHANNEL TAPE RECORDER 8 CHANNEL EEG MACHINE ANALOG EEG PATTERN SAMPLES (FOR VISUAL •'. SCREENING ) F i g . 2-3 Configuration of System Used f o r Preparing and Screening EEG Pattern Samples 25 corresponding to known anesthesia levels, and to plot these pattern samples for visual screening. The Nova 840 Signal Processing F a c i l i t y at the U.B.C. E l e c t r i c a l Engineering Department was used to convert a l l analog EEG records to dig-i t a l records stored on d i g i t a l data tapes. To accomplish this, as i l l u s -trated in Fig. 2-3, the recorded EEG activity was f i r s t reproduced on the instrumentation recorder, lowpass f i l t e r e d at 30.0 Hz with Krohn-Hite 3342R f i l t e r s and then the f i l t e r e d data was digitized and stored on 9-track, IBM-compatible tapes using the Nova 840 Signal Processing F a c i l i t y . The digitizer consisted of a multiplexer which sampled each EEG channel at 128 samples/s and a 10-bit analog/digital converter which converted each sample to binary form. For programming ease, each d i g i t a l sample value was stored in two successive bytes on tape although the maximum resolution was limited to ,10 b i t s . The d i g i t a l data tapes were transferred to the IBM 370/168 com-puter at the U.B.C. Computing Centre. A FORTRAN program was used to find the pulse locations on each tape. After the pulse locations were v e r i -fied by checking the pulse information which had been recorded on the Level of Anesthesia Evaluation Forms (Appendix A), a second program was used to extract a 64s EEG segment from each location and then to copy each extracted segment into a separate f i l e on a new d i g i t a l tape. Thus, each f i l e on the new tape contained a digitized 64s EEG pattern sample corresponding to a known level of anesthesia. After a l l EEG pattern samples had been extracted, they were visually screened i n order to reject samples containing obvious and ex-cessive a r t i f a c t . The visual screening procedure was fa c i l i t a t e d by re-producing a l l EEG pattern samples i n analog form on standard EEG chart paper. To do this, as indicated i n Fig. 2-3, the digitized EEG pattern 26 samples were f i r s t converted to analog form using the Nova 840 Signal Pro-cessing F a c i l i t y : each digitized EEG pattern sample was read from a tape, demultiplexed and transferred to digital/analog converters. The resultant analog EEG samples were lowpass f i l t e r e d at 30.0 Hz and were then recorded on the instrumentation tape recorder. By later connecting the recorder to an 8-channel EEG machine at the Vancouver General Hospital, the EEG pattern samples could be reproduced on standard EEG chart paper i n a format sui t -able for visual screening. An EEG pattern sample was usually rejected i f i t contained more than 10s of visually apparent artifact i n more than one channel. Major sources of visually recognizable artifact included interference from electro-surgical units i n the operating rooms, poor electrode contacts, eyeblinks, electrocardiographic activity, movement and muscle activity. EEG pattern samples containing primarily low frequency a r t i f a c t , e.g. movement artifact below 0.5 Hz, were not rejected because i t was known that a l l data would again be highpass f i l t e r e d (digitally) at 0.54 Hz before being analysed. EEG pattern samples containing small amounts of visually apparent artifact were not rejected i n order to retain as large a data base as possible. Approximately 20 percent of the EEG pattern samples which were visually screened were rejected because of a r t i f a c t . Table 2-2 indicates the number of EEG pattern samples which were retained after visual screening. A total of 938 samples from 72 subjects and three types of anesthesia were retained for subsequent analysis. The screened EEG pattern samples associated with each type of anesthesia were transferred to the d i g i t a l tapes l i s t e d i n Table 2-2. In addition, the three disk f i l e s identified i n Table 2-2 were used to store the following information about each EEG pattern sample: i t s location on the appropriate tape, i t s corresponding level of anesthesia and the identity of the patient 27 from which i t was obtained. The structure of data on the d i g i t a l tapes and i n the disk'files i s documented i n Appendix B• In addition, Appendix B contains the l i s t i n g for an input subroutine which can be used to trans-fer a specified EEG pattern sample from tape to a FORTRAN array. Table 2-2 Description of Resulting EEG Data Base EEG Data Base Information Type of Anesthesia Halothane Narcotic Enflurane Number of EEG pattern samples: Level 0 56 51 92 Level 1 37 47 58 Level 2 12 86 15 Level 3 125 152 81 Level 4 50 5 71 Total number of EEG pattern samples 280 341 317 Number of cases from which the samples were obtained 21 26 25 Rack number of the d i g i t a l tape which contains the EEG pattern samples RA0562 RA0558 RA0561 Name of disk f i l e which contains labels for the EEG pattern samples HS.I AS.I ES.I 28 CHAPTER III DEVELOPMENT OF EEG PATTERN RECOGNITION SYSTEMS 3.1 EEG Pattern Recognition Systems 3.1.1 Basic Description This chapter describes the i n i t i a l development and performance evaluation of various systems for estimating the level of anesthesia by means of EEG pattern recognition. Fig. 3-1 contains a simple block dia-gram of an EEG pattern recognition system. The preprocessor transforms an EEG pattern sample into a form which allows meaningful features to be more easily extracted. The amplification, f i l t e r i n g and d i g i t i -zation of EEG pattern samples could a l l be considered to be examples of preprocessing. As indicated in Fig. 3-1, a feature extractor analyses each preprocessed sample and quantitatively evaluates i t in terms of a specified set of features. For example, feature extraction might consist of the calculation of a power density spectrum for each preprocessed EEG pattern sample, followed by the evaluation of features such as the peak frequency and the relative energy in different frequency bands. Each set of extracted feature values is transferred to a c l a s s i f i e r which employs some algorithm, in conjunction with stored data, to classify the corres-ponding EEG pattern sample into one of five possible classes, i . e . five possible levels of anesthesia. There i s no optimum procedure for selecting the best features to be used in discriminating among EEG pattern samples corresponding to different levels of anesthesia. However, in selecting features for specific pattern recognition problems, experience has shown that a few well chosen, heuristically derived features are usually better than a 29 EEG PATTERN SAMPLE PREPROCESSOR FEATURE EXTRACTOR CLASSIFIER EST IMA TED -LEVEL OF ANESTHESIA Fig. 3-1 EEG Pattern Recognition System larger number chosen more randomly. This is primarily because processing many features requires more computing time, more storage and more data for training a c l a s s i f i e r [72,73]. Consequently, the EEG features con-sidered in this research were restricted to a relatively small number of features which had an established c l i n i c a l significance or which had pre-viously been described as meaningful in the literature on automatic EEG analysis. 3.1.2 Development and Performance Evaluation With the exception of highpass f i l t e r i n g , a l l preprocessing had been performed during the preparation of the sets of EEG pattern samples which are lis t e d in Table 2-2. The calculation of EEG power spec-tra from the preprocessed pattern samples and the subsequent extraction of spectral features is described i n section 3.2. A description of relevant time domain EEG measurements and the extraction of time domain features i s given in section 3.3. Section 3.4 outlines the classification algorithm which was employed in a l l spectral and time domain EEG pattern recognition systems. The problem of estimating the performance of such systems i s described i n section 3.5.1; the develop-ment of two nonparametric techniques which provide particularly useful and efficient estimates of the performance of EEG pattern recognition systems i s then described in sections 3.5.2 - 3.5.4. Results obtained 30 by using these techniques to estimate the performance of various s p e c t r a l and time domain EEG pattern recognition systems are presented i n s e c t i o n 3.6. F i n a l l y , i n section 3.7, the s i g n i f i c a n c e of the r e s u l t s i s d i s -cussed. 3.2 Spectral Feature E x t r a c t i o n 3.2.1 EEG Spectral Analysis Spectral analysis of EEG a c t i v i t y only became a popular a n a l y t i c technique a f t e r 1965, when the i n t r o d u c t i o n of the Fast F o u r i e r Transform algorithm made d i g i t a l s p e c t r a l analysis f a s t and economically f e a s i b l e [21,74-76]. During the l a s t decade EEG s p e c t r a l a n a l y s i s has been employed with mixed success i n a wide v a r i e t y of diagnostic i n v e s t i g a t i o n s (e.g. [77-79]), monitoring studies (e.g. [31,80] and sleep research p r o j e c t s (e.g. [81-83]). EEG s p e c t r a l analysis t r e a t s the amplitude of spontaneous EEG a c t i v i t y as a random v a r i a b l e . I f the EEG a c t i v i t y from one channel i s denoted by x(t) then, i f i t i s assumed that the underlying random process i s ergodic ([84], pp. 343-344), the EEG power density spectrum (or more simply, the EEG spectrum) can be defined: S(f) = E{|x(f)| 2> = E{X(f)X*(f)} = < Y [ X ( f ) X * ( f ) ] } (3 -D where X(f) denotes the Fourier transform of x(t) i n the i n t e r v a l T T i .e . X(f) = 3-[x(t)] = I™ x ( t ) e - ^ f t d t , (3.2) and where X*(f) denotes the complex conjugate of X(f) [76], The relevance to EEG spectral analysis of certain assumptions concerning the stationarity and Gaussianity of the underlying random process w i l l be considered in Chapter IV. At present, EEG spectra can be computed by three different methods: d i g i t a l bandpass f i l t e r i n g [86l» Fourier transformation of autocorrelation functions [87]» or the Direct Method, i.e. direct Fourier transformation with subsequent smoothing [21,88]. The Direct Method was employed in the computation of a l l EEG spectra in this research because i t was found to be the fastest and most convenient of the three methods. 3.2.2 Computation of EEG Spectra As described i n section 2.4.2, a l l of the EEG pattern samples lis t e d in Table 2-2 had been lowpass f i l t e r e d at 30.0 Hz and digitized at 128 samples/s. By considering every second sample value i t was therefore possible to analyse data with an effective sampling rate of 64 samples/s. Assume that {x^,...,x^} represents the set of samples obtained by sampling one EEG channel at 64 samples/s for 64s, i.e. N = 4096. The discrete Fourier transform of {x^,...,x^} was computed as follows: N T(f k ) = I x. e x p { ^ ^ ^ - } (3.3) £=1 . N for k = 0,1,...,(N/2), where T(f f c) is the kth complex coefficient of the transform at the fundamental frequency . f = -^-k NAt ( 3 . 4 ) since At = (l/64)s, the sampling interval [89,90], To remove any a r t i -fact below 0.54 Hz, as mentioned in section 2.4.2, the data was highpass f i l t e r e d in the frequency domain: C(f k) = H ( f k ) T ( f k ) k = 0,l,...,(N/2) (3.5) 32 where 0 0.0 < f f c < 0.50 H(f k) = | ( f k - 0.50)/0.8 0.50 < f k < 0.58 (3.6) 1 0.58 < f k < 32.0 From the f i l t e r e d Fourier coefficients C(f k) a periodogram was calcu-lated: I ( f k ) = 1^ - |C(f k)|2 k = 0,1,..., (N/2). (3.7) To improve the s t a t i s t i c a l properties of the raw spectral estimates pro-vided by (3.7), averaging was performed over adjacent frequencies by means of a spectral window to yield the smoothed periodogram W I ( f k ) = I GiKf, .) (3.8) i=-W k ~ 1 where W I G ± = 1. (3.9) i=-W ' • • was chosen to be a rectangular window of width 15/64 Hz, i.e. * | 0 otherwise (3.10) where W =7. Finally, from (3.8) a smoothed EEG spectrum with spectral estimates at 0.125 Hz intervals from 0 - 32 Hz was computed: 1=1 for ( 2 5 i ) ^ f r a < ? » m = 1,...,256. (3.12) o m o More detailed information concerning the computation of EEG spectra i n this manner may be found elsewhere ([85], Pp. 43-52). Appendix C con-tains a l i s t i n g of the program which was used to compute EEG spectra by the method described above. 33 3.2.3 Spectral Feature Vectors Table 3-1 contains a description of the set of features {a^}, 1 < i < 13, chosen for extraction from the spectra corresponding to each EEG pattern sample. It should be noted that, for the reasons given in section 3.1.1, only a relatively small number of features from two EEG channels were i n i t i a l l y considered. These particular features were heuristically chosen after reviewing the literature on computer-based EEG spectral analysis (e.g. [77-83, 91]) and after considerable con-sultation with an academically well qualified and c l i n i c a l l y experienced electroencephalographer^-. From (3.11) - (3.12) and from the description of features given in Table 3-1, i t i s evident that m a^ . b l , = Af Z S ( f m ) m=a^  256 ^ = 0.125 I S(f_), (3.13) m=l because Af = 0.125, a-j_ is the smallest integer greater than 8 f a and b^ = 8fjj^. Knowing a ^ , the subset of features { a ^ } , 2 £ i < 7, can be evaluated: . fb. 100 i ^ V '• = M i l z s(fm) 2 i i < 7 . : (3.14) 1 m^a^ Dr. M.D. Low, Associate Professor of Neurology at the University of British Columbia and Director of the EEG Department at the Vancouver General Hospital. 34 Table 3-1 De s c r i p t i o n of Spectr a l Feature Set Spectral Feature Frequency Range (Hz) i= D e s c r i p t i o n Channel f H 1 T o t a l s p e c t r a l energy- C4-02 0.00 32.00 2 Relative energy: A band C4-02 0.00 4.00 3 Relative energy: 9 band C4-02 4.01 8.00 4 Relati v e energy: a band C4-02 8.01 13.00 5 Relati v e energy: a band C4-02 13.01 15.00 6 Relati v e energy: band C4-02 15.01 32.00 7 Relative energy: B 2 band C4-02 18.01 24.00 8 Mean s p e c t r a l frequency C4-02 0.00 32.00 9 Second moment. . C4-02 0.00 32.00 10 Peak i n t e n s i t y : a band C4-02 8.01 13.00 11 Peak frequency: a band C4-02 8.01 13.00 12 Peak i n t e n s i t y : a band F4-C4 8.01 13.00 13 Peak frequency: a band F4-C4 8.01 13.00 The features corresponding to the f i r s t and second moments of the spectrum, i . e . bi '1 . aQ = ~ • Z S ( f m ) f m A f '8 1 m=a-i and Z §(f m)f2Af, '1 m=a. (3.15) (3.16) can e a s i l y be computed. The value of C g i n d i c a t e s the mean s p e c t r a l f r e -quency. The value of i s of i n t e r e s t because, assuming that the under-l y i n g random process i s s t a t i o n a r y and Gaussian with zero mean ([84], pp. 485-495), Og Is re l a t e d to a popular time domain EEG feature: the mean EEG zero-crossing rate [92-94]. The remaining subset of features {a^}, 10 £ i £ 13, can be quickly evaluated: f o r i = 10 (with s p e c t r a l data from C4-02) and i = 12 (with s p e c t r a l data from F4-C4), i f 35 S(f ) > S(f ) f o r m n f * f m n (3.17) then ai = S ( f J l m (3.18) and i+1 = f m* (3.19) The e x t r a c t i o n of s p e c t r a l features proceeded i n the fo l l o w i n g manner. F i r s t , EEG spectra were computed f o r a l l of the 938 pattern samples l i s t e d i n Table 2-2. Then, f o r each pattern sample, the set of 13 features summarized i n Table 3-1 was evaluated. Appendix D contains the l i s t i n g of a program that was written to evaluate s p e c t r a l features. T h e r e s u l t a n t 13-element feature vectors were stored f o r subsequent use i n the develop-ment and evaluation of various pattern c l a s s i f i e r s . 3.3 Time Domain EEG Feature E x t r a c t i o n 3.3.1 Time Domain EEG Analysis I t i s known that EEG spectra w i l l contain complete s t a t i s t i c a l information about the underlying random processes i f the processes are stationary and Gaussian (T84], pp. 474-475). However i t was i n i t i a l l y suspected, and subsequently confirmed by the r e s u l t s i n Chapter IV, that the assumptions of s t a t i o n a r i t y and Gaussianity are not generally v a l i d . I t was also known that v i s u a l EEG assessment i s based p r i m a r i l y on the evaluation of time domain EEG features, not s p e c t r a l features [22,95]. Therefore i t was decided to develop EEG pattern r e c o g n i t i o n systems based on c l i n i c a l l y relevant time domain features, so that t h e i r performance could be evaluated and compared to the performance of s p e c t r a l pattern recognition systems. A f t e r reviewing much of the l i t e r a t u r e on automatic time domain EEG a n a l y s i s (e.g. [21,81, 92-94, 96]), and a f t e r discussions with Dr. 36 M.D. Low, i t was decided that the c l i n i c a l l y relevant features described in Table 3-2 would be extracted from EEG pattern samples. It should be noted that, as with spectral analysis, only two channels of EEG data (F4-C4 and C4-02) were considered i n i t i a l l y . Of the 10 features in the set { T ^ } , 1 £• i 1 10, four are derived from a period analysis of EEG act i v i t y and six are derived from an amplitude analysis. If x(t) denotes the EEG ac-t i v i t y from one channel then the mean zero-crossing rate i s the average number of times per second that x(t) = 0. The mean zero-crossing rate of the time derivative corresponds to the average number of times per second that x(t) reaches an extremum, i.e. that d ^ f t ) =0. (3.20) at A l l of the EEG amplitude features can be derived from p(x), the amplitude probability distribution of x(t): i f m1 = /" xp(x) dx (3.21) and mn " C <x " m 1) np(x)dx, n = 2,3,4, (3.22) then the standard deviation of the amplitude ... 6 0 = (m2)*, . . . (3.23) the skewness 1 _ .(^)V2 «.2«) and the excess of kurtosis 2^ = T ^ 2 " 3 (3.25) are easily obtained [97]. The skewness feature indicates the relative asymmetry of p(x), i.e. in the case of a symmetrical distribution 3^  = 0; the excess of kurtosis indicates the relative flatness of p(x) i n compari-son to a Gaussian distribution, for which 3 2 = 0 ([85], pp. 39-40). 37 Table 3-2 D e s c r i p t i o n of Time Domain EEG Feature Set i= Time Domain Feature x . l Channel 1 Mean zero-crossing rate F4-C4 2 Mean zero-crossing rate of f i r s t d e r i v a t i v e F4-C4 3 Standard deviation of amplitude F4-C4 4 Skewness F4-C4 5 Excess of k u r t o s i s F4-C4 6 Mean zero-crossing rate C4-02 7 Mean zero-crossing rate of f i r s t d e r i v a t i v e C4-02 8 Standard deviation of amplitude C4-02 9 Skewness C4-02 10 Excess of k u r t o s i s C4-02 3.3.2 Time Domain Feature Vectors This section outlines the procedure f o r evaluating i n d i v i d u a l pattern samples i n terms of the feature set { x^ } , 1 - i £ 10, summarized i n Table 3-2 and described i n the previous -section. Before any features were evaluated, EEG pattern samples were d i g i t a l l y f i l t e r e d with B(f) 0 < f < 0.50 0.50 < f < 0.58 0.58 < f < f T F > FLP ( 3 . 2 6 ) to remove any a r t i f a c t below 0.54 Hz and to remove high frequency EEG a c t i v i t y above f Hz which, i n v i s u a l EEG assessment at l e a s t , often tended to obscure s i g n i f i c a n t changes i n time domain feature values. The d i f f e r e n t choices f o r f ^ p w i l l be described i n s e c t i o n 3.6.2. To i l l u s -t r a t e the feature evaluation procedure l e t {x^ x^} denote the set of values obtained by d i g i t i z i n g the EEG a c t i v i t y from channel F4-C4 at 64 samples/s fo r T = 64s, i . e . N = 4096, and then bandpass f i l t e r i n g the d i g i t i z e d EEG 38 with B(f) i n (3.26). The mean zero-crossing rates of the EEG and i t s f i r s t d e r i v a t i v e can be evaluated from the following equations: 1 N T l = 2T Z '•1 •"• s 8 n ( x k + i ) s 8 n ( x k ^ (3.27) k=l 3 1 1 ( 1 N T2 = If Z [ 1 " sgttCAj^^sgnC/^)] (3.28) k=l where A " ( 3 - 2 9 ) To evaluate the amplitude features defined i n (3.23)-(3.25), the sample mean „ i ? and higher order c e n t r a l moments N (3.30) = (N-l) fc2^3^ " V " » n = 2 ' 3 ' 4 » (3.31) n are employed: x 3 = (m 2)* • (3.32) _^3 . • T4 .3/2 (3.33) m. — 0 - 3. (3.34) (m2) S i m i l a r l y , features T g - T^Q can be evaluated using the sample EEG data from channel C4-02. Appendix E contains the l i s t i n g of a program that was w r i t t e n to evaluate EEG pattern samples i n terns of the time domain features i n Table 3-2. This program was used to prepare time domain feature vectors f o r a l l a v a i l a b l e pattern samples. The r e s u l t a n t feature vectors were stored f o r l a t e r use. 39 Fig. 3.2 summarizes the procedure for preparing spectral and time domain EEG feature vectors for subsequent use in c l a s s i f i e r development and performance evaluation. DIGITIZED EEG PATTERN SAMPLES EEG SPECTRUM ANALYSER SPECTRAL FEATURE EXTRACTOR TIME DOMAIN EEG ANALYSER TIME DOMAIN FEATURE EXTRACTOR FEATURE VECTORS FOR CLASSIFIER DEVELOPMENT Fig. 3-2 Preparation of Spectral and Time Domain Feature Vectors 3.4 Classification Algorithm A wide variety of algorithms have been developed to classify unknown pattern samples on the basis of a specified set of extracted fea-ture values [24]. In EEG pattern recognition, many of the cl a s s i f i e r s described in the literature have been heuristically derived and are based on ad hoc decision rules (e.g. [32,79,98]). Consequently the conditions under which such cl a s s i f i e r s may be optimal are unknown, and meaningful comparisons of performance are often d i f f i c u l t or impossible. Of the few EEG pattern classification algorithms which have a firm theoretical basis, the most popular i s an algorithm based on linear discriminant analysis [99]. Under the assumptions that a l l sample fea-ture values are from a multivariate normal population and that the feature 40 covariance matrices for the different classes are identical, this algorithm creates linear discriminant functions (in a stepwise manner) which can be used to classify unknown feature vectors [77,100]. However in many EEG ap-plications the assumptions of normality and identical covariance matrices are obviously invalid (e.g.[101]), thus affecting the optimality of the c l a s s i f i e r and the accuracy of parametric performance estimates. Despite these and other problems, stepwise discriminant analysis i s at present per-haps the most widely used EEG pattern cla s s i f i c a t i o n algorithm (e.g. [77,78, 83,91,101]). The classification algorithm chosen for this investigation makes only one assumption about the feature data: i t is based on Bayes decision rule C[102],p. 13) under the assumption that a l l features are s t a t i s t i c a l l y i n -dependent. Although the algorithm has certain characteristics which i n d i -cate that i t might be particularly appropriate for EEG pattern c l a s s i f i c a -tion problems, apparently i t has not been extensively studied in this con-text previous to this investigation. To explain the algorithm, let (d u»0 u) represent an observed EEG pattern sample from an unknown class: d^ is a row vector containing N feature values or measurements from the pattern sample and 0 u is the label identifying the class to which the pattern sample be-longs. The purpose of the cla s s i f i c a t i o n algorithm i s to decide on a value for 0 . I t is known that the observed feature vector d must belong u ~u to one of M possible classes C Q , . . . , C ^ ^; i n this problem M = 5 and the five possible classes correspond to the five different levels of anesthesia. The classification algorithm is based on the maximum likelihood principle, i.e. one asks which class (or level of anesthesia) was most li k e l y to produce the observed sample vector d^ and decides § U = C . . , 0 < j < (M-l), i f 41 P ( C Idp > p<cjd u), f o r fm=0,...,M-l (3.35) r>=o, By using Bayes Rule ([102],p.11) the a p o s t e r i o r i p r o b a b i l i t i e s i n (3.35) can be expressed i n terms of c o n d i t i o n a l and a p r i o r i p r o b a b i l i t e s , e.g. P(d |C )P(C ) » < C , K > •• g (d m) • < 3- 3 6> u Therefore, using (3.36), the d e c i s i o n r u l e i n (3.35) becomes: decide 3 = C. i f or P(d C,)P(C.) P(d C )P(C ) P(d ) P(d ) x—u v _ u P(d C,)P(C.) > P(d C )P(C ) (3.38) u j j u m m f o r fm=0,...,M-1 The amounts of storage, computation time and t r a i n i n g data r e -quired to implement (3.38) are gre a t l y reduced [24,72,73] i f i t i s assumed that the vector components d ^ , 1 £ n < N, are s t a t i s t i c a l l y independent of one another, i . e . i f i t i s assumed that N P(d |C ) = n P(d | C ) . (3.39) u 1 m , un m n=l Under t h i s assumption, and a f t e r taking logarithms of both s i d e s , the de-c i s i o n r u l e i n (3.38) becomes: decide 0 = C. i f u 3 R. > R fm = 0,...,M-1 (3.40) i m U*3 . where N R m = S *n[P(d |C )] +. £n[P(C ) ] . (3.41) m - un m m • n = 1 This c l a s s i f i c a t i o n r u l e minimizes the p r o b a b i l i t y of an e r r o r when the features are s t a t i s t i c a l l y independent and when ^ ( ^ ^ 1 ^ ) ^^m^ '"1 ( 3«41) are e i t h e r known exactly or estimated using Bayes estimation procedure [103]. Assume that a t o t a l of S pattern samples are a v a i l a b l e f o r estimating the 42 p r o b a b i l i t y d i s t r i b u t i o n s and that the' kth pattern sample i s represented by (^,0^), 1 < k < S, where d^ i s the extracted feature vector and 6^ i s the l a b e l which i d e n t i f i e s the corresponding l e v e l of anesthesia. I f each of the N feature measurements i s scaled and quantized to some value £, 1 < I < L, then Bayes estimates of P(d = i | c ) and P(C ), denoted by ' J un 1 m m • P ( d u n = ^|C m) and P ( c m ) r e s p e c t i v e l y , are given by 1 + 1 Hd = £|C ) = q n / m . - (3.42) un 1 m s + L m and In (3.42) q^y^. denotes the number of a v a i l a b l e pattern samples belonging to class C in which d, = I, while s in (3.43) denotes the total number m kn m of available pattern samples belonging to C m, i.e. V m = j x *(dkn> V *' Cm> ( 3 ' 4 4 ) and S ' s = Z f(6. , C ) (3.45) m , , K m k=l where and f 1 i f 8,=C and d = Jl ^ v - v L th <3-46) L 0 otherwise. i f e.=c k m otherwise. In general, the assumption that the features are s t a t i s t i c a l l y independent may not be v a l i d . However the performance of a c l a s s i f i e r based on Bayes d e c i s i o n r u l e , under the assumption of s t a t i s t i c a l l y inder-pendent features, does provide a bound on the performance that would be p o s s i b l e i f any e x i s t i n g feature interdependence could be e x p l o i t e d . 43 This follows from the argument that an invalid assumption regarding the feature probability distributions cannot increase the probability that unknown pattern samples w i l l be correctly classified. 3.5 Evaluation of System Performance 3.5.1 The Performance Estimation Problem The criterion usually adopted for assessing the overall perfor-mance of a pattern recognition system i s i t s probability of m i s c l a s s i f i -cation error, denoted here by P £. If the system preprocessor and feature extractor have been specified, then evaluating the performance of the sys-tem i s equivalent to evaluating the performance of the pattern c l a s s i f i e r . However, P e for the c l a s s i f i e r i s not. readily evaluated. Assume that the set of available pattern samples {d , 0 } contains a total of S pattern samples from J subjects, where each pattern sample consists of an extracted feature vector and a label which identifies the corresponding anesthesia level. If the complete set {d , 6 } is used to train the pattern c l a s s i f i e r , i.e. to estimate p ( d u n l c m ) 3 1 1 ( 1 P(C m) i n (3.41) using (3.42)-(3.47), then P E i s defined as the probability that future pattern samples w i l l be i n -correctly classified. Obviously P £ cannot be evaluated because, by d e f i -nition, a l l available pattern samples would be used for training the clas-s i f i e r and none would be l e f t for testing i t s performance. Hence, as de-picted in Fig. 3-3, some technique must be employed to estimate P e on the basis of the set of available pattern samples. 3.5.2 Performance Estimation Techniques Several parametric and nonparametric methods have been developed to estimate P e for different types of c l a s s i f i e r s on the basis of a f i n i t e set of pattern samples [25]. However, only a few of these methods are appropriate for estimating the performance of EEG pattern c l a s s i f i e r s . 44 r 1 i FEATURE i • PROCESSOR 1 • QUANTIZER 1 TRAINING SET OF FEATURE VECTORS AND LABELS 1 L CLASSIFIER FEATURE PROBABILITY DISTRIBUTIONS 1 1 _J (A) TRAINING THE CLASSIFIER I ~ ~ ~1 TESTING SET OF FEATURE VECTORS AND LABELS FEATURE QUANTIZER DECISION DEVICE FEATURE PROBABILITY DISTRIBUTIONS L_ CLASSIFIER (B) TESTING THE CLASSIFIER J ESTIMATED • LEVEL OF ANESTHESIA Fig. 3-3 Estimating Classifier Performance. The available set of pattern samples, i.e. feature vectors and labels, must somehow be used for training the clas-s i f i e r and for testing i t s performance. A method of performance estimation that i s appropriate for EEG c l a s s i f i e r s should possess some or a l l of the following characteristics. F i r s t , i t should be a nonparametric method because, i n general, l i t t l e i s known about the underlying nature of the feature distributions. Second, the method should make efficient use of the available pattern samples because in most EEG pattern recognition investigations the set of available pattern samples i s relatively small. Third, the method should yield an estimate of P & that i s as unbiased as possible, i.e. an estimate that i s neither overly optimistic nor overly pessimistic [104]. Finally, i t should provide 45 an indication of the v a r i a b i l i t y of the estimate: i t i s important to have some indication of the extent to which the performance of the c l a s s i f i e r w i l l be affected by the normal range of v a r i a b i l i t y among pattern samples. It appears that the major source of v a r i a b i l i t y in small sets of EEG pat-tern samples i s due to differences i n EEG characteristics among different subjects, i.e. intersubject EEG variation. Some early investigations of EEG pattern recognition systems indicated that intersubject EEG variation apparently had a significant effect on the performance of such systems [77,105]. These findings were supported by some i n i t i a l results which were obtained in the course of this research [37]. Therefore, i t was concluded that a satisfactory method of performance estimation should also be capable of providing an indication of the expected effect of intersubject EEG var-iation on c l a s s i f i e r performance. No single, existing method of performance estimation was found to satisfy a l l of the above requirements. However, two npnparametric tech-niques were formulated which,together, satisfied many of the above require-ments and provided particularly useful estimates of the performance of EEG pattern c l a s s i f i e r s . Because these techniques were based on two popular nonparametric methods of performance estimation, known in the literature as the II method [106,107] and the U method [108,109], they w i l l subsequently be referred to in this thesis as the n* technique and the U* technique, respectively. The n* technique, to be described i n section 3.5.3, produces an estimate of P e which indicates the expected performance of the c l a s s i -f i e r on future EEG data from a population of subjects. The U* technique, to be described in section 3.5.4, produces an estimate of P e which i n d i -cates the expected performance of the c l a s s i f i e r on future EEG data from only one subject, or the performance that would be possible across a 46 subject population i f the effect of intersubject EEG variation could some-how be eliminated To permit concise descriptions of the I I * and U* techniques in the following sections, let the set of S available pattern samples from J sub-jects be partitioned into J mutually exclusive sets, denoted by {d.e}1, {d,e}2,...,{d,e} J, where each set corresponds to the pattern samples obtained from one sub-ject. Then {d,e} j 4 {dj , e j ; . - . ; d j ( j ) , e j ( j ) } (3.48) for j = 1,...,J where d^ and 6^ denote, respectively, the feature vector and the label of the ktb pattern sample from the j t h subject, and J ' I p(j) = S, (3.49) j=l i.e. p(j) denotes the number of available pattern samples from the j t h subject. -3.5.3 The II* Technique Let the estimate of P e produced by the I I * technique be denoted by P e [ I I * ] . Then the n * technique for estimating c l a s s i f i e r performance can be conveniently described by the following algorithm. 1) Set aside {d,8}^, the set of pattern samples from the j t h subject, for testing the c l a s s i f i e r . 2) Train the c l a s s i f i e r on a l l pattern samples from the J - l remaining sets, i.e. from {d,9}m fm = 1,... ,J 3) Test the c l a s s i f i e r on {d,0}^ to obtain a proportion of 47 errors denoted by 1 P ( j ) j where P [n*L - E < (3.50) e l J j P ( j ) k = 1 » otherwise, . TO i f dr. is correctly classified 4 - (, .. . <3-51) i.e. e^ acts as an error indicator. 4) Repeat steps l)-3) for j = 1,...,J to obtain the proportions of errors PE[IT*]j for j = 1,...,J. 5) The II* estimate of P g can then be computed: P [n*] = I P -[n*]..- (3.52) e . , S • e L J j j=l J Appendix F contains the l i s t i n g of a program that was written to compute P e[n*] for the c l a s s i f i e r described i n section 3.4. The program can accommodate up to 500 pattern samples, i.e. up to 500 spectral or time domain feature vectors and their labels. The program allows the c l a s s i f i e r ' s feature quantization scheme to be varied, and also permits the a p r i o r i class probabilities P(C m) i n equation (3.41) to be assumed equal or to be estimated by (3.43). 3.5.4 The U* Technique Let the estimate of P e produced by the U* technique be denoted by P e[U*]. Then ^ [U*] for a given c l a s s i f i e r can be computed by means of the following algorithm: 1) Consider only the set of pattern samples from the j t h sub-ject, i.e. {d,0}J for 1 < j < J. 2) Take out the kth pattern sample, (d^, 8^ ) and then define * < ^ ^ (3.53) 48 3) Train the c l a s s i f i e r on {d,©}^. i i 1 4) Test the c l a s s i f i e r on (d k>6 k) and use e^ for an error i n d i -cator, as in equation (3.51). 5) Repeat steps 2)-4) for k = l,...,p(j) to obtain e^ values for some fixed j and for k = 1,...,p(j). 6) Repeat steps l)-5) for j = 1,...,J. Thus e^ values are ob-tained for a l l j = 1,...,J and k = l , . . . , p ( j ) . 7) The U* estimate of P e is then computed in the following manner: 1 J P(J) i Pe[U*] = j Z Z e k. (3.54) j=l k=l The program li s t e d in Appendix G was written to compute P e[U*] for the c l a s s i f i e r described in section 3.4. The only exception to the above algorithm was in the case of very small sets {d,0}J: the c l a s s i f i e r was not tested on (d.^, 0^) i f the training set {d,0}^ did not include at least one pattern sample from the level corresponding to 0^. As with the II* performance estimation program,; the U* performance estimation program lis t e d in Appendix G permits changes in the c l a s s i f i e r ' s feature quantiza-tion scheme and a p r i o r i class probability assignments, and can accommodate up to 500 pattern samples. 3.6 Results 3.6.1 EEG Spectral Pattern Recognition Systems The n* and U* techniques described i n the previous sections were used to estimate the performance of various EEG spectral pattern recognition systems. To simplify the description of these different systems, i t should be recalled that a l l EEG pattern recognition systems can be regarded as consisting of the three basic elements depicted i n 49 Fig. 3-1: a preprocessor, a feature extractor and a c l a s s i f i e r . In a l l of the spectral pattern recognition systems which were considered, the preprocessor and feature extractor remained unchanged. Therefore, the different systems varied only in the structure of their c l a s s i f i e r s . As stated in section 3.1.1, the basic function of a system preprocessor i s to transform an EEG sample into a form which allows features to be more easily extracted. The preprocessor chosen for a l l spectral pattern recognition systems consisted of an amplifier to i n -crease EEG amplitudes to convenient levels, a bandpass f i l t e r (0.54-30.0 Hz) to reduce artifact, and a dig i t i z e r to convert each amplified and fi l t e r e d EEG sample to d i g i t a l form. The spectral feature extractor had two functions: the computation of spectra corresponding to each pre-processed 64s EEG sample and the subsequent evaluation of the 13 spectral features lis t e d in Table 3-1. In the feature extractor, the spectra were to be computed in the manner outlined in section 3.2.2 and the spectral features were to be evaluated as described in section 3.2.3. Fig. 3-3 shows the basic configuration of the c l a s s i f i e r em-ployed in a l l spectral pattern recognition systems. It consists of a feature quantizer, a decision device and a memory for storing e s t i -mates of the class-conditional feature probabilities and the a p r i o r i class probabilities. The feature quantizer was linear i n a l l systems, but the quantization range and the number of possible quantization levels were changed to study their possible effect on performance. The different quantization ranges were defined i n terms of a specified maximum number of standard deviations from the mean feature values, where the means and standard deviations were calculated from the av a i l -able training data. The decision rule that was described i n section 3.4 constituted the "decision device" shown in Fig. 3-3. In some 50 c l a s s i f i e r s the a p r i o r i class probabilities P(C m) were estimated by the Bayes probability estimates defined i n equation (3.43). For com-parative purposes, similar c l a s s i f i e r s were also considered i n which the a p r i o r i class probabilities were assumed to be equal. The performance of each different spectral pattern recognition system was estimated by the I I * and U* techniques. These techniques made use of the three sets of available spectral feature vectors, corresponding to the three types of anesthesia, which had been prepared as described in section 3.2.3. Estimating the overall performance of a system on the basis of a set of available pattern samples was therefore equivalent to estimating the performance of the system's c l a s s i f i e r on the basis of the corresponding set of spectral feature vectors, because a l l preproc-essing and feature extraction operations had already been performed on the EEG samples during the preparation of the feature vectors. The results obtained for many of the spectral pattern recognition systems which were developed for halothane anesthesia, narcotic anesthesia and enflurane anesthesia are summarized i n Tables 3-3, 3-4 and 3-5, respectively. As stated in section 3.5.2, the estimate of m i s c l a s s i f i -cation error probability provided by the I I * technique, i.e. the value of Pe[n*], indicates the expected performance of the system on future EEG data from a population of subjects. Alternatively, the U* per-formance estimate (P e[U*]) for the same system indicates i t s expected performance on future EEG data from only one subject, or the performance-that would be possible across a subject population i f the effect of intersubject EEG variation could somehow be eliminated. The best spectral pattern recognition system among those com-pared i n Table 3-3, Table 3-4 or Table 3-5 was considered to be the one which minimized the mean of the two estimates of error probability, i . e . 51 the one which minimized P e[Mean] = % { P e [ n * ] + P e[U*]} . (3.55) Table 3-3 Performance of Spectral Pattern Recognition Systems on EEG Data from Halothane Anesthesia Feature Quantizer Type of P(C m) Estimates Employed Estimated Er r o r P r o b a b i l i t y Range Number of Levels p [ n * ] e P [U*] e Mean ± 5.0 sd 16 Equal 0.454 0.142 0.298 ± 5.0 sd 32 Equal 0.393 0.149 0.271 ± 5.0 sd 64 Equal 0.389* 0.108* 0.248* ± 5.0 sd 128 Equal 0.471 0.175 0.323 ± 5.0 sd 64 Bayes 0.404 0.138 0.271 ± 1.0 sd 64 Equal 0.475 0.224 0.349 ±50.0 sd 64 Equal 0.396 0.108 0.252 Table 3-4 Performance of Spectral Pattern Recognition Systems on EEG Data from Narcotic Anesthesia Feature Quantizer Type of p<cm) Estimates Employed Estimated Err o r P r o b a b i l i t y Range Number of Levels P [ n * ] e PJU*] Mean ± 5.0 sd 16 Equal 0.463 0.256 0.359 ± 5.0 sd 32 Equal 0.460 0.240 0.350 ± 5.0 sd 64 Equal 0.449* 0.211* 0.330* ± 5.0 sd 128 Equal 0.519 0.250 0.384 ± 5.0 sd 64 Bayes 0.478 0.244 0.361 ± 1.0 sd 64 Equal 0.490 0.279 0.384 ±50.0 sd 64 Equal 0.481 0.211 0.346 52 Table 3-5 Performance of Spectral Pattern Recognition Systems on EEG Data from Enflurane Anesthesia Feature Quantizer Type of Estimates Employed Estimated Error Probability Range Number of Levels P [ n * ] e P [U*] e Mean ± 5.0 sd 16 Equal 0.426 0.122 0.274 -± 5.0 sd 32 Equal 0.420 0.135 0.277 ± 5.0 sd 64 Equal 0.420 0.132 0.276 ± 5.0 sd 128 Equal 0.413 0.168 0.290 ± 5.0 sd 64 Bayes 0.432 0.178 0.305 ± 1.0 sd 64 Equal 0.420 0.148 0.284 ±50.0 sd 64 Equal 0.416 0.132 0.274 ± 5.0 sd 16 Bayes 0.404 0.148 0.276 ± 1.0 sd 16 Equal 0.432 0.145 0.288 ±50.0 sd 16 Equal 0.413* 0.122* 0.267* In Table 3-3, Table 3-4 and Table 3-5 the best system i s iden-t i f i e d with asterisks. Accordingly, from the results in Table 3-3, the best spectral pattern recognition system developed for halothane anesthesia can be expected to classify between 61.1 percent and 89.2 percent of future EEG samples correctly. This system has a linear feature quantizer with 64 possible quantization levels over a range of ±5.0 sd (standard deviations) and employs equal a p r i o r i class probability estimates. From the results i n Table 3 - 4 i t i s evident that the best spectral pattern recognition system for narcotic anesthesia has the same feature quantization scheme and uses the same probability estimates. However, i t s performance i s slig h t l y inferior: i t can only be expected to correctly classify between 55.1 53 percent and 78.9 percent of future EEG samples. Finally, the results in Table 3-5 indicate that between 58.7 percent and 87.8 percent of future EEG samples from enflurane anesthesia w i l l be correctly c l a s s i -fied by the best spectral pattern recognition system. This system em-ploys equal class probability estimates, as do the best systems for halothane and narcotic anesthesia, but has a feature quantizer with only 16 possible quantization levels over a range of ±50.0 sd. 3.6.2 Time Domain EEG Pattern Recognition Systems In addition to spectral pattern recognition systems, various systems based on the recognition of time domain EEG patterns were devel-oped. As stated in section 3.3.1, these systems were investigated be-cause i t was suspected that the conditions under which some form of spectral pattern recognition system would be optimal were not satisfied, and because i t was known that visual EEG assessment i s based primarily on the evaluation of time domain EEG features, not spectral features. Time domain EEG pattern recognition systems were therefore developed so that their performance could be estimated and compared to the e s t i -mated performance of spectral pattern recognition systems. The structure of a l l time domain EEG pattern recognition systems which were considered was similar to the structure of the spec-t r a l pattern recognition systems described i n section 3.6.1. Both con-sisted of the three basic elements shown in Fig. 3-1: a preprocessor, a feature extractor and a c l a s s i f i e r . The preprocessors in a l l time domain systems were identical to the preprocessors in spectral pattern recognition systems, with the following exception: instead of a band-pass f i l t e r from 0.54-30.0 Hz, the f i l t e r defined in (3.26) was employed and the lowpass f i l t e r frequency f T p was set at 8.0, 16.0, 24.0 and 30.0 54 Hz in different systems to study the effect of prefiltering on system performance. As mentioned in section 3.3.2, this additional pr e f i l t e r i n g was performed to eliminate high frequency EEG activity above f T T ) Hz which, at least i n visual EEG assessment, seemed to obscure significant changes in time domain feature values. The function of the feature extractor employed in a l l time domain EEG pattern recognition systems was to evaluate each preprocessed 64s EEG sample i n terms of the set of 10 time domain features l i s t e d i n Table 3-2, so that the EEG sample could subsequently be classified on the basis of the set of extracted feature values. The c l a s s i f i e r s in a l l time domain systems had the same basic structure as the c l a s s i f i e r s in spectral systems, consisting of a feature quantizer, a decision device and a memory for storing estimates of the relevant probability distributions, as indicated in Fig. 3-3. The quantization range and the number of possible quantization levels were changed in different systems, in the manner described in section 3.6.1, in an attempt to establish the best linear feature quantization scheme. An implementation of the decision rule described in section 3.4 constituted the "decision device" i n a l l time domain system c l a s s i f i e r s . For comparative purposes the a p r i o r i class probabilities were assumed to be equal i n some systems, while the Bayes probability estimates defined i n (3.43) were employed in other systems. Using the sets of available pattern samples from halothane anesthesia, narcotic anesthesia and'enflurane anesthesia, estimates of the misclassification error probability for various time domain EEG pattern recognition systems were obtained by the II* and U* techniques described in section 3.5.3 and section 3.5.4, respectively. The resulting values of Pe[n*] and Pe[U*] are presented i n Table 3-6, Table 3-7 and 55 Table 3-6 Performance of Time Domain Pattern Recognition Systems on EEG Data from Halothane Anesthesia Lowpass Pr e f i l t e r Frequency fLP 5CH«) Feature Quantizer Estimated Error Probability Range Number of Levels p [n*] e P [U*] e Mean 8.0 + 5.0 sd 8 0.500 0.213 0.356 8.0 + 5.0 sd 0.471 0.187 0.329 8.0 + 5.0 sd 32 0.514 0.291 0.402 16.0 + 5.0 sd 8 0.500 0.127 0.313 16.0 + 5.0 sd 16 0.450 0.179 0.314 16.0 + 5.0 sd 32 0.518 0.231 0.374 24.0 5.0 sd 8 0.532 0.179 0.355 24.0 + 5.0 sd 16 0.514 0.198 0.356 24.0 + 5.0 sd 32 0.525 0.213 0.369 16.0 + 1.0 sd 8 0.496 0.243 0.369 16.0 ±50.0 sd 8 0.486* 0.127* 0.306* Table 3-8. Because their performance was consistently better, only systems which employ equal, rather than Bayes, a p r i o r i class pro-bability estimates are described i n these three tables. The best system among those presented i n each table was considered to be the one which min-imized the mean of the two error estimates, i.e. the one which minimized (3.55). The best system i n each of the three tables i s identified with asterisks. From the results presented i n Table' 3-6,the best time domain EEG pattern recognition system developed for halothane anesthesia can be expected to classify between 51.4 percent and 87.3 percent of future EEG samples correctly. In this system the lowpass f i l t e r frequency f-yp i s 16.0 Hz and the feature quantizer has 8 possible quantization levels extending over a range of 50.0 sd. The results i n Table 3-7 indicate that between 56 Table 3-7 Performance of Time Domain Pattern Recognition Systems on EEG Data from Narcotic Anesthesia Lowpass Pre f i l t e r Frequency fLP ( H Z ) Feature Quantizer Estimated Error Probability Range Number of Levels p [n*] e P [U*] e Mean 8.0 ± 5.0 sd 8 0.504* 0.320* 0.412* 8.0 ± 5.0 sd 16 0.522 0.349 0.435 8.0 ± 5.0 sd 32 0.519 0.391 0.455 16.0 ± 5.0 sd 8 0.548 0.288 0.418 16.0 ± 5.0 sd 16 0.578 0.317 0.447 16.0 ± 5.0 sd 32 0.592 0.378 0.485 24.0 ± 5.0 sd 8 0.578 0.276 0.427 24.0 ± 5.0 sd 16 0.572 0.305 0.438 24.0 ± 5.0 sd 32 0.566 0.359 0.462 8.0 ± 1.0 sd 8 0.551 0.378 0.464 8.0 ±50.0 sd 8 0.507 0.320 0.413 49.6 percent and 68.0 percent of future EEG samples from narcotic anes-thesia could be correctly classified by the best time domain EEG pattern recognition system. The lowpass f i l t e r frequency f T T ) i s 8.0 Hz i n the Lor preprocessor of this system and the feature quantizer has 8 possible quantization levels over a range of ±5.0 sd. Finally, from the results in Table 3-8, the best time domain EEG pattern recognition system dev-eloped for enflurane anesthesia can be expected to correctly classify between 62.8 percent and 89.8 percent of future EEG samples. In this system the feature quantizer has 8 possible quantization levels extending over a range of ±5.0 sd and, i n contrast to the best systems in Table 3-6 and Table 3-7, the lowpass f i l t e r frequency f T p i s 30.0 Hz, i.e. the 57 Table 3-8 Performance of Time Domain Pattern Recognition Systems on EEG Data from Enflurane Anesthesia Lowpass Pre f i l t e r Feature Quantizer Estimated Error Probability Frequency fLP ( H Z ) Range Number of Levels p [n*] e P [U*] e Mean 8.0 + 5.0 sd 8 0.435 0.204 0.319 8.0 + 5.0 sd 16 0.410 0.224 0.317 8.0 + 5.0 sd 32 0.410 0.250 0.330 16.0 5.0 sd 8 0.394 0.141 0.267 16.0 + 5.0 sd 16 0.404 0.135 0.269 16.0 + 5.0 sd 32 0.416 0.197 0.306 24.0 + 5.0 sd 8 0.397 0.095 0.246 24.0 + 5.0 sd 16 0.347 0.132 0.239 24.0 + 5.0 sd 32 0.369 0.161 0.265 30.0 + 5.0 sd 8 0.372* 0.102* 0.237* 30.0 + 5.0 sd 16 0.369 0.145 0.257 30.0 + 5.0 sd 32 0.404 0.184 0.294 30.0 + 1.0 sd 8 0.401 0.138 0.269 30.0 ±50.0 sd 8 0.385 0.102 0.243 elimination of high frequency EEG activity did not result i n an improve-ment i n system performance. ' 3.7 Discussion 3.7.1 Spectral and Time Domain EEG Pattern Recognition Systems The primary objective of the work described i n this chapter was to study the f e a s i b i l i t y of estimating anesthesia levels by means of EEG 58 pattern recognition. It was assumed that the c l i n i c a l , non-EEG c r i t e r i a l i s t e d in Table 2-1 defined five c l i n i c a l l y valid levels of anesthesia for patients during halothane, narcotic or enflurane anesthesia. The various spectral and time domain EEG pattern recognition systems des-cribed in sections 3.6.1 - 3.6.2 were developed in an attempt to reliably estimate the different levels of anesthesia, i.e. to agree with assessments made by anesthesiologists on the basis of the non-EEG c r i t e r i a . Speci-f i c a l l y , the function of each EEG pattern recognition system was to estimate the level, of anesthesia by classifying an unknown EEG sample: on the basis of a set of extracted feature values, corresponding to the spectral features l i s t e d in Table 3-1 or the time domain features l i s t e d in Table 3-2. The performance of each EEG pattern recognition system on future data was evaluated, in terms of the estimated probability of m i s c l a s s i f i -cation error, by means of the n * technique and the U * technique as des-cribed in sections 3.5.2 - 3.5.4. The resulting values of P e [ n * ] and P e l ^ * J for various spectral and time domain EEG pattern recognition sys-tems are summarized in Tables 3-3 to 3-8. In section 3.5.2 i t was pointed out that the I I * and U * techniques provide particularly informative and efficient estimates of the performance of EEG pattern recognition systems. It i s suspected that the values of P e [ n * ] and P e [ U * ] obtained for a spe-c i f i c system could be decreased, i.e. performance could be improved, by increasing the number of EEG pattern samples available for training the system. This follows from the argument that the error between the actual feature probability distributions needed to evaluate the decision rule in £3.41) and the Bayes estimates of those distributions, defined i n (3.42) , can be expected to decrease with an increase i n sample size. 59 The best systems among those compared in Tables 3-3 to 3-8 were considered to be the ones which minimized the mean error estimate defined in (3.55). It should be noted that a l l of the best systems i n terms of this criterion employed equal, rather than Bayes, estimates of the a p r i o r i class probabilities. Assuming that future EEG samples w i l l be from M=5 equiprobable classes, the performance of these systems can reasonably be compared to the expected performance of a completely ran-dom pattern classification system, for which e^[n*3 - Pe[u*] - 1 - M - 1 = 0.8, (3.56) i.e. only 20 percent of future EEG samples would be correctly c l a s s i f i e d . In contrast, the results obtained for the best spectral pattern recogni-tion systems (in Tables 3-3 to 3-5) indicate that between 61.1-89.2 percent, 55.1 - 78.9 percent and 58.7 - 87.8 percent of future EEG snmples from, respectively, halothane anesthesia, narcotic anesthesia and enflurane anesthesia w i l l be correctly c l a s s i f i e d . The best time domain EEG pattern recognition systems (in Tables 3-6 to 3-8) have slightly inferior performance compared to the best spectral systems for halothane and narcotic anesthesia, but slig h t l y superior performance for enflurane anesthesia: i t i s expected that between 51.4 - 87.3 percent, 49.6 - 68.0 percent and 62.8 - 89.8 percent of future EEG samples from halothane, narcotic and enflurane anesthesia, respectively, could be correctly classified by these systems. It would obviously be desirable to compare the results obtained for the best spectral and time domain EEG pattern recognition systems to the expected r e l i a b i l i t y of visual EEG assessment. Although an exact 60 comparison is not possible, the results of a recent investigation con-cerning the r e l i a b i l i t y of visual EEG assessment, discussed previously i n Chapter I , are relevant. The results of this investigation i n d i -cate that, even with an established set of objective c r i t e r i a for pattern identification, the r e l i a b i l i t y of visual EEG assessment may be surprisingly low: the highest average intraclass correlation coefficient among seven • experienced c l i n i c a l EEG raters was reported to be 0.56 [18]. One additional point concerning the results i s worthy of con-sideration. An IBM 370/168 computer was used to develop a l l EEG pattern recognition systems and to estimate their performance. Consequently, the differing amounts of memory and processing time required by the var-ious rystems were not apparent. However, these factors are of practical significance since one would obviously prefer to use the smallest, least expensive computer when actually implementing such a system for use on a routine basis in a hospital environment. It was calculated that the im-plementation of the best spectral pattern recognition systems would require a computer with at least 8000 bytes of memory and an efficient version of the Fast Fourier Transform (FFT) algorithm. In contrast, the best time domain EEG pattern recognition systems would require approximately 50 per-cent less memory and would be computationally faster and simpler, primarily because the FFT would not be required. 3.7.2 Evaluation of EEG Pattern Recognition Approach The results presented in this chapter have clearly demonstrated the f e a s i b i l i t y of obtaining reliable estimations of the level of anes-thesia during surgical operations by means of computer-based EEG pattern recognition. Perhaps the value of this approach, in relation to earlier attempts to visually evaluate EEG activity during anesthesia, can best be 61 assessed in terms of the four methodological problems associated with earlier work which were discussed previously (section 1.2.4): the defin-i t i o n of anesthesia levels, the definition of EEG patterns, EEG pattern v a r i a b i l i t y and the extent of inter-rater r e l i a b i l i t y . In this research, the different levels of anesthesia were de-fined by a set of c l i n i c a l l y valid, non-EEG c r i t e r i a . Estimations of the level of anesthesia which were made on the basis of these c r i t e r i a were assumed to be correct and EEG pattern recognition systems were then de-signed to agree with the estimations. Of course, any error introduced by the i n a b i l i t y of anesthesiologists to consistently identify levels of anesthesia on the basis of the c l i n i c a l c r i t e r i a would obviously be incor-porated into such systems. Attempts to control this possible source of error were described in sections 2.3.3-2.3.4. The earlier d i f f i c u l t y associated with the r e l i a b i l i t y of EEG pattern definition was resolved in this research by e x p l i c i t l y defining sets of heuristically derived features so that EEG samples could be quan-ti t a t i v e l y evaluated in terms of these features. Although i t was assumed that a l l features were s t a t i s t i c a l l y independent for computational sim-p l i c i t y , this assumption is not necessarily j u s t i f i e d . As stated i n sec-tion 3.4, i t is therefore theoretically possible to develop a more reliable EEG pattern recognition system by exploiting any s t a t i s t i c a l dependence that may exist among features. However, taking s t a t i s t i c a l dependencies into account can easily prove to be a formidable task because of an ex-ponential increase in the measurement complexity, where the measurement complexity refers to the total number of discrete probability values to be estimated [73]. For example, the measurement complexity C of a set of N s t a t i s t i c a l l y independent features, each of which can assume L possible quantization values, i s given by C = L • N ; (3.57) 62 however, i f the features are interdependent the measurement complexity is given by C = L N , (3.58) an enormous increase for reasonable values of L and N. This i s significant because as a rule of thumb the amount of data required to adequately train a c l a s s i f i e r , as well as the memory and computation time required in i t s subsequent u t i l i z a t i o n , i s proportional to the measurement complexity of the feature data. In the event that many of the features are thought to be strongly interdependent the use of a different pattern recognition technique such as stepwise discriminant analysis, which does not assume s t a t i s t i c a l l y independent features, might prove to be more tractable. However, in the theoretical development of stepwise discriminant analysis other simplifying assumptions concerning the s t a t i s t i c a l properties of the feature set are made which are also not necessarily valid. ' The previously encountered methodological problems associated with the v a r i a b i l i t y of EEG patterns among-different anesthetic agents and different patients for the same level of anesthesia were reduced in three ways. F i r s t , only three specified combinations of anesthetic agents were considered in this i n i t i a l investigation. In addition, only healthy adult patients in the best surgical risk categories were selected as sub-jects. Finally, because the EEG pattern recognition systems were developed by processing a l l available training data and storing the extracted feature values, no simplifying assumptions concerning the underlying feature dis-tributions were necessary. However the fact that the available data base i s relatively small, corresponding to a limited number of patients, means that EEG pattern v a r i a b i l i t y must s t i l l be regarded as a major potential source of v a r i a b i l i t y in the performance of EEG pattern recognition systems which were trained on the available set of pattern samples. 63 Obviously, tbe inter-rater r e l i a b i l i t y problems which were evi-dent in earlier studies based on visual EEG assessment are effectively eliminated by the computer-based EEG pattern recognition approach. Once one reliable EEG pattern recognition system has been developed, other replicas can easily be produced to provide consistent and continuous estimations of the level of anesthesia during surgery. 3.7.3 Further Work Aside from the factors already mentioned, the performance of the EEG pattern recognition systems described in this chapter could have been affected by invalid assumptions concerning the underlying s t a t i s t i c a l characterist ics of the EEG data, by the limited number and type of features extracted, by the presence of undetected artif a c t i n EEG samples and by a marked degree of EEG pattern v a r i a b i l i t y and intersubject EEG variation. Each of these factors should be investigated further with a view to im-proving system performance. In Chapter IV, for example, some - relevant s t a t i s t i c a l character-i s t i c s of spontaneous EEG activity w i l l be investigated. Specifically, i t would be useful to know over what time interval ( i f any) the EEG can be considered to be a sample function from a stationary, or at least a wide-sense stationary, random process. In addition, i t would be potentially useful to have an indication of the extent to which a sample EEG ampli-tude distribution deviates from a Gaussian distribution. With such i n -formation an appropriate EEG source model could be generated and subsequently employed i n developing improved computer-based systems for monitoring the level of anesthesia. A l l systems considered i n this chapter were based on the extrac-tion of relatively small sets of spectral or time domain features. These 64 features were chosen e i t h e r because they had an established c l i n i c a l s i g -n i f i c a n c e or because they had previously been described as meaningful i n the l i t e r a t u r e on automatic EEG a n a l y s i s . Tbe extraction of a d d i t i o n a l , h e u r i s t i c a l l y derived features to improve the performance of s p e c i f i c EEG pattern recognition systems w i l l be considered i n Chapter V. A l t e r n a t i v e l y , although beyor.l the scope of t h i s t h e s i s , the use of s t a t i s t i c a l feature s e l e c t i o n techniques (e.g. [110]) to choose a small set of good features from a large number of more randomly chosen ones might also be explored. As stated i n s e c t i o n 3.4, i t i s t h e o r e t i c a l l y possible to dev-elop more r e l i a b l e EEG pattern recognition systems by e x p l o i t i n g any s t a -t i s t i c a l interdependences that may e x i s t among s p e c t r a l or time domain EEG features. In Chapter V the magnitude of any interdependenciea, or at l e a s t the magnitude of any i n t e r c o r r e l a t i o n s , that may e x i s t among s p e c t r a l features w i l l be i n v e s t i g a t e d . Also i n Chapter V, methods for reducing the e f f e c t of i n t e r s u b j e c t EEG v a r i a t i o n on the performance of EEG pat-tern r e c o g n i t i o n systems w i l l be explored. F i n a l l y , instead of considering only spontaneous EEG pattern r e c o g n i t i o n systems, the p o s s i b i l i t y of developing systems which are based on the r e c o g n i t i o n of d i f f e r e n t sensory evoked responses during anesthesia (e.g., see [15]) might also be considered. 65 CHAPTER IV MODELLING THE STATIONARITY AND GAUSSIANITY OF EEG ACTIVITY 4.1 Introduction 4.1.1 Motivation Considerable motivation exists for the development of an ade-quate s t a t i s t i c a l model for spontaneous EEG activity. For example, i t was mentioned in section 3.7.3 that such a model might be of value in the development of EEG pattern recognition systems for monitoring anesthesia levels. More generally, almost a l l methods of quantitative EEG analysis are based on certain implicit assumptions regarding the s t a t i s t i c a l char-acteristics of the underlying random process, particularly with respect to the extent of stationarity and Gaussianity of the process. The e f f i -cacy of alternate analytic techniques depends upon the degree to which such assumptions are j u s t i f i e d by the characteristics of the particular ensemble of EEG segments being analysed. In addition, a better under-standing of some of the s t a t i s t i c a l properties of different EEG ensembles might eventually result in a better understanding of the neurophysiological mechanism of spontaneous EEG generation, a mechanism which is s t i l l not well understood. Despite such motivation, relatively few investigations of the s t a t i s t i c a l properties of specific EEG ensembles have been described in the literature. 4.1.2 Evaluation of Previous Investigations The f i r s t studies of the EEG amplitude probability distribution suggested a striking similarity to the normal or Gaussian distribution [111,112]. A later analysis of one 8.33s EEG segment from each of four sub-jects also showed that in two cases the amplitude distributions closely 66 f i t t e d a Gaussian distribution [113]. However, subsequent reports by others contained rather contradictory results. For example, tests of thirty 52.8s EEG segments for Gaussianity resulted i n 29 rejections; the investigators concluded that the spontaneous EEG could not be modelled as a normal random process because not even i t s amplitude distribution was Gaussian f l l 4 ] . E l u l suggested that this study illustrated an extreme case where non-stationarity of the EEG was erroneously construed as i n d i -ative of a non-Gaussian distribution [115].He tested successive 2s EEG segments from one subject and reported that the EEG was Gaussian 66 per-cent of the time in the resting state, shifting to 32 percent during a mental arithmetic task. Although the results of some later studies ap-pear to agree with those of E l u l (e.g. [116]), others do not. For example, Dumermuth et a l . commented that most of the 40s EEG segments which they had analysed deviated from Gaussianity [21]. Following the suggestion of E l u l they also analysed 4s EEG segments in an attempt to reduce ef-fects due to non-stationarity but reported even stronger deviations from a Gaussian model [117,118]. Several factors can be identified which have contributed to the previously described inconsistencies i n the literature. Many early i n -vestigations involved relatively small ensembles of EEG segments from very few subjects. Frequently, EEG data from only one non-standardized channel was considered. The r e l i a b i l i t y and comparability of the results obtained in such studies were therefore affected by topological d i f f e r -ences, by s t a t i s t i c a l v a r i a b i l i t y due to small sample sizes and by inter-subject EEG variation. Another factor contributing to discrepancies among published findings concerns the different EEG digitization rates which were used: i t w i l l be shown in this chapter that different sampling 67 rates change the efficacy of s t a t i s t i c a l hypothesis tests. Finally, the problem of estimating the degree of stationarity of a particular ensemble of EEG segments has seldom been considered directly in such investiga-tions. Attempts were instead made to circumvent the problem of station-arity when investigating Gaussianity by subdividing tbe EEG into very short segments in the expectation that any non-stationary effects would be reduced. 4.1.3 Outline of Chapter In this chapter, a technique i s proposed for estimating the degree of wide-sense stationarity and the degree of Gaussianity of an ensemble of EEG records. Results which have been obtained by applying this technique to three relatively large ensembles of mul-tichannel EEG data are also described. In addition, the comparative advantages of employing, alternate, methods of EEG. analysis are dis-cussed in relation to the estimated degree of stationarity and Gaussianity of the particular EEG ensembles under consideration. Finally, the specific relevance of the results presented i n this chapter to the development of EEG pattern recognition systems for monitoring anesthesia levels i s discussed. 4.2 Random Process Characterization The ensemble of a l l possible time functions which can be gene-rated by a particular source together with their respective probabilities of occurrence defines a random process. Spontaneous EEG activity may therefore be modelled as a random process. Any such process, denoted by X(t), i s said to be completely characterized or modelled i f i t s nth order 68 d i s t r i b u t i o n function F [ X l x : t , , . . . , t ] = P [X(t.) < X l i . . . , X ( t ) < x ] (4.1) ± n i n j. . x n n i s known f o r any n and any set of sampling times t ^ , . . . - , t n ([84], pp. 296-297). For most random processes i t i s d i f f i c u l t to obtain e m p i r i c a l estimates of (4.1). However, i f a p a r t i c u l a r random process i s both Gaussian and sta t i o n a r y then the problem of modelling i t by estimating (4.1) i s gr e a t l y s i m p l i f i e d . B r i e f l y , a random process X(t) i s sa i d to be Gaussian or normal i f i t s nth order p r o b a b i l i t y density f u n c t i o n f[x^,...,x^; t ^ , . . . , t ^ ] , obtained by d i f f e r e n t i a t i n g (4.1) with respect to a l l v a r i a b l e s x^, takes the form of a j o i n t l y Gaussian d i s t r i b u t i o n , i . e . where f(x^>'.'» x n> *"l'"**'Si^  — x — [x. ,. •. ,x ], - i n u = [ E { X ( t i ) } , . i . , E { X ( t n ) } ] = [ u 1 , . . . , u n ] , exp { -Jr(x - u ) [ K ] _ 1 ( x - u) T} (2ir> n / 2(|Kr)* [K] = r k l l k l n LlC m • • • TC__ n l nn In = E { ( x ± - u ± ) ( X j - U j ) > » (4.2) (4.3) (4.4) (4.5) (4.6) and |K| i s the determinant of [K], the covariance matrix ([119], pp. 111-112) . A random process X(t) i s sa i d to be s t r i c t l y s t ationary i f none of i t s s t a t i s t i c s are a f f e c t e d by a s h i f t i n time o r i g i n , i . e . i f tbe two 69 processes X(t) and X(t+g) have the same sta t i s t i c s for any £. A much weaker condition i s that of wide-sense stationarity in a f i n i t e time interval: i f E[X(t)] = y = constant (4.7) and i f the autocorrelation function is given by •lUt^t ) = R(T), (4.8) where x = It.-tJ , (4.9) for a l l t, t^ and t_. e[0,T] then X(t) i s said to be wide-sense stationary in the interval [0,T] ([84], pp. 300-304). Under this condition, (4.6) becomes k ± j = E {(x ± - u ±)(x J - U j ) > . = E { x i X j } " U i U j = R ( t i , t j ) - y 2 = R(T) - y 2 (4.10) for a l l t±i t j e [ 0 , T ] . From (4.2) and (4.10) i t is therefore evident that, under the condition of wide-sense stationarity in the interval [0,T], a Gaussian random process X(t) i s completely specified by i t s mean and autocorrelation function in the interval. If a random process X(t) is ergodic [120] then such s t a t i s -tics as the mean and autocorrelation function can be calculated from a single sample function, denoted by x(t), i.e. E[X(t)] = ^  ^ / T / 2 x(t) dt = y (4.11) T T -T/2 and R(T) = E[X(t)X(t+r)] lim 1 . T/2 , . , . . , = T-w» T / X(t)x(t+T)dt T -T/2 = (R(T) , (4.12) 70 where <R(x) represents the time autocorrelation function. However, an em-p i r i c a l test for ergodicity would require extensive ensemble calculations and would certainly not be feasible when only a limited number of sample functions of relatively short duration are available. Under these condi-tions ergodicity is usually assumed and any desired ensemble st a t i s t i c s are estimated from the individual characteristics of a l l available sample functions. For example, i f a l l sample functions can be modelled as the output of a wide-sense stationary Gaussian process in an interval [0,T] then the mean and autocorrelation function are sufficient s t a t i s t i c a l descriptors of the process in the interval. These ensemble descriptors can be estimated in practise by averaging the means and the time auto-correlation functions (or equivalently the power spectra) of the a v a i l -able sample functions. A necessary requirement before any such modelling of observed EEG activity can be attempted i s that some empirical procedures be est-ablished for testing individual EEG segments, at a specified significance level, for wide-sense stationarity and Gaussianity. 4.3 Establishment of Empirical Testing Procedures 4.3.1 Testing for Wide-Sense Stationarity Assume that [x^,...,x 2 ] has been obtained by sampling a band-limited EEG signal x(t) at or above the Nyquist rate during the time interval [0,2T]. Although an exact determination of the degree of wide-sense stationarity and Gaussianity of x(t) in the given interval is not possible, useful estimates of these s t a t i s t i c a l properties can be obtained by the application of certain hypothesis testing procedures. A procedure for determining whether or not [x^,... ,x 2 n] can be considered to be a set of samples from a wide-sense stationary function 71 can be based on the requirement that the amplitude distributions and the power spectra calculated for the sample subsets [x^,...,xn3 and [ x n + i» ...>x2n3 m u s t not be significantly different. • Specifically, a test for the wide-sense stationarity of a given sample set can be constructed by f i r s t dividing the set into two equal subsets and calculating an ampli-tude histogram and power spectrum for each- Then the two-sample Kolmo— gorov-Smirnov (K-S) test [121,122] can be employed to compare the sample amplitude and spectral distribution functions of each. The two-sample K-S test i s based on the s t a t i s t i c which i s defined as D2 = Si s l F n ( S ) " G n ( s>l ' <4'13> where. F (s) and G (s) are distribution functions calculated from a set n n of samples of size n from populations F and G respectively. A large value of resulting from application of the two-sample K-S test would indicate rejection, at some significance level, of the null hypothesis that F and G are identical. When [x,,...,x ] and [ • 1 n n+1 2n tested in this manner, rejection of either the hypothesis of identical amplitude distributions or the hypothesis of identical spectral d i s t r i -butions indicates that the original EEG signal cannot be modelled with confidence as a sample function of a random process that i s wide-sense stationary over the interval [0,2T], Thus, rejection of either hypothesis for a given set of samples constitutes an empirical upper bound on the interval of wide-sense stationarity, i.e. in this instance the interval of wide-sense stationarity for the random process of which x(t) i s a sample function i s assumed to be less than 2T. 4.3.2 Testing for Gaussianity Testing the amplitude distribution of a set of EEG samples 72 [x^, . . . ,X2 n ] for Gaussianity or normality i s accomplished by means of a goodness of f i t test. The K-S goodness of f i t test i s employed because i t has been shown that, with the population mean and variance estimated by the sample mean and variance, i t yields a test for normality which is more powerful than the more popular chi-square test [121-123]. The K-S s t a t i s t i c represents the least upper botnd of the differences between the empirical and assumed distribution functions: D l " a l l s |F 2 n(s) - F (s)| , (4.14) where * S t* i e distribution function calculated from the set of 2n samples and F(s) is the assumed distribution function. If i s too large, the n u l l hypothesis that F(s) represents the population d i s t r i -bution function i s rejected. 4.4 Experiment 4.4.1 Selection of Sample EEG Data In order to apply the previously described tests for Gaussianity and wide-sense stationarity to some actual EEG ensembles, three sets of sample EEG segments were selected from the available EEG data base (des-cribed i n Table 2-2). Because of the extensive computation involved in testing for Gaussianity and wide-sense stationarity, i t was necessary from a practical standpoint to limit the amount of sample EEG data under con-sideration. Consequently, only sample EEG segments from the two most common types of general anesthesia, previously referred to i n this thesis as halothane and narcotic anesthesia, were considered. It was also nec-essary to r e s t r i c t the number of sample EEG segments from each type of anesthesia because of computational time and cost considerations. Ac-cordingly, i t was decided that four multichannel EEG segments without 73 visually apparent artifa c t from each of 30 subjects would be considered: 15 of the subjects who were chosen had received halothane anesthesia and the other 15 subjects had received narcotic anesthesia. Detailed descriptions of the EEG data acquisition procedure and the preparation of sample EEG segments corresponding to c l i n i c a l anesthesia levels were given in Chapter II. Briefly, EEG activity was recorded from two pairs of b i l a t e r a l l y symmetric, dif f e r e n t i a l channels: F3-C3, C3-01, F4-C4 and C4-02, according to the International 10-20 System of electrode placement [70]. The recorded data was later lowpass f i l t e r e d at 30.0 Hz and then the 4-channel, 64s sample EEG segments were prepared. As stated above, four f i l t e r e d multichannel EEG segments were selected from each of 30 different subjects for the modelling investigation. Two of the 64s segments from each subject were baseline EEG segments corresponding to Anesthesia Level 0, i.e. they were recorded while the subject was awake and resting with eyes closed, approximately one hour before surgery. The two additional EEG segments from the same subject corresponded to Anes-thesia Level 3, i.e. they were recorded at a surgical level of anesthesia. Three different sets of multichannel EEG segments were thus se-lected for consideration: one set of 60 baseline segments from 30 awake and resting subjects, a second set of 30 segments from 15 of these sub-jects during halothane anesthesia, and a third set of 30 segments from the other 15 subjects during narcotic anesthesia. Some samples of multi-channel EEG activity from each of these three sets of data can be seen in Fig. 2-2(a)-(d). 4.4.2 Determination of Optimum Sampling Rate After the three sets of sample EEG data had been selected for the modelling investigation, i t was desired to determine the best rate at 74 which to sample and d i g i t i z e the data. Because the EEG segments had already been lowpass f i l t e r e d at 30.0 Hz, the theoretical minimum sampling rate, as given by the Sampling Theorem ([119], pp. 400-405), was 60.0 Hz, i.e. the Nyquist rate. The f i l t e r r o l l - o f f characteristics and the com-putational desirability of setting the sampling rate to a power of two indicated that the most practical minimum sampling rate, denoted by F_, s would be 64 Hz. Most of the previous investigations of Gaussianity or stationarity have considered EEG data sampled at rates of from 2F S to 4F a and even higher. However, s t a t i s t i c a l hypothesis tests such as the K-S and chi-square tests assume that the set of samples to be tested corres-ponds to a set of s t a t i s t i c a l l y independent random variables or observations. Therefore, when this assumption of s t a t i s t i c a l independence i s violated because of an unnecessarily high sampling rate, one can expect the e f f i -cacy of such tests to decrease accordingly. To examine and i l l u s t r a t e the effect of different sampling rates on s t a t i s t i c a l hypothesis tests, 30 of the recorded 64s baseline EEG seg-ments from channel C4-02 were reproduced, bandpass f i l t e r e d from 0.54 Hz to 30.0 Hz, and digitized at a rate of 512 Hz or 8F g. By considering every second, fourth or eighth sample i t was also possible to study EEG data with an effective sampling rate of 4F g, 2F g, or F g, respectively. At each of these sampling rates a K-S goodness of f i t test for Gaussianity, at the 0.05 significance l e v e l , was performed on each of the M available EEG segments of T sec duration, where T = 2 1 , i = 0,1,....6 , (4.15) A N D M 30*64 // tc\ M = — - — (4.16) The results of these tests are summarized in Fig. 4-1 and clearly indicate the desirability of using a sampling rate as l i t t l e above the Nyquist rate as practicable. 75 DURATION OF EEG SEGMENTS (SECONDS) Fig. 4-1 Effect of Increased Sampling Rates on K-S Goodness of F i t Tests for Gaussianity. . F s is equal to 64 Hz, sli g h t l y above the Nyquist rate. The percentage of EEG segments .of a specified duration which could be modelled as Gaussian is plotted for 4 different sampling rates. 4.4.3 Application of Tests for Wide-Sense Stationarity and Gaussianity To reduce error i n the computation of power spectra, a sampling rate of 128 Hz was used to dig i t i z e a l l 120 EEG segments from the three ensembles under consideration. However, in view of the results in Fig. 4-1, EEG data with an effective sampling rate of 64 Hz was prepared by considering every second sample value and was used to compute a l l sample amplitude distribution functions needed for the previously described tests 76 for wide-sense stationarity and Gaussianity. Recall from section 4.3.1 that, for an EEG segment x(t) to be modelled as a sample function of a process that is wide-sense stationary in the interval [0,2T], a necessary condition i s that the amplitude dis-tribution functions and the power spectral distribution functions of x(t) in the intervals [0,T] and [T,2T] must not be significantly different. The distribution functions can be compared by means of the two-sample K-S test. It should also be recalled from section 4.3.2 that x(t) i n the i n -terval [0,2T] can be tested for Gaussianity by means of the K-S goodness of f i t test, with the mean and variance of the Gaussian population e s t i -mated by the sample mean and variance. Values for the two-sample K-S test ([121], p.487) and for the K-S goodness of f i t test with un] nown mean and variance [124],at the 0.05 level of significance, were used. After testing a l l 120 EEG segments of 64s duration for wide-sense stationarity and Gaussianity, each segment was subdivided into two segments of 32s duration which were also tested in the same manner. This procedure of successively subdividing and testing was repeated u n t i l a l l available EEG segments of Is duration were tested. In tot a l , 4M EEG segments of T seconds duration were tested, 2M segments from the baseline ensemble and M segments from each of the anesthesia ensembles, where T and M are given by (4.15) and (4.16) respectively. For each of the three ensembles, the percentage of EEG segments of a specified duration which could be modelled as being wide-sense stationary, Gaussian, or both wide-sense stationary and Gaussian was calculated. A l l results were then corrected for type I errors arising from false rejection of the hypotheses being tested. The computation of power spectra required as part of the pre-viously described test for wide-sense stationarity was performed by the 77 Direct Method, i.e. direct Fourier transformation of the data with consec-utive averaging over frequency, as described in section 3.2.1. Before Fourier transformation, each digitized EEG segment of T seconds duration, consisting of a set of 128T sample values, was f i r s t tapered with a time window W(t) of the form W(t) = i h[l - c o s ( ^ _ ) ] 0 * t< 0.1T 0.1T < t < 0.9T (4.17) %[1 - cos(n £=^] 0.9T < t < T. Each tapered EEG segment was then transformed via the Fast Fourier Trans-form algorithm. A periodogram was calculated from the complex Fourier coefficients for each fundamental frequency k/T Hz, where k=0,l,...,64T. Smoothing of the periodogram was performed using a rectangular window with 7 non-zero coefficients. In this manner a set of (64T + 1) smoothed spectral estimates from 0-64 Hz was calculated for each EEG segment of T seconds duration. The distribution function of the subset of spectral estimates between 1 Hz and 30 Hz was then used in the previously described test for wide-sense stationarity. Appendix H contains a l i s t i n g of the program that was used to compute EEG amplitude distribution functions and to evaluate the appro-priate one-sample and two-sample K-S s t a t i s t i c s . A companion program that was used to compute EEG power spectra and to evaluate the two-sample K-S st a t i s t i c s for the appropriate spectral distribution functions i s l i s t e d in Appendix I. Finally a third program, l i s t e d in Appendix J., performed K-S tests on the sample s t a t i s t i c s evaluated by the f i r s t two programs, and calculated the corrected percentages of EEG segments of different durations which could be modelled as Gaussian,or wide-sense stationary, or both. 78 4.5 Results 4.5.1 Interpretation of Results The results of the modelling investigation are summarized graph-i c a l l y i n Fig. 4-1 to Fig. 4-5. In Fig. 4-2 to Fig. 4-5, the results for each EEG channel are presented topologically, i.e. the results are located on a stylized representation of the head in a position corresponding to the location of the electrodes from which the EEG activity was recorded. Although a l l results have already been corrected for type I errors due to false rejections of the hypothesis being tested, type II errors due to false acceptances of the hypothesis may s t i l l exist. Also; these results are based on empirical tests for necessary, but not sufficient, proper-ties that sample EEG segments must possess in order to be modelled as the output of a particular type of random process. For these reasons, the estimated percentages given in Fig. 4-1 to.Fig. 4-5 therefore represent useful empirical upper bounds on the corresponding "true" percentages. 4.5.2 Effect of Sampling Rate of Empirical Tests The effect of different sampling rates upon the outcome of sta-t i s t i c a l hypothesis tests i s illustrated in Fig. 4-1. This marked and previously unexplored relationship may account for some discrepancies ap-parent in the literature. The problem arises from the assumption, made in the formulation of both the chi-square and the K-S tests, that the set of samples to be tested represents a set of independent random observations. In practise, as the rate of sampling a bandlimited EEG segment increases above the Nyquist rate, successive samples become more interdependent and the efficacy of s t a t i s t i c a l hypotheses tests is consequently affected [125,126].It i s therefore not surprising that one study of 2s EEG segments which were sampled at 200 Hz concluded that resting EEG activity i s 79 F i g 4-2 Mean Ensemble C h a r a c t e r i s t i c s of tbe Baseline EEG A c t i v i t y of 30 Subjects Who Were Resting With Eyes Closed. Results are based on a t o t a l of.3840s of EEG a c t i v i t y from each of 4 channels, c o l l e c t e d i n the form of two multichannel EEG samples of 64s duration per subject. 80 F i g . 4-3 Estimated Percentage of EEG Segments of Various Durations From Three D i f f e r e n t Ensembles Which Can Be Modelled as Wide-Sense Stationary. 81 F i g . 4-4 Estimated Percentage of EEG Segments of Various Durations from Three D i f f e r e n t Ensembles Which Can Be Modelled as Gaussian. 82 F i g . 4-5 Estimated Percentage of EEG Segments of Various Durations from Three D i f f e r e n t Ensembles Which Can Be Modelled as Both Wide-Sense Stationary and Gaussian. 83 Gaussian 66 percent of the time [115], while other studies of EEG segments of similar duration which were sampled at 5000 Hz concluded that resting EEG activity i s strongly non-Gaussian [21,117,118]. Fig. 4-1 indicates that,if i t i s desired to investigate the characteristics of EEG segments by means of s t a t i s t i c a l hypothesis tests, the best tradeoff between the requirement to adequately sample a bandlimited signal e.nd the desirability of satis-fying the assumption of a s t a t i s t i c a l l y independent sample set is reached i f the sampling rate is set as l i t t l e above the Nyquist rate as i s prac-ticable. 4.5.3 Estimated Baseline EEG Characteristics The estimated s t a t i s t i c a l characteristics of the ensemble of baseline EEG activity are presented in Fig. 4-2. The percentage of EEG segments which can be modelled as being Gaussian, wide-sense stationary, or both, i s given for, each. of. the 4- differential, channels under considerar tion. In Fig. 4-2 the strong dependence of the results on the duration of the EEG segments being tested i s apparent. This dependence accounts for many of the discrepancies in the literature, e.g. the results pre-sented here are consistent with one previous finding [113] that two of four baseline EEG segments (of 8.33s duration) tested were Gaussian and they are also consistent with another report that only 3.3 percent of 30 base-line EEG segments (of 52.8s duration) were found to be Gaussian [114]. The results in Fig. 4-2 also clearly differentiate between the properties of Gaussianity and stationarity: for example, i n channel C4-02 over 57 per-cent of EEG segments of 64s duration were modelled as wide-sense station-ary but only 5.3 percent were found to be Gaussian and less than 2.0 per-cent could be considered both Gaussian and wide-sense stationary. Fig. 4-2 also reveals striking similarities among corresponding results for 84 a l l 4 channels, and even stronger similarities between results for pairs of b i l a t e r a l l y symmetric channels. Thus, while no obvious inter-hemis-pheric EEG differences were found, occipital EEG activity appears to be consistently more Gaussian and more stationary than frontal EEG activity. 4.5.4 Wide-Sense Stationarity In Fig. 4-3 to Fig. 4-5 the estimated s t a t i s t i c a l characteris-tics of baseline EEG activity are compared to the corresponding charac- • t e r i s t i c s during narcotic anesthesia and during halothane anesthesia. The data base for each type of anesthesia consisted of 1920s of EEG ac-t i v i t y from 15 subjects, i.e. two 64s segments per subject, and the base-line data consisted of a total of 3840s of EEG activity from a l l 30 sub-jects. Fig. 4-3 shows the estimated percentage of sample EEG segments of various durations from each of the three different ensembles which can be modelled as wide-sense stationary. If the stationarity of EEG segments of the same duration i s considered, i t appears that EEG activity during halothane anesthesia i s marginally more stationary than baseline activity while EEG activity during narcotic anesthesia i s slightly less stationary than baseline activity. The results in Fig. 4-3 indicate that, for sample EEG segments less than 32s i n duration from any channel and from any of the three ensembles, the assumption of wide-sense.stationarity may be valid more than 50 percent of the time. 4.5.5 Gaussianity Fig. 4-4 gives the estimated percentage of sample EEG segments from each ensemble which can be modelled as Gaussian. EEG segments from halothane anesthesia are generally less Gaussian than the baseline activity, 85 particularly in channels C3-01 and C4-02, while EEG segments from nar-cotic anesthesia are marginally more Gaussian than the baseline a c t i v i t y . In a l l channels, EEG activity during halothane anesthesia is consistently less Gaussian than EEG ac t i v i t y during narcotic anesthesia. 4.5.6 Wide-Sense Stationarity and Gaussianity In Fig. 4-5, the percentage of sample EEG segments from each of the three ensembles which can be modelled as both Gaussian and wide-sense stationary i s presented. A b i l a t e r a l symmetry is immediately apparent in these results. In a l l channels, the percentage of EEG segments from halothane anesthesia which are wide-sense stationary and Gaussian i s markedly smaller than the corresponding percentage from narcotic anes-thesia. Also, from Fig. 4-5 i t is evident that less than 10 percent of the 64s EEG segments from any ensemble can be modelled as wide-sense stationary and Gaussian. 4.6 Significance of Results 4.6.1 Development of EEG Monitoring Systems The estimated degree to which ensembles of EEG activity may be modelled at- stationary and Gaussian, e.g. the results presented i n Fig. 4-3 and Fig. 4-5, should be an important consideration in the choice of an appropriate technique for analysing sample EEG segments from those ensembles. For example, the primary motivation for investigating the s t a t i s t i c a l characteristics of the three specific ensembles of EEG ac-t i v i t y described in this chapter was the expectation that the results would assist in the development of a computer-based system for monitoring the level of anesthesia during surgery by means of an automatic analysis of spontaneous EEG ac t i v i t y . In the development of such a system, de-cisions must be made with respect to the duration of the EEG segments to 86 be analysed, the rate at which the estimated level should be updated, the choice of an analytic technique, and the significance which may be attached to the results of the analysis.lt should be noted that the f e a s i b i l i t y of employing EEG monitoring systems to continuously assess a patient ' s status during sleep, serious i l l n e s s , coma, and possible cerebral death is also currently being investigated by others, e.g. [83,127,128], The sta-t i s t i c a l characteristics of the particular ensembles of EEG activity being analysed i n each instance should be an important consideration i n the development of the appropriate monitoring system. To i l l u s t r a t e how knowledge concerning the degree of station-arity of the three ensembles described in this chapter might influence the development of a system for monitoring and analysing EEG activity during anesthesia, the problem of selecting the most appropriate duration for sample EEG segments on the basis of the results in Fig. 4-3 w i l l be b r i e f l y considered. It would obviously be desirable to analyse-EEG seg-ments of long duration because the significance of any transient noise and artifact i s thereby reduced, because a high resolution in the e s t i -mation of power spectra i s possible, and because a potentially large data reduction can be realized i f such segments can be adequately character-ized. However, in the theoretical development of most analytic techniques the assumption i s made that the signal under consideration represents a sample function from a random process that is at least stationary to some extent over the interval of interest. Fig. 4-3 indicates that the assump-tion of wide-sense stationarity for the three ensembles under considera-tion i s only p a r t i a l l y j u s t i f i e d , even for EEG segments of relatively short duration. The a p r i o r i selection of the most suitable analytic technique therefore cannot be made on a firm theoretical basis. Under 87 such conditions, the results i n Fig. 4-3 indicate that the choice of 32s duration for sample EEG segments might, in this instance, represent a reasonable compromise. For a l l three ensembles at least one half of the EEG segments of this duration could be modelled as wide-sense stationary. An analytic technique which assumes wide-sense stationarity could then reasonably be applied to the 32^ segments and any inherent non-stationarity could be taken into account by some ancillary technique. For example, the previously described K-S D 2 s t a t i s t i c s could be included in the analysis as parameters indicating the degree of non-stationarity of the segment being analysed and hence could be used in interpreting the significance of the results. Alternatively, individual EEG segments could be tested for wide-sense stationarity as described previously and only those segments found to be stationary would be analysed. If non-station-ar i t i e s are to be considered for some particular EEG ensembles, and they cannot adequately be taken into account by such ancillary techniques, then a non-stationary analysis of the EEG could be attempted [129-131]. 4.6.2 Evaluation of Alternate Analytic Techniques This section w i l l consider some implications of the results in Fig. 4-5 with respect to the choice of the most appropriate technique for analysing EEG segments of a specified duration from any of the three en-sembles. For the reasons stated previously i n section 4.2, power spectrum analysis of the EEG segments would be preferable i f the segments could be modelled as both wide-sense stationary and Gaussian. However, Fig. 4-5 shows that only a certain proportion of sample EEG segments may be so modelled, e.g. for a l l ensembles less than 50 percent of the 8s segments from any channel could be considered wide-sense stationary and Gaussian. It cannot therefore be assumed that spectral analysis w i l l provide a 88 sufficient characterization of such sample EEG segments. When i t is known that a certain proportion of the EEG segments to be analysed cannot be modelled as the output of a stationary Gaussian random process, alternate analytic strategies might be considered. Of course, any analytic tech-nique could arb i t r a r i l y be applied to the data in the hope that the re-sults might somehow provide an ad hoc justification for i t s usage. How-ever, i f i t can be assumed that most of the segments under consideration are wide-sense stationary, or that any inherent non-stationarity has been taken into account by one of the techniques described previously, then certain analytic strategies might be more profitably investigated. For example, i f the EEG segments are stationary and only slightly non-Gaussian, ancillary parameters which indicate the degree of non-Gaussianity (e.g. skewness and kurtosis [97] or the previously described K-S s t a t i s t i c ) might be employed in addition to spectral analysis. Alternatively, i f the EEG segments to be analysed are stationary but very non-Gaussian, then the information provided by EEG spectral analysis could be supplemented by the use of other analytic techniques, e.g., bispectral analysis [117].' 4.6.3 Further Work The modelling investigation described in this chapter also i n -dicates some areas for further work that are beyond the scope of this thesis. It has been suggested that, on the basis of the Central Limit Theorem, increased Gaussianity in observed EEG activity may reflect an increased degree of independence among individual cortical neural gener-ators [115].If one accepts this premise, then Fig. 4-4 and Fig. 4-5 i n -dicate that the cortical generators are considerably more interdependent during halothane anesthesia than during narcotic anesthesia. The possible neurophysiological significance of this result could be investigated, 89 perhaps by studies of EEG coherence in individual subjects and by consi-dering more sample data from more channels. In addition, the technique described i n this chapter for estimating the degree of wide-sense station-arity and Gaussianity of an ensemble of EEG segments could obviously be applied to many other ensembles of EEG activity corresponding to other states of consciousness. 90 •• CHAPTER V PERFORMANCE IMPROVEMENT SCHEMES 5.1 Introduction The i n i t i a l results presented i n Chapter III demonstrated the fea-s i b i l i t y of using EEG pattern recognition systems to estimate the level of anesthesia. To a large extent, the modelling results presented i n Chapter IV vindicated the i n i t i a l EEG pattern recognition approach. In addition, Chapter IV contained a discussion of possible methods for improving the performance of the i n i t i a l l y developed systems by giving greater consider-ation to the actual s t a t i s t i c a l characteristics of the EEG data. In this chapter, other possible methods for improving performance w i l l be investi-gated; for i l l u s t r a t i v e purposes each of these methods w i l l be investigated with a view to improving the performance of three specific EEG spectral pattern recognition systems. It should be recalled that a l l such systems classified an unknown EEG pattern sample on the basis of a set of thirteen extracted spectral feature values. The Bayes c l a s s i f i e r that was employed in a l l systems was optimal only i f a l l features were s t a t i s t i c a l l y inde-pendent and i f the required class-conditional feature probabilities either were known exactly or were given by the corresponding Bayes estimates. Most of the performance improvement schemes considered in this chapter involve changes in the i n i t i a l feature extraction procedure and pattern classification algorithm. The three i n i t i a l l y developed EEG spectral pattern recognition sys-tems which were employed in the work described in this chapter had the same structure, i.e. a l l contained a linear feature quantizer with 64 possible levels and a c l a s s i f i e r which assumed equal a p r i o r i class probabilities. However, each was trained on the set of available EEG pattern samples from a different type of anesthesia. Fig. 5-1 depicts the "confusion" matrices which were calculated for these three systems. The i - j t h element in each confusion matrix contains the number of pattern samples from class 91 49 5 1 . 1 0 52 1 0 0 0 8 23 2 4 0 6 21 5 0 0 0 4 7 1 0 0 1 5 1 1 9 27 10 50 29 0 5 0 114 6 0 1 0 7 42 0 0 1 2 47 Halothane Anesthesia ~38 5 5 3 o" ~42 2 0 0 o" 6 15 19 7 0 4 24 5 2 0 5 10 51 19 1 1 9 62 8 1 0 11 58 82 1 5 10 15 117 1 0 1 1 1 2 0 0 2 1 1 Narcotic Anesthesia-~58 9 4 16 s'1 91 0 0 0 0 10 34 0 13 1 8 34 3 6 1 1 7 2 5 0 1 0 10 0 0 5 29 2 27 18 3 7 5 60 5 1 0 0 7 63 0 0 0 1 69 Enflurane Anesthesia Fig. 5-1 Confusion Matrices for Systems Which Extracted 13 Spectral Features. The matrices on the l e f t resulted from performance estimation by the II* technique and those on the right resulted from performance estimation by the U* technique. 92 i , 0 i i s 4, which the system identified as belonging to class j , 0 < j < 4. The actual numbers are given, rather than the corresponding probabilities, to indicate the unequal number of available pattern samples per class for the different types of anesthesia. The matrices on the l e f t in Fig. 5-1 resulted from performance estimation by the n* technique and those on the right resulted from performance estimation by the U* technique. Thus the performance estimates for the three systems, which were given pre-viously i n Tables 3-3 to 3-5, can be derived from the appropriate con-fusion matrices i n Fig. 5-1: Pe[II*] and Pe[U*] were 0.389 and 0.108 for the halothane anesthesia system, 0.449 and 0.211 for the narcotic anesthesia system, and 0.420 and 0.132 for the enflurane anesthesia system. From the definitions of the n * and U* -techniques (section 3.5), i t i s evident that the difference between P e [ I I * ] and Pe[U*] for a specific system provides an indication of the effect of intersubject EEG variation on system performance [39]. The relatively large magnitude of this effect i s apparent when the difference between P e [ n * ] and Pe[U*] is evaluated for each of the systems considered i n Chapter III. Similar results have been reported i n the literature for other types of EEG pattern recognition systems (e.g. [77,132]). Accordingly, intersubject EEG variation must be regarded as a major obstacle preventing the development of more reliable systems. Much of the work described i n this chapter was directed toward reducing the effect of intersubject EEG variation. In section 5.2 the possibility of improving performance by i n -creasing the number of extracted features is considered. The f e a s i b i l i t y of exploiting s t a t i s t i c a l interdependencies among features i s discussed in sec-tion 5.3. In section 5.4 a "nearest subject" scheme for reducing the effect of intersubject EEG variation on c l a s s i f i e r performance is explored. 93 5.2 Extraction of Additional Features 5.2.1 Rationale The EEG spectral pattern recognition systems that were i n i t i a l l y developed were based on the extraction of a total of 13 spectral features from two EEG channels. A l l of these features were heuristically derived, i.e. they either had an established c l i n i c a l relevance or they had pre-viously been described as meaningful i n the literature on EEG pattern rec-ognition. Each EEG pattern sample was evaluated in terms of these features and was subsequently classified on the basis of the extracted set of fea-ture values. Because of computational time and cost considerations i n the i n i t i a l phase of the research i t was necessary to limit the number of ex-tracted features, i.e. to limit the extent to which EEG pattern samples could be characterized. In spite of this limitation, the results of the i n i t i a l phase of the research (as described in Chapter III) clearly est-ablished the f e a s i b i l i t y of estimating the level of anesthesia by means of EEG pattern recognition systems. Consequently, after the f e a s i b i l i t y had been established i t seemed worthwhile to investigate the possi b i l i t y that the performance of the i n i t i a l l y developed EEG spectral pattern rec-ognition systems could be improved by the inclusion of additional features in the extracted feature set. To investigate this possibility, i t was decided that the selec-tion of an appropriate set of additional features would proceed in the following manner. F i r s t , a large set of additional, heuristically derived features would be defined. It was recognized that adding each of these features to the extracted feature set would not necessarily result in an improvement in performance. It was also recognized that there was a prac-t i c a l constraint on the large number of additional features that should be selected from the large set, because of the limited computational time 94 that would be available for extracting features from successive EEG pattern samples i n an on-line monitoring system. For the purposes of this investiga-tion, therefore, the maximum number of additional features to be selected was ar b i t r a r i l y set at 13, i.e. i t was decided that the total number of extracted features would be increased by a factor of two. However, i n general there i s no optimal procedure for selecting the best subset of features from a large set, except by the exhaustive evaluation of a l l possible subsets [110]. Since that would be computationally impractical here, i t was decided that various suboptimal feature selection c r i t e r i a would be used to choose a l -ternate sets of 13 additional features. EEG spectral pattern recognition systems which included these additional features in their extracted fea-ture sets would then be developed and their performance would be estimated. 5.2.2 Definition of Additional Features To define the relatively large number of additional, he u r i s t i -cally derived features from which various sets of 13 features would later be selected, the notation that was introduced in section 3.2.1 w i l l be extended: let x(t) and y(t) denote the sample EEG activity from two spec-i f i e d channels, let X(f) and Y(f) represent their Fourier transforms, as defined in (3.2), and l e t X*(f) and Y*(f) denote the complex conjugates of X(f) and Y.(f), respectively. From (3.1) i t follows that the EEG spec-tra, or more specifically the EEG avitospectra, corresponding to x(t) and y(t) are given by S x x ( f ) = E{X(f) X*(f)} (5.1) and Syy(f) = E{Y(f) Y*(f)} . (5.2) The 13 features which were i n i t i a l l y chosen for extraction from the EEG autospectra corresponding to two of the four available channels were des-cribed previously in section 3.2.3. 95 Many of the additional features which were chosen for extraction are derived from the EEG autospectra corresponding to a l l four available channels. Other features were defined i n terms of the EEG coherence spec- trum; i f S (f) = E{X(f) Y*(f)> , (5.3) xy i.e. S (f) denotes the cross-spectrum, then the coherence spectrum C (f) xy xy is defined as I s (f) Cxy< f ) = - E s J T f ) S Cf)]*-' ( 5' 4> xx yy where S (f) and S (f) are given by (5.1) and (5.2), respectively [21,133]. xx yy It should be pointed out that the quantity in (5.4) is the square root of the quantity defined as coherence in some references (e.g. [91,134]). From the definition in (5.4) i t i s evident that the coherence spectrum C (f) x y is a real-valued function of frequency for which C (f) = C (f) (5.5) xy yx and for which 0 S C (f) < 1. (5.6) xy It should also be noted from (5.4) that, i f x(t) and y(t) are linearly related, i.e. i f Y(f) = H(f) X(f) (5.7) for some H(f), then C (f) =1. Accordingly, the coherence spectrum can xy be regarded as a measure of the degree of linear relationship between the EEG activity from two specified channels as a function of frequency [134, 135]. This has motivated the investigation of various "coherence features", i.e. features derived from the coherence spectrum, as potentially signi-ficant descriptors of multichannel EEG activity (e.g. [78,81,91]). In this research, additional features were derived from " b i l a t -e r a l " coherence spectra and from "unilateral" coherence spectra. For 96 convenience i n defining these features, l e t channels F3-C3, C3-01, F4-C4 and C4-02 (in Fig. 2-3) be denoted as channels 1, 2, 3 and 4, respectively. Then b i l a t e r a l coherence features refer to features derived from a coher-ence spectrum corresponding to a symmetrically located pair of channels, i.e. channels 1 and 3 or channels 2 and 4. Unilateral coherence features refer to those features derived from tbe coherence spectrum corresponding to an anterior-posterior channel pair, i.e. channels 1 and 2 or channels 3 and 4. Coherence spectra were computed, smoothed and averaged in a man-ner analogous to the procedure outlined previously i n section 3.2.2 for autospectra. Appendix C contains a l i s t i n g of the program that was used to corrpute the autospectra and the coherence spectrum for sample EEG data from any two specified channels. The results of a l l spectral and coherence calculations that were performed on each EEG pattern sample consisted of four smoothed autospectra S..(f ) , for j = 1,2,3,4 j j m J » » » and four smoothed coherence spectra C. (f ) for j k v m' where j and k correspond to the appropriate channel numbers and where f m = -g— Hz, for m=l,...,256. (5.8) Table 5-1 describes a l l of the spectral and coherence features chosen for extraction from each EEG channel. In Table 5-1, channel j re-fers to the channel under consideration and channels k and £ refer, res-pectively, to the corresponding unilateral and b i l a t e r a l channels. Three autospectral features and two coherence features were chosen for extraction J = 1, k « j = 1, k j = 2, k J = 3, k Table 5-1 Spectral and Coherence Features Chosen for Extraction From Each EEG Channel Frequency Range Spectral and Coherence Features Description Symbol 0.00 - 4.00 Hz (A band) 4.01 - 8.00 Hz (e band) 8.01 - 13.00 Hz (a band) 13.01 - 15.00 Hz (a band) 15.01 - 32.00 Hz (3j band) 18.00 - 24.00 Hz (g 2 band) 0.00 - 32.00 Hz (Total) Relative spectral energy Peak spectral frequency Peak spectral intensity Mean coherence (unilateral) Mean coherence (bilateral) Relative spectral energy Peak spectral frequency Peak spectral intensity Mean coherence (unilateral) Mean coherence (bilateral) Relative spectral energy Peak spectral frequency Peak spectral intensity Mean coherence (unilateral) Mean coherence (bilateral) Relative spectral energy Peak spectral frequency Peak spectral intensity Mean coherence (unilateral) Mean coherence (bilateral) Relative spectral energy Peak spectral frequency Peak spectral intensity Mean coherence (unilateral) Mean coherence (bilateral) Relative spectral energy Total spectral energy Mean spectral frequency Second moment FAj JAjk 3AjJl f e j V U9jk b 9 j * aj f a j ^ j ajk bajA "aj Eoj u u oj ajk 5ajA :6j LBj Pjk 'ej* from each of the five traditional EEG frequency bands. The last three features l i s t e d in Table 5-1, i.e . the total spectral energy, the mean spectral frequency and the mean second moment, were defined previously i n equations (3.13), (3.15) and (3.16), respectively. A l l other autospectral features describing the relative energy, the peak frequency and the peak intensity in the traditional frequency bands were evaluated as indicated in (3.14) and (3.17) - (3.19) for the corresponding ot-band features. The coherence features described i n Table 5-1 were evaluated in a similar man-ner. In total, Table 5-1 describes 76 spectral features and 20 coher-ence features corresponding to four EEG channels. However, because 13 of these features constituted the i n i t i a l l y chosen spectral feature set, only 83 additional spectral and coherence features are described by Table 5-1. To f a c i l i t a t e the subsequent selection of various sets of 13 additional features, a l l available EEG pattern samples were evaluated in terms of the additional features in Table 5-1 and the resultant 83-element feature vectors were stored for later use. 5.2.3 Feature Selection The purpose of selecting additional features was to explore the poss i b i l i t y of improving the performance of the i n i t i a l l y developed EEG spectral pattern recognition systems by expanding their extracted feature sets. As stated in section 5.2.1, i t was decided to increase the size of the extracted feature set by a factor of two, i.e. to select 13 addi-tional features. Alternate sets of 13 additional features were therefore chosen from the 83 spectral and coherence features described in section 5.2.2 by means of various feature selection c r i t e r i a . EEG spectral pattern recognition systems which extracted the additional features thus selected 99 were then developed and their performance was estimated. The systems employed 64 feature quantization levels over a range of ±5.0 sd and as-sumed that the a p r i o r i class probabilities were equal. A summary of their estimated performance, based on the extraction of 13 spectral features, was given i n section 5.1. Several alternate feature selection c r i t e r i a were considered. In each instance, a set of the 13 "best" features was selected after a l l 83 available features had been ranked on the basis of some criterion such as the magnitude of their interclass/intraclass F ratios [136,137], their relative lack of correlation with other features, and their estimated er-ror probabilities when used separately [110]. The performance of each EEG spectral pattern recognition system which employed a set of additional fea-tures selected in this manner was estimated by the II* and U* techniques. Results indicated that only marginal improvements in system performance could be achieved with most of the feature selection c r i t e r i a that were i n i t i a l l y considered. However, the use of one particular criterion in conjunction with a stepwise feature selection algorithm did result in significant improve-ments in system performance. To describe the criterion and the algorithm, let {a^}, 1 1 i < n, denote the complete set of features chosen for extrac-tion from each EEG pattern sample (n = 13 i n i t i a l l y ) and l e t {ajK 1 - 3 - N» denote the set of additional features described in section 5.2.2 which have not yet been included in the extracted feature set (N = 83 i n i t i a l l y ) . Furthermore, l e t n+1 j indicate the misclassification error probability, as estimated by the II* technique, for an EEG spectral pattern recognition system in which a^ was selected to be the additional extracted feature a ... The feature selection n+i criterion can then be described as follows: at each step choose a , = a. n+1 j i f n+1 j < (P P[n*D, n+1 = \ (5.9) for k = 1 N and k / j . An algorithm was implemented to select 13 additional features, i n terms of the above criterion, i n a stepwise man-ner. Table 5-2 l i s t s the additional features which were selected in this way for each of the three different types of anesthesia under considera-tion. The symbols used in Table 5-2 correspond to those defined previously in Table 5-1. Table 5-2 Summary of Selected Spectral and Coherence Features Selected Type of Anesthesia Feature Number Halothane Narcotic Enflurane 14 e _ a3 n f62 15 E l . 16 f63 fA3 f e i 17 fA4 631 f A l 18 bA13 bei3 f31 19 f A l bA24 fA2 20 ^3 fa2 21 f e i b«24 • ^ l 22 b g l 3 fc2 b a l 3 23 fc2 h ba24 24 b a l 3 fc4 h 25 f33 f61 e e i 26 f02 ^3 b a l 3 EEG spectral pattern recognition systems which extracted the additional features l i s t e d in Table 5-2, as well as the 13 i n i t i a l l y chosen features, were developed and their performance was estimated. The results 101 are summarized in Figs. 5-2 to 5-4. In each figure the estimated probab-i l i t y of correct classification for a given system is plotted as a function of the number of features included i n the extracted feature set. It should be noted that, to f a c i l i t a t e the subjective interpretation of results, es-timated probabilities of correct classification are given i n Figs* 5-2 to 5-4, i . e . PC[U*] =1 - P e[U*], (5.10) Pc[n*] = 1 - Pe[n*] (5.11) and Pc[Mean] = (P^U*] - I> c [ I I*])/2 = 1 - Pe[Mean], (5.12) where P e [ I I * ] and Pe[U*] were described i n sections 3.5.3 - 3.5.4 and Pg[Mean] was defined i n (3.55). 5.2.4 Resulting Improvement in Performance The results presented in Figs. 5-2 to 5-4 indicate that signi-ficant improvements in performance have been achieved by the selection of additional, heuristically derived features for inclusion i n the extracted feature set. The improvement in performance is reflected by increased values of P^fU*], P c[n*], and hence Pc[Mean] for the systems under con-sideration. Improved performance i s also indicated by a decrease i n the value of « * A = |PC[U*] - Pc[n*]| (5.13) for systems which extracted the additional features, as shown in Figs. 5-2 to 5-4. From the definitions of the I I * and U* techniques (section 3.5), i t i s evident that the value of A, i. e . the magnitude of the difference be-tween the two estimates of performance, can be regarded as an estimate of the effect of intersubject EEG variation on system performance [39]. In considering the results presented in Fig. 5-2 for halothane anesthesia, i t i s evident that the values of P_[H*] and P [U*] changed c c 102 7.00,. o o 0.90 Lu CO Uj 0.50 HALOTHANE ANESTHESIA o o PC [u*] x x PC[MEAN~] o—-<>P c[rr*] A = 0.166 13 14 15 16 17 18 19 20 21 22 23 24 25 26 NUMBER OF FEATURES Fig. 5-2" Improvement in the Performance of an EEG Spectral Pattern Recognition System Developed for Halothane Anesthesia 103 •7.00.. o C: o CO Co o •Uj ct cc o o U, o CQ § Q; CL Q Uj to Uj NARCOTIC ANESTHESIA O — o PC[U*] * PC [MEAN] 0.50 13 14 15 16 17 18 19 20 21 22 23 24 25 25 NUMBER OF FEATURES F i g . 5-3 Improvement i n the Performance of an EEG Spectral Pattern Recognition System Developed f o r Narcotic Anesthesia 104 7.00-o 0.90 0.50 ENFLURANE ANESTHESIA x * Pc [MEAN] PC[TT*] = 0.128 13 14 15 16 17 18 19 20 21 22 23 24 2 5 26 NUMBER OF FEATURES F i g . 5-4. Improvement i n the Performance of an EEG Spectral Pattern Recognition System Developed f o r Enflurane Anesthesia from 0.611 and 0.892, respectively, for 13 extracted features to 0.700 and 0.866 for 26 extracted features. There was a corresponding increase in the value of Pc[Mean] from 0.751 to 0.783. It can also be seen in Fig. 5-2 that A decreased from 0.281 i n i t i a l l y to 0.166 f i n a l l y , a relative decrease of more than 40 percent in the value of A. For narcotic anesthesia, the results i n Fig. 5-3 show that the extraction of the 13 additional features l i s t e d in Table 5-2 resulted i n a change of P ctE*] and P C[U*] from 0.551 and 0.788 i n i t i a l l y to 0.613 and 0.724. This did not represent an improvement in the value of. Pc[Mean], which changed from 0.670 to 0.669. However, Fig. 5-3 shows that for nar-cotic anesthesia the value of A decreased from 0.237 for 13 extracted features to 0.111 for 26 features, a decrease of more than 53 percent. The results presented i n Fig. 5-4 for enflurane anesthesia i n -dicate the greatest improvement in performance. In Fig. 5-4 i t can be seen that the values of P c [ n * ] and £ c[U*] were 0.580 and 0.868 i n i t i a l l y , but increased to 0.751 and 0.878 with the inclusion of the 13 additional features in the extracted feature set. . The value of Pc[Mean] showed a significant increase, from 0.724 for 13 extracted features to 0.815 for 26 extracted features. There was also a marked decrease of more than 55 percent in the value of A, from 0.288 to 0.128. The confusion matrices for the systems which extracted 26 features are presented in Fig. 5-5. The improvement in the performance of these systems i s evident when the matrices in Fig. 5-5 are compared with those in Fig. 5-1. To summarize, the results indicate that the i n i t i a l l y developed EEG spectral pattern recognition systems were significantly improved by expanding the extracted feature set to include to appropriate set of additional features l i s t e d in Table 5-2. The manner in which these additional features were selected suggests some promising areas for further work. For example, a larger number and a wider variety of possible 106 53 0 0 3 0 6 27 0 4 0 0 6 2 4 0 5 18 3 72 27 0 0 0 8 42 42 2 5 2 0 6 15 20 6 o 2 4 62 17 1 1 5 56 90 0 0 2 3 0 0 49 1 0 1 2 6 23 0 2 1 2 2 2 2 0 2 2 1 111 9 0 0 0 3 47 Halothane Anesthesia 39 2 1 2 0 3 19 8 4 1 2 15 47 16 1 5 6 15 121 1 0 1 2 1 0 Narcotic Anesthesia-83 6 1 2 0 15 40 0 3 0 3 6 2 4 0 2 15 0 47 17 0 0 0 5 66 90 1 0 0 0 11 34. 3 3 1 1 0 9 1 0 2 4 2 65 7 0 0 1 0 69 Enflurane Anesthesia 5-5 Confusion Matrices for Systems Which Extracted 26 Spectral and Coherence Features. The matrices on the l e f t resulted from performance estimation by the n* technique and those on the right resulted from performance estimation by the U* technique. 107 additional features could be defined. Other feature selection c r i t e r i a , such as those suggested in [110], might also be explored. In fact, the efficacy of choosing the complete extracted feature set on the basis of some feature selection criterion could be investigated. Alternatively, the effect of including more than 13 additional features in the extracted feature set might be considered. It should be recalled, however, that the maximum number of features that could actually be extracted from successive EEG pattern samples in an on-line monitoring environment must ultimately be determined by the nature of the pattern recognition system implementa-tion. 5.3 Exploitation of S t a t i s t i c a l Interdependencies Among Features 5.3.1 Method of Investigation In the i n i t i a l development of EEG pattern cl a s s i f i e r s i t was assumed that a l l • of the features chosen for extract-ion were statistically-independent. This assumption allowed the decision rule in (3.38) to be simplified and thereby reduced the amount of storage, computation time and training data required to implement various cl a s s i f i e r s based on that decision rule. Such cla s s i f i e r s are optimal only i f the assumption of s t a t i s t i c a l l y independent features is valid. Otherwise the decision rule in (3.38) w i l l not be evaluated correctly because the estimates of P(d u|Cj), i.e. the estimates of the class-conditional feature probabil-i t i e s formed by these c l a s s i f i e r s , w i l l not be accurate. Therefore, i f the features are not i n fact s t a t i s t i c a l l y independent, the i n i t i a l l y developed c l a s s i f i e r s are suboptimal and classi f i e r s with improved per-formance could theoretically be developed by exploiting s t a t i s t i c a l interdependencies among features. To obtain some indication of the f e a s i b i l i t y of improving 108 performance in this manner, i t was decided to investigate the v a l i d i t y of the assumption of s t a t i s t i c a l l y independent features. Because no practi-cal method of directly determining the degree of s t a t i s t i c a l interdependence among the features was available, the following property was employed to obtain an indirect indication: i f two features (or two random variables) are s t a t i s t i c a l l y independent then they are uncorrelated, i.e. the lack of correlation is a necessary condition for s t a t i s t i c a l independence ([84], pp. 211-212). It should be noted that this i s a necessary but not sufficient condition: two random variables can be uncorrelated but not s t a t i s t i c a l l y independent (for an example, see [138], p. 135). How-ever, a non-zero correlation coefficient does indicate that the features in question are not s t a t i s t i c a l l y independent. To be more specific, l e t {a^} , 1 < i 1 N, represent the set of spectral features chosen for extraction; descriptions of the N=13 i n i t i a l l y chosen spectral features can be found in Table 3-1. The cor-relation coefficient for any two features and ov i s given by P i j "v/ EUc.-a.)*}. E{(o -ay*} (5>14) for 1 - i < N and 1 1 j 1 N. If the features are s t a t i s t i c a l l y inde-pendent then, by the definition of s t a t i s t i c a l independence, (5.14) becomes _ r / — \-i • i-.r/ - M E{(a.-a i)}« E{(a -a.)} p = — J — 1 ± j /EUa.-a.)'} • EUoj-5* )*} ( 5 , 1 5 ) - 0, i.e. the features are also uncorrelated. To estimate the magnitudes of any intercorrelations among the 13 i n i t i a l l y chosen spectral features, a sample correlation matrix 109 R = (r±i) for f i = 1,...,N (5.16) Ji = 1,...,N Ij = 1,...,N was calculated for each of the three available sets of spectral feature vectors (described i n section 3.2.3), which correspond to the three types of anesthesia under consideration. Let each spectral feature be re-garded as a random variable which assumes the value d ^ in the kth fea-ture vector, where 1 < k 1 S. To calculate (5.16), the sample means d ± = | E d k ± , for i = 1 , . . . ,N, (5.17) k=l were f i r s t obtained. The sample covariance matrix T = ( t ± j ) (5.18) was then formed by evaluating I S t ij -s=r ^ (dki-di><Vdj> <5-19> r± = I,...,N Lj = I,...,N . for After (5.18) had been formed, the sample correlation matrix in (5.16) was computed: " . , r.. f ° r f i = 1 N (5.20) V t i i fcjj Lj = 1.....N . Only half of the elements in each sample correlation matrix were computed because r ^ = r j ^ , i.e. R is symmetric. Finally, the average correlation coefficient magnitude for each feature was evaluated: 1 N a = Try E |r. | , for i = 1 N. (5.21) j#l 1 3 The quantity defined i n (5.21) indicates the average correlation of a specific feature with a l l other features in the set. Table 5-3 l i s t s the values of a^, for i=l,...,13, which were obtained for each of the three types of anesthesia under consideration. 110 Table 5-3 Average Correlation Coefficient Magnitudes Spectral Feature Number Type of Anesthesia Halothane Narcotic Enflurane 1 .26 .10 .34 2 .59 .46 .52 3 .12 .20 .15 4 .41 .27 .32 5 .49 .28 .40 6 .51 .44 .48 7 .48 .43 .46 8 .60 .48 .57 9 .59 .45 .55 10 •29 .27 .30 11 .35 .23 .35 12 .31 .22 .24 13 .28 .23 .31 5.3.2 Results and Discussion It i s evident from the results in Table 5-3 that many spectral. features are strongly correlated with other features in the set. Individual correlation coefficients for specific pairs of features can be seen in Fig. 5-6. The sample correlation matrices in Figs. 5-6(a) to 5s^c) were obtained by evaluating (5.20) with the available sets of feature vectors from halothane anesthesia, narcotic anesthesia and enflurane anesthesia, respectively. Strong correlations between several pairs of features are evident in Fig. 5-6. For example, at least eight pairs of features i n each sample correlation matrix have correlation coefficient magnitudes which are greater than 0.80. In view of such strong correlations, i t 0.32 -0.30 -0.38 0.70 -0.65 -0.91 0.22 -0.22 -0.10 0.24 0.20 0.58 0.70 0.64 0.76 1.00 0.97 0.92 1.00 0.86 1.00 1.00 0.34 0.5C 0.40 C.39 1.0C 0.03 0.66 -0.08 1.00 0.07 C.63 1.00 C.CO 1.00 Fig. 5 - 6a Spectral Feature Correlation Matrix for Halothane Anesthesia Data 00 0.16-0.07 -0.C0 -0.06 1.00 0.09-0.65 -0.46 1.00-0.26 -0.06 1.00 0.02 1.00 -0.19 -0.17 -0.20 -0.20 -0.62 -0.61 -0.87 -0.79 -0.24 -0.25 -0.25 -0.25 -0. 11 -0.08 0.28 0.15 0.46 0.42 0.50 0.50 1.00 0.97 0.91 0.94 1.00 0.88 0.90 1.00 0.98 1.00 0.04 0.04 0.0 7 -0.C3--0.49 -0.18 -0.46 -0. 17 -0.24 -0.37 -0.02 -C.34 0.8S 0.07 0.70 0.02 -0.16 0.37 -0.03 0.38 -0.19 0.25 -0. 13 0.29 -0.16 • 0.26 -0.12 0.28 0.14 0.28 0.15 0.29 0.02 0.32 0.06 0.32 1.0C -0.01 0.75 -0.07 1.00 -0.05 0.51 1.00 -0.06 1.C0 Fig. 5-6b Spectral Feature Correlation Matrix for Narcotic Anesthesia Data 112 0.18 0. 08 -0. 29 -0.32 -0.11 -0.13 -0.53 -0.57 -0. 15 -0.31 -0.11 -0.33 1.00 -0. 11 -0. 72 -0.52 -0.55 -0.55 -0.88 -0.82 -0.52 -0.30 -0.17 -0.28 1. 00 -0. 21 0.01 -0. 15 -0. 17 -0. 12 -0.1 1 -0.27 -0.28 -0.15 -0.15 1. 00 -0.00 -0.03 -0.0-1 0.16 0.31 0.89 0.16 0.66 CCI 1.00 0.69 0.67 0.67 0.69 -0.23 0.19 -0.06 0.15 1.00 0.99 0.86 0.90 -0.16 0.17 -0.02 CIS 1.00 0.85 0.89 -0.11 0.15 -0.00 0.11 1.00 0.98 0.26 0.19 0.30 C.12 1.00 0. 1U 0.51 0.22 C.16 • 1.0C 0.01 0.69 -0.10 1.00 o.oe C.53 1.00 -0.C1 1.C0 Fig. 5-6c Spectral Feature Correlation Matrix for Enflurane Anesthesia Data is apparent that the assumption of s t a t i s t i c a l l y independent features i s generally invalid. Therefore, the i n i t i a l l y developed cl a s s i f i e r s are suboptimal and the development of better classi f i e r s i s theoretically feasible. However, as indicated previously in section 3.7.2, the exploi-tation of a l l possible s t a t i s t i c a l interdependencies would increase the amound of required memory, computation time and training data by a fac-tor of L N F = J>N ,,13 =ftri3 (5.22) for a c l a s s i f i e r with N=13 features and L=64 possible feature quantiza-tion levels. Even with a substantial reduction in both the number of s t a t i s t i c a l interdependencies taken into consideration and the number of possible feature quantization levels, the complexity of the cla s s i f i e r s 113 would be greatly increased. There would be a corresponding increase i n the size of the EEG data base required to adequately train such c l a s s i f i e r s . However, the relatively small EEG data base that was acquired i n the course of this research was less than adequate for training c l a s s i f i e r s which assumed s t a t i s t i c a l l y independent features. ' Clearly, a much larger EEG data base should be acquired before any attempts are made to exploit even the strongest of the observed feature intercorrelatiohs. 5.4 "Nearest Subject" Scheme 5.4.1 Rationale As stated in section 5.1, the magnitude of the difference be-tween Pe[U*] and P E[II*] for a specific EEG pattern recognition system provides an indication of the effect of intersubject EEG variation on system performance. Based on this measure, i t is evident from the re-sults summarized in section 5.1 that, the i n i t i a l l y developed systems were significantly affected by intersubject EEG variation. Accordingly, considerable attention was directed toward the development of schemes for adapting the cl a s s i f i e r s in these systems to the particular EEG characteristics of the subject to be monitored. However, the small size of the available EEG data base greatly limited the types of adaptive schemes which could be studied experimentally. One int u i t i v e l y appealing adaptive scheme that was investigated was based on the following notion: a c l a s s i f i e r trained only on data from a subject with EEG characteristics which are very similar to those of the test subject should perform more reliably than a c l a s s i f i e r trained on a l l available data from the sub-ject population. This scheme is analogous to schemes which have been considered previously in the context of multifont print recognition and multiauthor character recognition problems (e.g., see [139]). Among the 114 subjects represented i n the set of a v a i l a b l e EEG t r a i n i n g data, the one with EEG c h a r a c t e r i s t i c s which are most s i m i l a r to those of the t e s t sub-j e c t w i l l be r e f e r r e d to as the "nearest subject". Assuming the a v a i l a b i l i t y of t r a i n i n g data from a s u f f i c i e n t l y large number of subjects, i t was a n t i -cipated that the performance of a c l a s s i f i e r trained only on data from the "nearest subject" could approach the U* estimate of c l a s s i f i e r performance. This was a n t i c i p a t e d because the U* technique (section 3.5.4) provides an estimate of the expected system performance when both t r a i n i n g and t e s t i n g data are from the same subject. The f e a s i b i l i t y of employing the "nearest subject" scheme f o r improving c l a s s i f i e r performance was studied i n two phases. The o b j e c t i v e of the f i r s t phase was to determine the f e a s i b i l i t y of t r a i n i n g a c l a s s i -f i e r on data from a subject other than the one on which the c l a s s i f i e r would be tested. Because t h i s was established as f e a s i b l e , the second phase of the study was undertaken. The objective jwas to determine whether the "nearest subject" could be i d e n t i f i e d oh the b a s i s of EEG pattern samples from c l a s s C Q alone. To gain some i n s i g h t i n t o why the second phase of the study was undertaken, i t should f i r s t be r e c a l l e d from the d e s c r i p t i o n of the data a c q u i s i t i o n procedure given i n s e c t i o n 2.3.3 that EEG pattern samples from cl a s s C Q could be obtained from a p a r t i c u l a r t e s t subject before the induction of anesthesia. I f the "nearest subject" could be i d e n t i f i e d on the basis of these pre-anesthesia EEG pattern samples, then the c l a s s i f i e r could be trained with the appro-p r i a t e subset of pattern samples at that time. Accordingly, the "nearest subject" scheme would have been shown to be a p r a c t i c a b l e means of im-proving c l a s s i f i e r performance. 5.4.2 F e a s i b i l i t y The f o llowing t r a i n i n g / t e s t i n g paradigm was used i n the i n i t i a l 115 phase of the f e a s i b i l i t y study: an EEG c l a s s i f i e r was f i r s t trained on the subset of available data from subject j , 1 < j < J , and was then tested on the subset of available data from subject i f 1 1 i £ J. Using this paradigm a J x J matrix was calculated for each of the three types of anesthesia; each element contained the percentage of EEG pattern samples from subject i which had been correctly classified by a c l a s s i f i e r trained only on data from subject j . Some d i f f i c u l t i e s i n the computation of these matrices arose because the subsets of available EEG pattern samples from individual subjects were frequently too small and because a l l of the classes which were represented in the test data were not necessarily rep-resented in the training data. The latter problem was resolved as des-cribed in section 3.5.4. The results of the f i r s t phase of the f e a s i b i l i t y study were encouraging. For most test subjects, one or more appropriate training subjects, were identified; when the c l a s s i f i e r had been trained on the available data from any one of these subjects, i t s performance on data from the test subject was superior to the II* estimate (section 3.5.3) of the expected c l a s s i f i e r performance on data from a subject population. Consequently, the second phase of the f e a s i b i l i t y study was undertaken to ascertain whether certain techniques could be employed to identify the most appropriate training subject, i.e. to identify the "nearest subject" to the test subject, on the basis of the available C Q pattern samples. Consideration was given to the possibility of matching sub-jects by evaluating the relative dominance of alpha-band activity [82] or by using the mean C q spectra as templates in a clustering algorithm (e.g. [132]). Euclidean distances, likelihoods and correlations (e.g. [24]) between C q spectral feature vectors were also considered. However the i n i t i a l results were inconclusive: the "nearest subjects" which were identified by these techniques did not consistently match the best 116 training subjects which had been identified i n the f i r s t phase of the study. Thus the objective of the second phase might be infeasible, i.e. i t might not be possible to identify the "nearest subject" on the basis of pre-anesthesia data from C Q only. Alternatively, the i n i t i a l attempts to do so may have been hampered by the inadequacies of the available EEG data base. It has already been noted that many of the subsets of pattern samples corresponding to individual subjects were very small and/or did not contain samples from a l l possible classes. In addition, some subsets did not contain any artifact-free, pre-anesthesia EEG pattern samples. Finally, the relatively small number of subjects represented i n the av a i l -able data base may have prevented the accurate identification of the "nearest subject". 5.4.3 Discussion The results of the i n i t i a l phase of the f e a s i b i l i t y study i n d i -cated that i t was possible to train a c l a s s i f i e r on data from one subject so that i t would perform reliably on test data from another subject. . How-ever the results of the second phase of the study were equivocal: the practicability of using a small number of EEG pattern samples from class C Q to identify the most appropriate training subject, i . e . the "nearest subject", was not established. The resolution of this issue by the tech-niques mentioned in section 5.4.2 would be greatly f a c i l i t a t e d i f the available EEG data base could be expanded to include a larger number of subjects. The subset of data corresponding to each subject should also be expanded to include a larger number of artifact-free, pre-anesthesia EEG pattern samples, as well as an adequate number of pattern samples from a l l possible classes or levels of anesthesia. It should perhaps be recalled that the "nearest subject" scheme 117 for improving performance was investigated because i t was thought that such a scheme could be readily employed i n some practical monitoring s i t -uations. Pre-anesthesia samples of baseline EEG activity could be ob-tained from a particular test subject and used to identify the "nearest subject" represented in the available data base. An EEG pattern recog-nition system could then be trained with the available subset of pattern samples corresponding to this subject. In some anesthesia monitoring situations the identification of the "nearest subject" might not be nec-essary, i.e. i t might be possible to train the system with EEG pattern samples from the same subject. For example:, sample EEG data which had been collected from a subject during one operation might be used to train an EEG pattern recognition system ior monitoring the same subject during subsequent operations. Another example involves the development of a reliable system for estimating the level of anesthesia during open-heart surgery. In this situation, sample EEG data could be collected during the i n i t i a l phase of the operation and could be used to train an EEG pattern recognition system; the trained system could then be employed during the c r i t i c a l cardiopulmonary bypass phase of the operation, when most c l i n i c a l non-EEG signs of anesthetic depth are unavailable. 118 CHAPTER VI CONCLUSIONS AND SUGGESTIONS FOR FUTURE RESEARCH 6.1 Conclusions 6.1.1 Summary The work described i n this thesis constitutes the f i r s t compre-hensive investigation into the question of whether or not the level of anesthesia can be reliably estimated during surgery by means of an auto-matic EEG pattern recognition system. A valid methodology for conducting the research was f i r s t established and a d i g i t a l EEG data base was prepared. Automatic pattern recognition techniques, in conjunction with heuristic techniques of c l i n i c a l EEG analysis, were employed in the development of spectral and time domain EEG pattern recognition systems for three d i f -ferent types of general anesthesia. An evaluation of the performance of the i n i t i a l l y developed systems clearly demonstrated the val i d i t y of the EEG pattern recognition approach, but also indicated that such systems are not sufficiently reliable for immediate and general c l i n i c a l applica-tion. Accordingly, theoretical techniques were developed to model some relevant s t a t i s t i c a l properties of spontaneous EEG activity, with a view to improving the performance of the i n i t i a l l y developed systems. Several factors which could adversely affect the reliable performance of EEG pat-tern recognition systems in general, and the i n i t i a l l y developed systems in particular, were identified and discussed. Various schemes for improving the performance of the i n i t i a l l y developed systems were suggested and an evaluation of the practicability of each was presented. 6.1.2 Major Original Contributions The following items constitute the major original contributions of this work: 1) the establishment of a valid methodology for conducting research 119 into the question of whether or not the level of anesthesia can be estimated by EEG pattern recognition; 2) the f i r s t comprehensive application of automatic pattern recognition techniques to this problem area;^y 3) the formulation of nonparametric techniques for effectively e s t i -mating the performance of EEG pattern recognition systems on future EEG data; 4) the demonstration that, with specified experimental controls, i t is feasible to estimate the level of anesthesia by means of auto-matic EEG pattern recognition; 5) the development of theoretical techniques for modelling the degree of wide-sense stationarity and Gaussianity of spontaneous EEG activity; 6) the establishment of the f i r s t model of the degree of wide-sense stationarity and Gaussianity of spontaneous EEG activity; and 7) the suggestion and evaluation of a number of promising schemes for improving the performance of the i n i t i a l l y developed EEG pattern recognition systems. These points are discussed in more detail in the following sections. 6.1.3 Establishment of a Valid Research Methodology It was largely because of methodological problems that the results of many previous attempts to estimate anesthesia levels by means of visual EEG assessment were confusing and contradictory. Therefore, a considerable effort was made throughout the present research to establish a valid methodology, by identifying and controlling as many extraneous variables as possible and by ensuring that the work would be relevant to current anesthetic practice. The methodology that was established was crucial to . 120 the success of the research reported here and should also f a c i l i t a t e future research i n the same area. 6.1.4 Introduction of Automatic Pattern Recognition Techniques The present work does not constitute the f i r s t attempt to employ automatic techniques i n the analysis of EEG a c t i v i t y during s u r g i c a l anes-th e s i a . •. However, previous work i n t h i s area has p r i m a r i l y been l i m i t e d to considering various schemes for EEG data compression and parameter i d e n t i f i c a t i o n (e.g., see [ 2 7 - 3 2 ] ) . The work reported here i s apparently the f i r s t attempt to develop an automatic EEG pattern recogni-t i o n system capable of r e l i a b l y estimating c l i n i c a l l y relevant anesthesia l e v e l s . As such, i t constitutes the f i r s t comprehensive a p p l i c a t i o n of automatic pattern recognition techniques, i n c l u d i n g preprocessing, feature ext r a c t i o n , feature s e l e c t i o n , pattern c l a s s i f i c a t i o n and performance e v a l -uation techniques, to t h i s problem area. 6.1.5 Formulation of Performance Estimation Techniques The two nonparametric performance estimation techniques formulated i n t h i s work ;.re p a r t i c u l a r l y s u i t a b l e f o r estimating the performance of EEG pattern recognition systems. In most p o t e n t i a l a p p l i c a t i o n s , such as the one under consideration, the set of a v a i l a b l e EEG pattern samples i s r e l a t i v e l y small. By making e f f i c i e n t use of -he pattern samples which are a v a i l a b l e , the two techniques estimate the performance of a given system on future EEG data from only one subject, as w e l l as i t s performance on future EEG data from a subject population. More"generally, because the two performance estimation techniques are nonparametric, they can be ap-p l i e d to a wide v a r i e t y of EEG pattern recognition systems to produce meaningful and comparable performance estimates. This i s a p o t e n t i a l l y s i g n i f i c a n t advance because, as noted elsewhere [ 22 ,39 ] , . meaningful 121 performance evaluations are conspicuously absent from much of the current literature on automatic EEG pattern recognition. 6.1.6 Demonstration of Feasibility The demonstration that i t i s feasible to estimate the level of anesthesia by means of automatic EEG pattern recognition i s the most impor-tant single contribution of this work. It should be emphasized that fea-s i b i l i t y i n this instance does not imply immediate practicability, i.e. the i n i t i a l l y developed EEG pattern recognition systems are not sufficiently reliable for immediate and general c l i n i c a l application. It should also be noted that the demonstration of f e a s i b i l i t y was accomplished by the im-plementation of a wide range of experimental controls; the effect of modi-fying or relaxing these controls was not investigated. 6.1.7 Development of Theoretical Modelling Techniques Theoretical techniques have been developed for modelling the degree of wide-sense stationarity and Gaussianity of spontaneous EEG activity. This i s significant because almost a l l methods of quantitative EEG analysis are based on certain implicit assumptions regarding the s t a t i s t i c a l char-acteristics of the underlying random process, particularly with respect to the extent of stationarity and Gaussianity of the process. Therefore the efficacy of alternate methods of analysis depends upon the degree to which such assumptions are j u s t i f i e d by the characteristics of the particular ensembles of EEG segments being analysed. 6.1.8 Establishment of a S t a t i s t i c a l Model of EEG Activity Relatively few investigations of the s t a t i s t i c a l properties of specific EEG ensembles have been reported in the literature. In this work, a model of the degree of wide-sense stationarity and Gaussianity of spon-taneous EEG activity i s established. The model resolves most of the major 122 inconsistencies in the literature with regard to the estimated degree of Gaussianity of spontaneous EEG activity. More significantly, the model provides the f i r s t comprehensive estimates of the extent to which ensembles of spontaneous EEG segments exhibit the properties of wide-sense stationarity and Gaussianity. 6.1.9 Evaluation of Performance Improvement Schemes An evaluation of several promising schemes for improving the per-formance of the i n i t i a l l y developed EEG pattern recognition systems i s pre-sented. For example, i t i s shown that the performance of the i n i t i a l l y developed spectral pattern recognition systems can be significantly im-proved by doubling the number of extracted features. Some improvements in the i n i t i a l pattern cla s s i f i c a t i o n algorithm are also suggested, but only preliminary f e a s i b i l i t y evaluations are possible because of the r e l -atively small size of the available EEG data base. Finally, i t appears that some schemes which were suggested for improving performance by reducing the effect of intersubject EEG variation could be of immediate practical significance. 6.2 Suggestions for Future Research 6.2.1 Performance Improvement Schemes Many of the suggested schemes for improving the performance of the i n i t i a l l y developed EEG pattern recognition systems should be explored further. A few of these schemes can be readily investigated but the ex-ploration of others, particularly some of the most promising performance improvement schemes considered i n Chapter V, cannot be undertaken at present because of the inadequacy of the available EEG data base. The inadequacy of the available EEG data base also prevented the consideration of some appealing schemes for adapting the pattern clas-s i f i e r s to the particular EEG characteristics of individual test subjects. 123 Thus, a future expansion of the EEG data base is necessary i f the efficacy of some promising performance improvement schemes i s to be investigated. In any future expansion of the data base for this purpose, an effort should be made to collect as many EEG pattern samples as possible, corresponding to a l l levels of anesthesia, from each addi-tional subject. Also, to f a c i l i t a t e future investigations into the feasi-b i l i t y of c l a s s i f i e r adaptation and "nearest subject" identification (see Chapter V), the subset of data corresponding to each subject should con-tain a large number of artifact-free, pre-anesthesia EEG pattern samples. Before the acquisition of more sample EEG data, an inter-rater r e l i a b i l i t y study might be conducted to estimate the rate of error i n c l i n i c a l assessments of the level cf anesthesia on the basis of the c r i -teria employed in this work. If warranted, anesthesiologists might then be asked to suggest refinements i n the c r i t e r i a and improvements in the c l i n i c a l assessment procedure. 6.2.2 Experimental Controls The effect of modifying or relaxing the experimental controls which were implemented in the work reported here should be explored. Hopefully, such research would identify the major c l i n i c a l sources of v a r i a b i l i t y which could adversely affect the reliable performance of the EEG pattern recognition systems developed in this work. This would provide a' clear indication of the variables that must be adequately controlled i f such systems are to be employed in a c l i n i c a l environment. In addition, rer-search in this area might eventually result i n the development of adap-tive systems which could take such variables into consideration, thereby improving their r e l i a b i l i t y and extending their range of applicability. 6.2.3 Time Domain EEG Pattern Recognition Systems The f e a s i b i l i t y of developing more reliable time domain EEG 124 pattern recognition systems should be studied. On the basis df the i n i t i a l results reported in this work, the best time domain systems developed for halothane anesthesia and narcotic anesthesia were slightly less reliable than the corresponding spectral systems, but for enflurane anesthesia the best time domain system was more reliable than the best spectral system. From a practical viewpoint, implementation of the time domain systems considered here would be simpler and less expensive than implementation of the corresponding spectral systems. This is primarily because many of the time domain features could be more easily extracted, e.g. an implemen-tation of the FFT algorithm would not be necessary. Thus, both experimental results and practical considerations provide motivation for attempting to increase the r e l i a b i l i t y of the i n i t i a l l y developed time domain systems to a c l i n i c a l l y acceptable level. In this regard, most of the performance improvement schemes which were suggested i n this work and applied to spec-t r a l systems could also be applied to time domain systems. 6.2.4 The R e l i a b i l i t y of Visual EEG Assessment In attempting to view the performance of automatic EEG pattern recognition systems in perspective, i t would be desirable to be able to compare their r e l i a b i l i t y to the expected r e l i a b i l i t y of experienced c l i n i c a l EEG raters performing the same task. Unfortunately, almost no data is available concerning the expected r e l i a b i l i t y of visual EEG assessment. The few papers which have been published i n this area i n d i -cate that the r e l i a b i l i t y of visual EEG assessment, even among experienced c l i n i c a l EEG raters, may be surprisingly low (e.g. see [18]). Accordingly, a future interdisciplinary study, perhaps employing the EEG data base prepared in this work, seems to be warranted i n order to obtain a quan-tit a t i v e estimate of the expected inter-rater r e l i a b i l i t y of visual EEG 125 assessment. 6.2.5 Modelling The estimated s t a t i s t i c a l c h a r a c t e r i s t i c s of spontaneous EEG ac-t i v i t y should be exploited i n a future attempt to develop more r e l i a b l e EEG pattern r e c o g n i t i o n systems f o r monitoring the l e v e l of anesthesia. The model of spontaneous EEG a c t i v i t y established i n t h i s work should be of considerable value i n a future reconsideration of the often a r b i t r a r y decisions which were made i n the i n i t i a l development of the EEG pattern r e c o g n i t i o n systems, e.g. decisions regarding the choice of a n a l y t i c tech-niques, the duration of EEG segments to be analysed and the rate at which the estimated l e v e l of anesthesia should be updated. The modelling techniques developed i n t h i s work could also be applied to many other ensembles of EEG a c t i v i t y corresponding to other states of consciousness. For example, i t was noted previously that the f e a s i b i l i t y of employing EEG pattern recognition systems to monitor the status of subjects during sleep, i n t e n s i v e care, coma and po s s i b l e cere-b r a l death i s cur r e n t l y being i n v e s t i g a t e d by others. In each instance, the s t a t i s t i c a l c h a r a c t e r i s t i c s of the p a r t i c u l a r ensembles of EEG a c t i v i t y being analysed should be an important consideration i n the development of the most appropriate monitoring system. 6.2.6 I d e n t i f i c a t i o n of A r t i f a c t Another area deserving further exploration, but beyond the scope of the present investigation,.concerns the i d e n t i f i c a t i o n of EEG a r t i f a c t . I t should be r e c a l l e d that a r t i f a c t was defined as that component of the EEG which does not o r i g i n a t e i n the b r a i n . Most of the v i s u a l l y recog-n i z a b l e a r t i f a c t encountered i n the work reported here may be a t t r i b u t e d to interference from e l e c t r o s u r g i c a l units i n the operating rooms, poor 126 electrode contacts, eyeblinks, electrocardiographic activity, movement and muscle act i v i t y . In this work, digitized EEG segments were visually screened to eliminate those segments which contained excessive a r t i f a c t . However, an EEG pattern recognition system suitable for monitoring the level of anesthesia should be capable of automatically identifying EEG pattern samples which contain excessive a r t i f a c t . -therefore, the development of algorithms for the automatic identification of EEG artifact should be undertaken. APPENDIX A LEVEL OF ANESTHESIA EVALUATION FORM Page of Date: . . " „ .... Age: Weight: Sex: . Patient: &  Surgical Procedure: Anesthetist: Premedication: , Anesthetic Agents: _ Analog Tape Number: Footage: Start End _ EEG Machine Gain: LP F i l t e r Frequency: Coding Pulse Level of Anesthesia P C 0 2 (mm He) Time Comments 1. 2 . 3. 4. •5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 2 0 . 128 APPENDIX B DESCRIPTION OF EEG DATA B A S E Information concerning the sample EEG data base for each of the three types of anesthesia i s given i n Table B-l. A l l of the d i g i -t a l tapes l i s t e d in Table B-l are 9-track, IBM-compatible tapes with a density of 1600 BPI and a block size of 4096 bytes. The tapes are unlabelled. Documentation which describes how to mount and use such tapes under the Michigan Terminal System (MTS) can be obtained from the U.B.C. Computing Centre. Table B-l EEG Data Base Information Type of Anesthesia Halothane Narcotic Enflurane Number of available EEG pattern samples 280 341 317 Rack number of d i g i t a l tape containing EEG pattern samples RA0562 RA0558 RA0561 Rack number of duplicate tape RC0490 RA0559 RB0120 Name of disk f i l e containing labels for EEG pattern samples HS.I AS.I ES.I Each EEG pattern sample, i.e. the d i g i t a l representation of each four-channel EEG segment of 64s duration, i s stored i n a separate f i l e on the appropriate tape. Each f i l e on the tape therefore contains a total of 32768 sample values, the result of sampling four EEG channels (F3-C3, C3-01, F4-C4 and C4-02) at 128 Hz/channel for 64s. For programming ease, each sample value i s stored in two b\tes although the maximum res-olution i s limited to 10 b i t s . Each successive set of 8 bytes in a f i l e therefore contains one sample value from each channel: F3-C3, C3-01, F4-C4 and C4-02, i n that order. The 32768 samples in each f i l e on the tape are grouped into 16 blocks, with 2048 samples (4096 bytes) per block. The disk f i l e s . l i s t e d in Table B-l contain the following i n -formation about each EEG pattern sample: the sample identification number, the level of anesthesia and the subject identification number. This information i s stored i n integer form, with one disk f i l e line per EEG sample, in the following FORTRAN format: (15, 5X, 215). The "sample identification number" represents the number of the f i l e on the appro-priate tape which contains the sample EEG. The "level of anesthesia" represents the c l i n i c a l l y estimated anesthesia level associated with the sample EEG. The "subject identification number" refers to the i n d i v i -dual patient from which the sample EEG was obtained. The following FORTRAN subroutine can be used to (i) read a sample identification number, ( i i ) locate the appropriate tape f i l e , ( i i i ) read the 16 blocks of sample data from the f i l e , (iv) sort the 130 data by channels, and (v) store the sorted data In an array: SUBROUTINE INPUT(NFLAG) C C NFLAG=0 INITIALLY;NFLAG=1 AT TAPE END C INDEXF CONTAINS CURRENT-FILE NO C LUNIT INDICATES TAPE LOGICAL UNIT NO C REAL DATIN(4,8192) COMMON /DATIN/ DATIN INTEGER*2 BLOCK(2048), LENl INTEGER INDEXF /0/ LUNIT=1 NSKIP=0 C C READ THE FILE NO READ(5,20,END=10)NFILE 20 FORMAT(15) WRITE(6,12)NFILE 12 FORMATC ****', 15) C C PREPARE TO SKIP TO THE APPROPRIATE FILE ITEMP=NFILE-INDEXF-1 CALL SKIP(ITEMP.NSKIP,LUNIT) INDEXF=NFILE-1 C C READ FILE DATA AND STORE IN ARRAY DO 14 IBLK=1,16 INDX=(IBLK-1)*512 CALL READ(BLOCK,LEN1,0,LINE1,LUNIT,&10) DO 14 ICH=1,4 DO 14 ISAM=1,2048,4 IR=INDX+1+(ISAM-1)/4 IRR=(ICH-1)+ISAM 14 DATIN(ICH,IR)=BLOCK(IRR) C RETURN 10 NFLAG=1 RETURN END 131 APPENDIX C COMPUTATION OF EEG SPECTRA OOOI 0002 0003 ooou 0005 0006 0007 0 0 0 b 0009 0010 001 1 0012 0013 00 I d 0 0 1 5 0016 0017 0018 0 0 1 9 0020 0021 0022 002 3 0001 0002 0003 0004 0 0 0 5 0006 0 0 0 7 000b 0009 0010 0011 0012 0013 0014 POWER SPECTRUM FCR CHANNEL "A" FCW ER SEHCTPUM ICR C F ANN EL " E " COHERENCE SPECTRUM C C APPEkClA C COMPUTATION OF EEG 5FECTBA THIS PROGRAM COMPUTES THE POWER SPECTRA AND COHERENCE SFECTHUH FCB TWO SEIECTEC -CHANNELS . CF EEG CAT.A* INPUT: . . ' • LUNIT 1: INPUT E ATA TAPE (SEE AEPINLIX E) •LUNIT 5: F I L E CONTAINING DATA LABELS OUTPUT: •LUNIT 8 •LUNIT 9 •LUNIT 10 LAST UPDATE:., J A N U A RY6 1975 INTEGER NCHANA/1/,NCHANE/2/ COMPLEX TiiAN (2049) ,TH 12049) REAL DATA (4096) , LATE (4096) COMMON / TR AN / TRAN.TR EQUIVALENCE (T R A N , E AT A) EQUIVALENCE. (TR.uATB)' REAL LATIN(4,8192) COMMON / DAT IN / DATIN,INDEXF,NFILE NFLAG=0 I!ICEXF=0 • NSAHP = 8'192 N = 4096 SRATE=64. , GET ALL FOUR EEG CHANS FROM A 64 SEC SA AND FUT I N DATIN CALL I N FUT ( NFI AG) IF (NFLAG. EQ. 1) GO TO 4 COPY TWO CHANS AT 64 SA/SEC (NOT THE CHIG 128 / S E C ) DO 1 J=1,NSAMP,2 DATA ( (J-1)'/2»1)=DATIN (HCHAiJA .J) DAIS ( (d-1)/2*1) = LATIN (NCHANE .J) CONTINUE CALCULATE POWER SPECTRA AND COHERENCE (AND OUTPUT SAME) CALL COHEF (N.SRATE, NFILE) GO TO 3 . . STOP ' " END SUBROUTINE INPUT ( N F L A G ) REAL CATIN(4,8192) COMMON. /DATIN/ DATIN.INDEXF,N F I L E INTEGER*2 BLOCK(2048) , L I N I . LUNIT=1 • NSKIP=0 READ THE F I L E NO READ (5, 20,EN'D=10) NFILE FORKAT(IS) :,• WRITE (6, 12) NFILE FORBAT(• »••*•,15) PREEARE TC SKIP TC THE AFFROPRIAT E I I L I IT EMP=NFILE—INDEXF—1 CALL SKIP (ITE(!P, KSKIE.LUNIT) I N E £ X F = N F I L E - 1 20 12 DO 14 IBLK=1,16 1 .000 2 . 0 0 0 3 . 0 0 0 4 . 0 0 0 5 . 0 0 0 6 . 0 0 0 7 . 0 0 0 8 . 0 0 0 9 . 0 0 0 1 0 . 0 0 0 1 1 . 0 0 0 1 2 . 0 0 0 1 3 . 0 0 0 1 4 . 0 0 0 1 5 . 0 0 0 1 6 . 0 0 0 1 7 . 0 0 0 1 8 . C O O 1 9 . 0 0 0 2 0 . 0 0 0 2 1 . 0 0 0 2 2 . C O O 2 3 . 0 0 0 2 4 . C O O 2 5 . 0 0 0 2 6 . C O O 2 7 . 0 0 0 2 8 . C O O 2 9 . 0 0 0 3 0 . 0 0 0 3 1 . 0 0 0 3 2 . 0 0 0 3 3 . 0 0 0 3 4 . 0 0 0 3 5 . 0 0 0 3 6 . C O O 3 7 . 0 0 0 3 8 . C O O 3 9 . 0 0 0 4 0 . 0 0 0 4 1 . 0 0 0 4 2 . 0 0 0 4 3 . 0 0 0 4 4 . 0 0 0 4 5 . 0 0 0 4 6 . 0 0 0 4 7 . 0 0 0 4 8 . 0 0 0 4 9 . 0 0 0 £ 0 . 0 0 0 5 1 . 0 0 0 5 2 . 0 0 0 5 3 . 0 0 0 5 4 . 0 0 0 5 5 . 0 0 0 5 6 . 0 0 0 5 7 . 0 0 0 5 8 . 0 0 0 5 9 . 0 0 0 6 0 . 0 0 0 6 1 . 0 0 0 6 2 . 0 0 0 6 3 . 0 0 0 6 4 . 0 0 0 6 5 . 0 0 0 6 6 . 0 0 0 6 7 . 0 0 0 6 8 . 0 0 0 0015 0016 0017 0018 0019 0020 0021 0022 0023 0021 0025 0001 0002 000 3 0004 0005 0006 0007 00 08 0009 0010 0011 0012 0013 001 a 0015 0016 0017 o o l e 0019 0020 0021 0022 0023 0021 0025 0026 0027 002e 0029 0030 0031 0032 0033 0034 0035: 0036 0037'.' 0038: 0039 ' 0040 004.1 0042 0003 0044 0045 0046 00« 7/r 0048: 0049 0050 0051 0052 0053 00S4 14 10 c c c c c c 99 c c 52 11 51 INDX= (IBLK-1) *512 C A l l READ (BLOCK, IEN1. 0,11 Mil , III NIT, B10) DO 14 IC1I = 1,« DO 14 ISAf!= 1, 2048.4 IB = INDX*1» (ISAK-1)/4 IBB = (ICH- 1) «ISAH DATIN (ICH,IR) = BLCCK (IBB) RETURN KFLAG=1 RET UR N END SUBROUTINE COHER(N,SB ATI,NIILI) COMPUTES THE SPECTRA AND COHERENCE IEEE TRANS AOCIO CEC '70. VIA BETHOD 05 CUHERMUTH ET At, COBPLEX TFAN (2049) ,TR (2019) REAL DATA (4096) , DATB (4096) COEBCN /T FAN/ TRAN.TB EQUIVALENCE (TRAtf , DATA ) EQUIVALENCE (TR, LATE) REAL SF (2S6) . SM4 (2 04 9) ,S(12 (4 096) , SMOOTH (409 6) ,SF2 (256) , SF3 (25 6) COBPLEX XSPEC(2049) ,SB3 (2049) ,SOr3 INTEGER NN (1) GET FOtlHIER TRANSFORM VIA FFT KN(1) = N ISIGN=-1 CAII FOUR2(CATA,i;N,1,ISlGN,0) CALL F0UB2(DATB.NN,1.ISIGN.0) HP FILTRING LI =32 L2 = 5 DO 3 J= 1 ,11 TB (J) = (0. ,0.) TBA8(J) = (0. ,0.) DO 4 J=1,L2 TB (11 »J) =TR (L1*J) • (ILCAT (J)/FLCAT (L2) ) TR AN (L1*J.) = TRAN (L1*J) * (FLOAT (J)/FL0AT (L2) ) 50 OBTAIN RAH SPECTRAL ESTIMATES (INCL CBCSS-SPECTBA) FACT0R= 1 . / (SRATE»F1CAT (N) ) BID=N/2*1 DO 99 1=1 .BID T=CABS (THAN (I)) IT-CABS (T B (I) ) XSPEC (I)= (CONJG (TH (I))»TRAH (I)) DATA (I) ~'i *T*FACTCR DATS(I)=TT*TT*FACTOR XSPEC (I) = XSPEC (I) *FACTCB CONTINUE SMOOTHED SPECTRAL ESTIMATES OBTAINED VIA SQUARE HINDCH THE FIRST AND LAST 8 ECINTS ABE NCI SBCOTEEI DO 52 1=1,8 SH2 (I) = EATB (I) SH3 (I) = XSPEC (I) SMCCTH (I) =DATA (I) DO 11 1=1,7 SB2 (HID-7*I) = EATE (Mir-7*I) SB3 (MID-7*I)=XSPEC (MID-7 + 1) SHCCTH(BIE-7*I)»EATA (BII-7-H) 00 SO 1=9,2042 SOB=0. SUB2 = 0. SDH3=» (0. ,0.) 00 51 J=1 ,15 SUB2=SnH2*DATB((I-1)+J-7) S0B3=SUB3*XSPEC( (I-1J+J-7) SUB=SUM+DATA ( (1-1) *J-7) SBCCI(I(I)=S0fl/15. SB2(I) =SUH2/15. SB3 (I)=SUB3/15. CONTINUE (2»*1) =15 COHERENCE CALCULATION DO 1012 1=1,32 1012 SH4 (I) =0. DO 1011 1=33,BID 69.000 70.000 71.000 72.000 73.000 74.000 75.000 76.000 77.0C0 78.000 79.000 . 60.000 81.COO 82.000 83.000 84.000 8S.0C0 86.000 87.000 . £8.CCO 89.000 90.000 91.000 92. COO 93. COO 94.000 95.000 96.000 97.000 98. COO 99. COO 1C0.0C0 101. COO 102. CCO 103.000 104.000 105.000 106.0C0 107.000 108.COO 109.000 110.COO 111.000 112.COO 113.000 114.COO 115.0C0 116.000 117.000 118.000 119.000 120.000 121.000 122.000 123.000 124.COO 125.000 126.000 127.000 128. COO 129.0C0 130.000 131.000 132.COO 133.000 134.000 135.000 136.000 137.000 138.000 ' 139.000 140.000 141.000 142.000 143.000 144.000 145.000 146.000 147.000 148.000 149.000 133 005b TTT=CAU5(S« 3(1)) 150.000 0056 I F (SflCOTH (I).EQ.O.)SMCCTH(I)=.OCC00 1 151 .COO 0 0 5 7 IF (SM 2 (I) .EQ.O.) SM 2 (I) = .000001 152.000 0058 1011 SM4 (I)=SQBT ( <TTT*TTT)/(SSCCTF. (I) *S»t2 (I)) ) 153.COO C 154.000 c BEAK ENERGIES ANC CCHER CF 8 POINT EANCS M 1 = 11 (12345678) 155.000 c TOTAL EN = POWEH* (1/61) MEAN PO W3S = EN/ (1/8) 156.000 c THUS HEAN PCWEB = ECWEB* (1/64)* 8 = ECWER/8 157.000 0059 DEN0H=8. 158.COO 006C DO 100 1=1,256 159.COO 0061 SUH2=0. 160.000 0062 SUE4=0. 1 6 1 . C C O 0063 sua=o. 162.000 0064 DO 101 J=1,8 163.000 0065 SUtl2=SUM2*3M2 ( (I— 1) *8 +J) 164.000 006b SUB4 = SUM«*SMU ( (I-1)»8+J) 165.000 0067 101 SUB = SUMtSKOOTII ( (I-1) *8 + J) 166.000 0066 SF (I) =SUM/CENCH ~ 167.COO 0069 S F 2 (I) =SUM2/DEN0M 168.000 0070 SF3 (I) =SU K4/DE NC* 169.000 0071 100 CONTINUE 170.000 c 171.0C0 c 172.000 0072 WRITE (8 ,58) NFILE 173.COO 0073 WRITE (10, 58) NFILE 174.000 0074 58 FORMAT(• FR EC•,• NEILE=',I5,' NCF.AN = A») 175.0C0 0 0 7 5 DO 60 1=1,255,8 176.000 0076 WRITE(8,63) (SF (I + J-1) . J=1 ,8) 177.000 0077 60 WRITE ( 10, 65) (SF3 (I+J-1) 7=1,8) 178.000 0076 65 FORMAT (8F9.6) 179.CCO 0079 63 FORMAT ( ' ,,8F9.2) 180.000 0080 WRITE (9 ,59) NFIIE l e i . c c o 0081 59 FORMAT( 1 FR EQ•,• NFILE=',I5,' NCH A N = B •) 182.000 0082 DO 61 1 = 1 ,25r- ,8 1 8 3 . C C O 0083 61 WRITE(9,63) (SF2(I*J-1) ,J=1,8) 184.000 C 185.COO C 186.000 0080 RETURN i e7 . c co 0085 EN C 188.000 134 APPENDIX D SPECTRAL FEATURE EXTRACTION PROGRAM C 1 .000 C A P P E N E I X ~ D S P E C T R A L " F E A T U R E EXTR A C T ICN~FROGRSM ~ 2 . C O O C 3 . C O O C THIS PROGRAM C A L C U L A T E S ONE UU-ELEM~NT A U T O S P E C T R A ! F E A T U K E VEC1C 14.C O O C CORRESPONDING TC EACH 64 SEC EEG F A T T I B N S A M P L E . 5 . 0 0 0 C I N P U T : 6 .C C O C * L U N I T 1 : S E E C T R A l t AT A FFCr" C t AN 1 ( F 3 : C 3 ) 7 . 0 0 0 C * L D N I T 2 : S P E C T R A L DATA FROM CHAN 2 ( C 3 : 0 1 ) 8 . C O O C * 1 U M T 3 : S F E C T 5 A L t AT A FFC." CFAN. 3 <FU:CU) 9 . 0 0 0 C * L U N I T 1 : S P E C T R A L DATA FROM CHAN <* ( C « : Q 2 ) 1 C . C 0 0 C » L U N I T 5 : INDEXING LATA FCR E A CI EEG S r G.I ENT (F/L E V / P T NT) 1 1 . 0 0 0 C O U T P U T : 1 2 . C O O C • L U N I T 1 1 : FEATURE VECTCRS 1 3 . 0 0 0 C » L D N I T 6 : ERROR MSGS 1 1 4 . 0 0 0 C 11 S P E C T R A L FEATURE ELEMENTS C A L C U L A T E : ICR EACH EEG CHANNEL 1 5 . C O O C L I M I T A T I O N S : 1 6 . C C O C * N C MCRE THAN 500 FATTEBN 5 P H F L I S 1 7 . 0 0 0 C ' O N L Y DATA FROM 64 SEC S P E C T R A L C A L C U L A T I O N S 1 8 . C O O C N O T E S : 1 9 . 0 0 0 C 1 . DATA WAS PREPARED I N FMT SF - . C I F I E D IN " A E F S N L I X C " 2 C . C 0 0 C 2 . CUTPUT F I L E (LUNIT 1 1 ) «UST EE S E Q U E N T I A L 2 1 . 0 0 0 C 3 . SPECTRUM I S ASSUMED TO i - X I S T FROM 0 - 3 2 H Z , WITH 2 2 . COO C 8 S A M P L E S / H Z 2 3 . 0 0 0 C L A S T U P D A T E : 2 M . C 0 0 C NCV 23 1974 2 5 . 0 0 0 C 2 6 . 0 0 0 c 2 7 . 0 0 0 0001 REAL DATA ( 2 5 6 ) , FEATUR (BO) 2 8 . 0 C 0 0002 COKMCN / C C M / E A T A . F E A T U F 2 9 . 0 0 0 C 3 0 . C O O 0003 DO 6 I N E X = 1 , 5 0 0 3 1 . 0 0 0 0004 OO 99 I V = 1 , 4 4 3 2 . 0 0 0 0005 99 F E A I U R ( I V ) = 0 . 3 3 . 0 0 0 0006 DO 1 L U N I T = 1 , 4 3 4 . 0 0 0 C 3 5 . 0 0 0 C T H E S U B S E T OF S P E C T H A L FEATURE ELEMENTS APE C A L C U L A T E D : 3 6 . C C O 0007 B E A D ( L U N 1 T . 5 , E N D = 3 ) 3 7 . 0 0 0 0 0 0 8 5 FORMAT () 3 e . 0 0 0 0009 DO 4 J = 1 , 2 5 5 , 8 3 9 . 0 0 0 0010 4 BEAD ( L U N I T , 2) (DATA I (J + K - 1 J ) ,K=1 ,8 ) 4 0 . 0 0 0 0011 2 r O B R A T ( 1 X , 8 F 9 . 2 ) 4 1 . 0 0 0 0 0 1 2 C A L L S P E C T F (LUNIT) 4 2 , C C O 0013 1 CONTINUE 4 3 . 0 0 0 C •: " "• 4 4 . C O O C OOTPOT THE C C M P L E T E E FEATURE VECTOR AN I INDEXING D A T A : ' , 4 5 . 0 0 0 0014 H E A D ( 5 , 1 1 ) F I L E , L E V , I P T N T 4 6 . C C O 0 0 1 5 I F I L E = F I L E » 0 . 1 4 7 . 0 0 0 0 0 1 6 11 FOBKAT ( 5 X . F 5 . 0 . 2 1 5 ) 4 8 . 0 0 0 0017 6 WHITE (11 ,12) (FEATUR ( JI ) ,JY=1 . 4 4 ) , I F I L E , L E V , I P T N T , INCX 4 9 . 0 0 0 0 0 1 8 12 FOBHAT ( 4 4 F 1 4 . 6 . 4 I 4 ) 5 0 . 0 0 0 C 5 1 . 0 0 0 0 0 1 9 WRITE (6 ,16) 5 2 . 0 0 0 0020 16 F O B M A T ( / / / ' » » * • E P B C R : T C C MANY PATTERN S A M P L E S * * ' / / / ) 5 3 . 0 0 0 0021 3 INDX=INDX-1 5 4 . 0 0 0 0022 W B I T E ( 6 , 1 5 ) INEX 5 5 . 0 0 0 0 0 2 3 15 F O R M A T ( 1 5 , ' FEATURE VECTORS HAVE BEEN C A L C U L A T E D ' / / ) 5 6 . 0 0 0 0024 STOP 5 7 . 0 0 0 0 0 2 5 END 5 8 . 0 0 0 0001 S U B R O U T I N E S P E C T F (LONIT) 5 9 . 0 0 0 0 0 0 2 S E A L DATA (256) , F E A T U E <««> ' 6 0 . C C O 0003 COflMON / C O M / D A T A , F E A T U R 6 1 . 0 0 0 0004 fl= ( I U N I T - 1 ) *11 6 2 . 0 0 0 C 6 3 . 0 0 0 C E N E R G I E S : 6 4 . 0 0 0 0 0 0 5 DO 1 1=2,256 6 5 . 0 0 0 0006 1 F E A T U R ( (B .1 ) ) = FEATUB ( (M + 1 ) ) + E A T A (I) 6 6 . 0 0 0 C D E L T A : — 6 7 . 0 0 0 C 0 . 1 2 5 - 4 . 0 0 HZ 6 8 . C O O 0007 DO 5 K=2, 32 69.000 000b 5 FEATUR ( (T+2) ) = FEAT0B ( (tl + 2) ) + EAT A (K) 70.000 C 71.000 C 4.00-8.00 HZ 72.000 0009 DO 6 K = 33,64 73.000 0010 6 FEATUR ( (N + 3) ) = FEATUR ( (« + 3) J + CATA (K) 74.COO C ALPHA: 75.000 C 8.00-13.00 HZ 76.000 0011 DO 7 K=65,104 77.000 0012 7 FEATUR ( (f+4) )=FEATUR ( (SI+4) ) + EATA (K) 78.000 C 79.000 C 13-15 HZ 80.000 0013 DO 8 K= 105. 120 81.000 0014 8 FEATUR ( (fl+5) ) = FEATUR ( (tl + 5) ) • CAT J (K) 82.COO C 83.000 c 15.00-31.«75 HZ eu.coo 0015 DO 9 K=121,256 85.000 0016 9 FEATUR ( (K + 6) ) = FEATUR ( (K+6) ) +EATA (K) 86.000 C 87.000 C 18.00-24.OOHZ 88.COO 0017 DO 50 K=145. 192 89.000 0016 50 FEATUR ( (K+7) )=FEATUB ( (H+7) ) +EATA (K) 9C.0C0 C 91.000 C 92.000 0019 DO 51 1=2.256 93.COO 0020 XX= (1-1) *0 . 125 94.COO 0021 FEATUR ( (M +B) ) = FEATUR ( (M + 8) ) + DATA (I) »XX 95.000 0022 51 FEATUR ( (H+9) )=FEATUR ( (r. +9 ) ) • CAT A (1) *XX*XX 96.000 C 97.000 c PEAK INTENSITY AND FPECUENCY IN ALPEA 98.COO 0023 DO 52 1 = 65, 104 99.000 0024 IF (FEATUR ( (K*10) ) .GE. CAT A (I) ) GC TC 52 ICC.000 0025 FEATUR ( (« + 10) ) =DATA (I) 101.000 0026 FEATUR ( (P + 11))=0.125* (1-1) 102.000 0027 52 CONTINUE 103.COO C 1C4.C00 c 105.000 0028 DO 10 K = 2,10 106.000 0029 10 FEATUR ( (H +K) ) = (FEATUR ( (11 + K) ) /FEATUR ( (R •1)))»100. 107.000 0030 FEATUR( <r+8)) = FEATUR( (f+8))/100. loe.cco 0031 FEATUR ( ((1+9) ) =SQRT( FEATUR ( (H+ 9) )/ ICO.) 109.000 0032 IF (FEATUR ( (r. + 1 ) ) . NE. 100. ) FEATUR ( (ti + 1) ) = FEATUR ( (H + 1) ) *0. 125 11C.000 0033 RETURN 111.000 0034 END 112.000 136 APPENDIX E TIME DOMAIN ANALYSIS AND FEATURE EXTRACTION PROGRAM c _ 1 .000 C APPENDIX -! TIfE DOMAIN AN AL XS IS~ A N T~ 11A TTh<E~E XT RACT IC N~ F KCGHAH 2 .000 C 3.COO C THIS PROGRAM CALCULATES ONE 10-ELEMINT TIME CON A IN FEATURE VECTOR tt.000 C FOR EACH 64 SEC EEG PATTERN SAMPLE. 5.COO C INPUT: fc.000 C »LUNIT 1: INPUT DATA TAPE (SEE APPENDIX B) 7.000 C *IUNIT 4 : FILE CONTAINING t AT A LAEELS 8.000 C *LUNIT 5: FILE CONTAINING DATA LABELS 9.COO C OUTPUT: 10.000 C *LUNIT 7: OUTPUT FILE FOR 10-ELEKENT PEATUBE VECTORS 11.0C0 C LAST UPDATE: 12.000 C JANUARY 20 1975 13.000 C 14.000 C 15 .000 0001 INTEGER NCHANA/3/,NCHANE/4/ 16.000 0002 COMPLEX TRAN (2049) 17.COO 0003 REAL DATA (U096) ,SRATE/64./ 18.000 0004 COMMON TRAN 19 .000 0005 EQUIVALENCE (TRAN,DATA) 20 .000 000b REAL CATIN (4, 819-2) 21.COO 0007 COMMON / LATIN / CAT IK,INCEXF,NFILI 22.000 000b INTEGER NELAG/0/,NSEC/64/,NSAMP/8192/,N/4096/ 23.COO 0009 INDEXF=0 •;<••• 24.COO 0010 PRN=N . ; ' 25.COO 0011 PREQLP=16. 26.000 C 27.000 C GET ALL FCUR EEG CHANS TBCH A 64 SIC SA ANC PUT IN EAT IN 28.000 0012 3 CALL INPUTS (N FLAG) •'• 29 .COO .0013 IF (NFLAG. EQ.1) GO TC 4 30.000 C * 31.CCO C COPY ONE CHAN AT 64 SA/SEC (NOT TEE CRIG 128/SEC) 32.000 0014 DO 1 J=1,NSAMP,2 33.COO 0015 1 OATA ( ( J - U / 2 H ) = LATIN (NCHANA, J) 34.000 C 35.000 C COMPUTE TIME DOMAIN FIAT IL'S AFTER PHIIILTIRING OF SIGNAL 36.000 0016 CALL FILTLP(.1, SR ATE, FREQLP) 37 .000 0017 CALL NORM (DATA, N.ZAV iR.5.12,TM3, IM4) 38 .000 0018 CALL PSKEW (TM 3 , Stl2 , SKEW , VARSK ,SDS K , E 3N) 39.CCO 0019 CA1L RKURT(FM4,SK2,E R N,CK URT,VAKRT.SCKRT) 40.000 0020 XX X=SQBT (SM2 j. 41 .000 0021 CALL ZCROSS(DATA,N,ZRATE,NSEC) 42.000 0022 CAIL DCRCSS (DATA,N.IRATE,NS.EC) 43.COO 0023 ZHATE=ZHATE/2. 44.000 0024 DRATE=DRAIE/2. 45.000 C 46.000 C COPY THE CTHER CHAM AN I CCMEUTE TIME COM A IN FEAT EL'S 47.COO 0025 DO 11 J=1,NSAMP,2 48.000 0026 11 DATA ( (J-1 ) /2*1) = CATIN (NCHANB.J) 49 .000 0027 CALL FILTLP(N,SRATE,FREQLP) 50 .000 0028 CALL NORM(DATA,N . Z AV E E.S M2 ,T M3, IM4) 51 .000 0029 CALL PSKEU(TH3',SM2,SKEH2,VARSK,SDSK.PBN) £2.000 0030 CALL RKURT (F M4 ,S M2 . E RN. CKU RT2 , V JKRT ,S IKRT) 53.COO 0031 XXX2=SQRT (SM2) 54 .000 0032 CALL ZCRCSS (D AT A. N ,,Z B AT 12 . NS EC) 55 .000 0033 CALL DCRCSS (DATA; N, CRATE2, NSEC) 56.000 0034 ZRATE2=ZRATE2/2. 57.000 0035 DRATE2=DRATE2/2. • 58 .000 C 59.COO C COMPLETE AND WRITE CNE FEATURE VECTCB 60.000 0036 READ(4,12)NF,LEV,NPTNT 61.000 0037 12 FORMAT(I5.5X.2I5) 62.000 003U WHITE (7, 13)XXX.ZRATE,DRATE.SKEW.DKUHT.XXX2,ZHATE2,DRATE2.SREW2, 63.COO 1DKURT2,NF,LEV,NPTNT 64 .000 0039 13 FORMAT(10F14.6,314) 65.COO 0040 GO TO 3 66.000 0041 4 STOP 6 7 . 0 0 0 0042 ESO 6 8 . 0 0 0 137 0001 SUBROUTINE INPUT (SFLAG) €9.000 C THIS SMUR WAS AC APT EC P BOB SOBT.O.S J IN 10 1974 7C.CC0 C 71.0C0 0002 REAL DATIN(0,B192) 72.000 0003 COMMON /DATIN/ DATIN,INDEXF,NFILE 73.000 0000 IHTEn£!(*2 DLOCK (2008) ,LtN1 70.000 0005 LUNIT=1 75.000 000b NSKIP'O : 76.000 C 77.000 C READ THE FILE NO 78.000 0007 RE AD (5,20, END-10) NFILE 79.000 0008 20 FORMAT (15) 80.COO 0009 WRITE (6, 12) NFILE ei.000 0010 12 FORMAT (« ••••• iI5) 82.COO C 83.000 C PREPARE TC SKIP TC THE APPROPRIATE I I L I 80.C0C 0011 ITEMP=M FILE-INDEXF-1 85.000 0012 CALL SKIP (ITEEP.KSKIE,LUNIT) 86.000 0013 IN D EX F= N FIL E-1 87.000 c ea.coo 0010 DO 10 IBLK=1,16 89.000 0015 INDX= (IBLK-1) *512 90.000 0016 CALL READ(BLOCK,LEN1,0,LTNE1,LUNIT,CIO) 91.000 0017 DO 10 ICil = 1,0 92.COO 0018 DO 10 isAn=i,2oae,a 93.000 0019 IR=INDX*1* (ISAR-1)/«» 90.000 0020 IRR= (ICH-1) *ISAH 95.000 0021 10 DATIN (ICH,IR) = BLCCK (IBB) 96.COO C 97.000 0022 RETORN 98.COO 0023 10 NPLAG*1 99.000 0020 RETURN 1C0.0C0 0025 ENc • 101.000 0001 SU 8RCUTI d E *'F I ITt P ( NS A HP, S F ATI ^  FE fCLE) ' " 102.000 C " 103.000 C LOWPASS FILTERS THE SIGNAL IN ARRAY * I AT A • VIA IFT ARE 100.CCO C CONVOLUTIONAL-TYPE FILTER.THEN PUTS RESULTS IB DATA. 105.COO C 106.000 0002 COMPLEX TRAN (2009) . 107.OCO 0003 REAL DATA (0096) 108.000 0000 COMMON TRAN 109.000 0005 EQUIVALENCE (TRAN.CAT*) 110.000 0006 INTEGER Nti (1) 111.CCO C FFT OF SIGNAL • — — 112.COO C 113.000 0007 NN(1) = NSABr 110.COO 0008 ISICN=-1 115.COO 0009 CALL FOUB2(CATA,1R.1,XSXGI,0) 116.000 0010 HID=NSAMP/2*1 117.COO 0011 ILIK= (FRECLP/(SRATE/2.)) * (HIC-1) *1.01 118.CCO C 119.000 C LP FILTERING 120.000 0012 DO 1 J=LLIfl,HID 121.COO 0013- 1 TRAN(J) = (0..O.) 122.000 C 123.000 C HP FILTERING — • — - - — — — 120.000 0010 L1=32 125.000 0015 L2»5 126.000 0016 DO 3 J=1.L1 127.COO 0017 3 TRAN(J) = (0. ,0.) 128.000 0018 DO 0 J=1,L2 129.000 0019 4 IRAN(L1»J)=TRAN(L1*J) »(FLCAT (J)/FLOAT <L2) ) 130.000 C 131.COO C INVERSE TEAKSFCBB 132.000 0020 ISIGN=1 133.000 0021 CAIL FOUR2(DATA,5N,1,ISIG»,-1) 130.000 0022 RN=NSAHP 135.000 0023 DO 2 J=1,NSAHP 136.000 0020 2 DATA (J)=EAT» (J)/8» 137.COO 0025 RETURN 138.000 0026 EN 0 139.000 0001 SUBROUTINE ZCBOSS(X,B,AV EZC, NSIC) 100.000 C 101.COO C THIS SUBR COUNTS THE NC. OF ZERO CROSSINGS IN AN ARRAY OF IBB. 102.000 C SIZE AND RETURNS THE AVERAGE CROSSING RATE 103.000 C 100.000 0002 REAL X (N) 105.COO 0003 2C»0. 106.COO 0000 LIH=N-1 ;K 107.000 C 108.000 0005 DO 1 1=1,LIB 10?.CCO 0006 IF (X (I) .GE.O.) GCTC 2 150.000 138 0007 oooa 0009 0010 0011 0012 0013 0001 0002 0003 0001 0005 0006 0007 0006 0009 0010 0011 0012 0013 001« 0015 0016 0001 0002 0003 0001 0005 0006 0007 0008 0009 0010 0011 0012 0013 001U 0015 0016 0017 0018 0019 0020 0021 0022 0023 0021 0 0 2 5 0026 0027 0001 I F H O T , X ( I ) H O S T B E L T 0 . . . I F ( X (1*1) . C E . O . ) Z C = Z C * 1 . G O T O 1 I P ( X ( I * 1) . L T . O . ) Z C = Z C * 1 . C O N T I N U E A V E Z C = Z C / N S E C B E T U B N E N E S U B R O U T I N E D C R O S S ( D E L , N , A V E D C , N S E C ) T H I S S U D R C O M P U T E S T H E A V E R Z E R O C R O S S I N G R A T E O F T H E E E B I V O F T H E S I G N A L S T O R E D I N A R R A Y X . N O T E : C O N T E M T S . O F A H G A R R A Y A R E C H A N G E D . B f c A L D E L ( N ) I I H = N - 1 D C = 0 . D 0 3 J = 1 - , , t l D E L ( J ) = C ' E L . ( J » 1 ) - D E L ( J ) D E L ( N ) = D E L ( N - 1 ) • ( D E L ( N - 1 ) • D E L ( N - 2 ) ) D O 1 1 = 1 , I I B I F ( D E L ( I ) . G E . O . ) G O T O 2 C I F N C T . D E L ( I ) M U S T E E L T 0 . . . . I F ( D E L ( 1 + 1 ) . G E . O . ) D C = D C * 1 . G O T O 1 2 I F ( D E L ( 1 * 1 ) . L T . O . ) D C = D C * 1 . 1 C O N T I N U E C A V 2 D C = D C / N S E C -R E T U R N E N D S U B R O U T I N E N O R M ( A R R A Y . N , A V I R . S V A R . T B 3 , I N t t ) C C T H I S P R O G R A M A C C E P T S A N A F R A Y O F S I Z E T C N = 6 1 » 1 2 8 = 8 1 9 2 A N D . C - C O M P U T E S T H E M E A N , V A R I A N C E C F T H E S A M P L E A N D C C O M P U T E S T E E T H I R I A N I I C U R T K M O M E N T S , C C I N I T I A L I Z A T I O N D I M E N S I O N A R R A Y ( N ) S U M = 0 . S V A R = 0 . S S 3 = 0 . S S U = 0 . B N = N C C M E A N : D O 1 J = 1 , H 1 S U E = S U M * A S R A Y ( J ) A V E R = S U B / R N C C S A f i P L E V A R I A N C E : D 0 3 L = 1 , N Z = A R R A Y ( L ) - A V E B 3 S V A H = S V A R * Z » Z S U H S = S V A R S V A R = S V A P / ( B N - 1 . ) S D E V = S Q R T ( S V A R ) C C C O M P U T E T H I R D A N D F O U R T H M O M E N T S . . . D O <4 J = 1 , R S S 3 = S S 3 + A R R A Y < J ) * » 3 S S U = S S U * A E R A Y ( J ) • * < » C O N T I N U E S H = A V E R T H 3 = S S 3 - 3 . * S B * S U E S + 3 . * S H » S B * S U H - H N * ( S f l * * 3 ) T H 3 = T H 3 / R N F H U = S S « - l » . • S H * S S 3 * 6 . * S B * S R * S U R S - 1 J . * ( S f l » * 3 ) * S 0 B * B N » ( S B * » « ) F f l « = F H < » / B N R E T U R N E N D S U B R O U T I N E P S K E W ( T H 3 , S M 2, S K E W , V A R S K , S D S K , B N ) T H I S S U B R O U T I N E C A L C U L A T E S T H E H O B E N T O F S K 2 W N E S S A N D I T S V A R I A N C E A N D S T A N C A 3 D D E V I A T I O N T M 3 I S T H E 3 R D M O M E N T S H 2 I S T H £ S E C O N D M O M E N T ( V A R I A N C E ) S K E W W I L L C O N T A I N T H E M E A S U R E O F S K E W N S S S 151 .000" 152 .000 153 .000 15H.000 155 .000 156 .000 157 .000 158 .000 159.COO 16C.000 1 6 1 . COO 162 .000 163 .000 16U.C00 165 .000 166.COO 167 .000 168.COO 169 .000 170.COO 171 .000 172.COO 173 .000 1 7 1 4 .CCO 175 .000 176.CCO 177 .000 178.CCO 179 .000 1 8 0 . CCO 181 . COO 162 . COO 183 .000 18U.C0O 1 8 5 . CCO 186. COO ie7.cco 188 .000 189.COO 190 .000 191.CCO 192 .000 193.CCO 194 .000 195.COO 196 .000 197.CCO 198 .000 199.CCO 200 .000 201.CCO 202 . 000 203.COO 204 .000 2C5 .C00 206 .000 207 . 000 208 .000 2C9.CO0 210 .000 2 1 1 . COO 212 . COO 2 1 3 . 0C0 21U.000 215.COO 216 .000 217 .000 218 .000 219 .000 220 .000 221.COO 222 .000 223.CCO 2 2 < 4 . 0 0 0 225.COO 226 .000 2 2 7 . CCO 2 2 8 . CCO 2 2 9 . CCO 230 .000 231 .0C0 139 c c c c c c 0002 0003 0004 0005 0006 0 0 0 7 OOOti 0009 0001 0002 000 3 0004 0 0 0 5 0006 0007 0008 0009 0010 VARSK W i l l CONTAIN ITS VARIANCE SDSK MILL CONTAIN ITS STANDARD DEVIATION RN IS THE NUMBER CF CESERVATICNS TK IS K 3 SK IS 112 ,TK=(RN*RN/((RN-1.)*(RN-2.)))*TH3 SK= (RN/ (SN- 1. ) ) *SH2 SKEW=TK/SCRT (S.K**3) CALCULATE VARIANCE CF SKEWNESS VARSK = 6 . * RN * (RN-1.) VAHSK=VARSK/ ( (RN-2. ) • (HN+1.) * (RN*3. ) ) GET S.D. CF SKEWNESS S DSK = SQRT (VARSK) RLIURN END SUBROUTINE RKURT(FH4.SH2,FN,tKURT,VAKRT,SDKRT) THIS SUBROUTINE CALCULATES A MEASURE CI KURTOSIS FM 4 IS THE «TH MOMENT ABOUT THE MEAN SM2 IS THE SECONE HCMENT AEOUT TEE MEAN (VARIANCE) RN IS THE NUMBER OF OUSSRVATIONS DKURT WILI CONTAIN THE MEASURE CF KURTCSIS VAKRT WILL CONTAIN ITS VARIANCE SDKRT WILL CONTAIN ITS ST AN CAB C IIVIAT10H FK IS K4 IK IS K2 FK= RN*HN/( (RN-1. )» (RN-2. ) * (BN-3.) ) FK= FK * ( (RN*1.)*PM4 - 3 . * (RN- 1. ) »SM2»SH2) TK=(RN/(RN-U)) *SE2 DKUBT = FK/ (TK*TK) CALCULATE THE VARIANCE OF THE KURTOSIS VAKRT=24. * RN * (RK-1.) * (RN-1.) VAKBT=VAKBT/ ( (BN-3. ) * (RN-2. ) * jR N» 3 . ) • (RN*5. )) GET STASIDARD DEVIATION OF THE KURTOSIS SD KRT = SCRT(VAKRT) RETURN END 2 3 2 . 0 0 0 2 3 3 . 0 C 0 2 3 4 . 0 0 0 2 3 5 . COO 2 3 6 . 0 0 0 2 3 7 . COO 2 3 8 . COO 2 3 9 . COO 2 4 0 . 0 0 0 2 4 1 . 0 0 0 242. COO 2 4 3 . COO 244 .000 2 4 5 . 0 0 0 246.COO 247 .000 248 .000 249 .000 2 5 0 . 0 0 0 2 5 1 . CCC 2 5 2 . COO 2 5 3 . COO 2 5 4 . COO 2 S S . 0 C 0 2 5 6 . 0 0 0 2 5 7 . C O O 2 5 e . 0 0 O 2 5 9 . 0 0 0 2 6 0 . 0 0 0 2 6 1 . 0 0 0 2 6 2 . C O O 2 6 3 . 0 0 0 264 .000 2 6 5 . C O O 2 6 6 . 0 0 0 2 6 7 . C C O 2 6 e . C 0 0 2 6 9 . C C O 2 7 0 . 0 0 0 2 7 1 . C O O 2 7 2 . 0 0 0 2 7 3 . C C O 2 7 4 . 0 0 0 1 4 0 APPENDIX F PERFORMANCE ESTIMATION BY THE I I * TECHNIQUE-0 0 0 1 0 0 0 2 0 0 0 3 0 0 0 0 0 0 0 5 0 0 0 b 0 0 0 7 0 0 0 b 0 0 0 9 0 0 1 0 0 0 1 1 0 0 1 2 0 0 1 3 001U 0015 0016 0017 0016 0019 0020 0021 0022 0023 0020 0025 0026 0027 0026 0029 0001 0002 0003 0000 0005 0006 0007 0008 0009 A P P E N D I X P E 2 R F C R M A N C E E S T I M A T I O N E K T E E P I - » T E C H N I Q U E T H I S P R C G H A M C A N E E U S E E T C E S T I M A T E T H E P E R F O R M A N C E O F S P E C T R A L A N C T I M E D O M A I N E T ! G P A T T E R N R E C O G N I T I O N S Y S T E M S D Y T H P I - * T E C H N I Q U E . I N P U T : • L U N I T 0: F E A T U R E V E C T O R S A N D L A E E L S • L U K I T 5 : Q U A N T I Z E R P A R A M E T E R S O U T P U T : • L U N I T 6 : A L L C U T E U T P A R A M E T E R S : N E L = N U M B E R C F E L E M E N T S I N F E A T U R E V E C T O R N Q U A N T = N U M B E R O F P O S S I B L E Q U A N T I Z A T I O N L E V E L S S D = N U M B E R C F S T . L E V . ' S A I L C W iZ F O R F E A T U R E V A R I A T I O N I P R O B = 0 I F E Q U A L A P I O R I C L A S S P R C B ' S A R E T O B E D S E C I F R I N T = 0 T C E R I N T T E S T R E S U L T S A T E A C B S T E P L A S T U P D A T E : O C T C B E R 1 9 1 9 7 0 R E A L D A T A ( 5 0 0 , 8 0 ) I N T E G E R IX(SOO.aO) , I E V ( 5 0 0 ) , * . ! H E ( 5 0 0 ) C O M M O N / C H A I N / I X . L E V . N U M P C O E K C N / M P R C G / D A T A : R E A D I N A L L A V M L A E I E F E A T U R E C A T A : N E L = 8 0 D O 1 1 = 1 , 5 0 1 1 R E A D ( U , 2 , E ! I D = 3 ) ( D A T A ( I , J ) , J = 1 . N E L ) , L E V ( I ) , N U M P ( I ) 2 F O R M A T ( 8 0 F 1 U . 6 , 0 X , 2 I 0 ) 3 N S A M P = I - 1 C I N I T I A L I Z A T I O N O F P A R A M E T E R S : I P R C B = 1 I P R I N T = 1 5 6 H E A D (5,55 , 2 N D = 5 0 ) N C U A N T , S t 5 5 F O R M A T ( 1 3 , F 5 . 0 ) C ' P I M E T H O D ' O F P E R F O R M A N C E E S T I M A T I O N : 0 L O W = 1 9 I H I G H = L O W 8 I F ( I H I G H . E C . N S A M P ) G C T C 7 I F ( N U M P ( ( I K I G H + 1 ) ) . N E . N U M P ( L O W ) ) G C T O 7 I H I G H = I H I G H * 1 G O T O 8 7 C A L L Q U A N T ( L C W , I H I G H , N S A M P , N E L , N C U A N T , S D ) C A L L T R A I t. ( I O W , I H I G H , N S A M E , N E L , N C U A N T ) C A L L T E S T ( L O W , I H I G H , N E L , I P R I N I , I P R O B ) I F ( I H I G H . E C . N S A M P ) G C T C 6 L O W = I H I G H * 1 G O T O 9 C 6 C A L L P R I N T ( N S A M P , N E L , S C O A N T , I P R C E ) G O T O 5 6 5 0 S T C P E N D S U B R O U T I N E C U A N T ( I M I [ , 1 1 N I . N S A H E , N E L , N C U A N T , S E ) : C O N S I D E R S A L L F E A T U R E V A L U E S F R O M T H E T R A I N I N G D A T A ( I E , N O T : S A M P L E S F R O M I M I L , . . . , I E N E ) F C R F A C E F E A T U R E . T F . E M I N , M A X , M E A N : A N D S T . D E V . A R E C A L C U L A T E D . A L L F E A T U R E V A L U E S A R E T H E N Q U A N T I Z E D I N T E G E R I X ( 5 0 0 , 8 0 ) H E A L D A T A ( 5 0 0 , 8 0 ) . E M I N ( 8 0 ) , D H A X ( 8 0 ) , I A V E R ( 8 0 ) , C S E I V ( 8 C ) , F ( 8 0 ) C O M M O N / I . P R O G / D A T A C O M M O N / C H A I N / IX : I N I T I A L I Z A T I O N : R N S A M P = N S A M P - 1 - I E N D * I B I D D O 1 J = 1 , K E I D M I N ( J ) =999999 . D H A I ( J ) = - 9 9 9 9 9 9 . 1.C00 2 .000 3.COO 0 .000 5 .000 6 .000 7 . CCO 8 . COO 9 . CCO 10 .000 11 .000 12 .000 13.CCO 10.CCO 15 .000 16 .000 17.0CO 18 .000 19 . 000 20 . 000 21.COO 2 2 . 0 0 0 23.COO 20.COO 25.CCO 26 . 000 2 7 . CCO 2 8 . COO 2 9 . CCO 30 .000 31.CCO 32 .000 33 . 000 30 . 000 35.COO 36 .000 3 7 . COO 3 8 . COO 3 9 . CCO 00 . 000 0 1 . 0 0 0 0 2 . CCO 03. COO 00.000 05.COO 06 . 000 07.COO 08 . 000 09 . 000 50 . 000 51.COO 52 .000 53.CCO 50 . 000 55 . 000 56 . 000 57.CCO 58 . 000 59.CCO 60 . 000 61 .CCO 6 2 . 0 0 0 63 .0C0 6 0 . 0 0 0 6S . 0C0 6 6 . 0 0 0 67 . 0C0 68 . 000 6 9 . 0 0 0 70 . 000 71.COO 1 4 1 0010 001 1 0012 0013 001U 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 002b 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0001 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0001 0002 000 ) c c c c 10 9 10 C c DAV Et) (J) =0. DSDEV (J )=0. IP (1(1 ID. EQ. 1) CO TO 2 LON = 1 IHIGH=INID-1 FIND MIN, MAX, H3AN AND SD. DEV. FOR EACH FEATURE: DO 3 1= LCW,IHIGH CO 3 J= I.N EL IF (DATA (I , J) . IT. CMN (J) ) CM IN (J) = I»TA (I.J) IF (DATA (I.J) .GT.UMAX(J))DMAX(J) =DATA (I,J) DAVER (J) = LAVER (J) •LATA (I.J) DSDEV (J) = DSDEV (J) • (DATA (I,J) *DATA (I,J) ) IF ( (HUGH. EC. NSAEE) . CR. (IEND. EC. NSAMP) ) GO TO 4 LOW=IEND*1 IHIGH=NSAEP GO TO 5 FIND CLASS WIDTH FOR LINEAR QUANTIZATION: DO 6 J=1,NEI DAV ER (J) = DAVER (J)/RNSAHP DSDEV (J) = 50RT ( (DSCEV (J) - ( R NS AMP* CAVER (J) * CAV ER (J) )) / (RNSAHP- 1 .) ) IF (DM IN (J) .LT. (DAVER (J) -SD»DSDEV (J)))DKIN(J) = EAVER(J)-SE*DSDEVIJ) IF (DM AX (J) .GT. (CAVER (J) » CS I EV (J ) »b £ ) ) I MAX (J ) = CAVER (J ) • S E» CSC E V (J ) F(J) = ( CM AX (J) - DM IN IJ ) (/FLOAT (NQUANT) QUANTIZE ALL SAMPLE DATA (TRAINING AND TESTING DATA): DO 10 1=1,NSAMP DO 10 J=1,NEi. IX (I ,J) = (CAT A (I,J) - CM IN (J) )/F (J) IX (I,J) = IX ( I . J ) t l IF (IX (I ,J) . IT.1) IX (I.J) = 1 IF (IX (I,J).GT.NQUANT)IX (I,J) = NQUANT RETURN END SUBROUTINE TRAIN(LCW,IESC,NSAMP,NEL,NQUANT) INTEGER IX(500,80) .LEV (500) REAL PRCOND (5, 80, 128) .PRCLAS (5) COMMON /CMAIN/ IX,LEV COMMON /TST/ PRCOND,PRCLAS INITIALIZATION: DO 1 1=1,5 PRCLAS (I) =0. DO 1 J=1.NEI CO 1 K=1,NQUANT PRCCND(I, J,K) =0, USE TRAINING C AT A TC ESTIMATE PRCE CISTRIEUTIONS: IF (LOW . N E. 1) GO TO 2 IA=IEND*1 IB = NSAMP DO 3 I=IA,IE II=LEV(I)»1 DO 4 J=1 ,I»2L PRCOND (I I.J, IX (I, J) )=PRCOND (II, J , IX (I , J) ) • 1. PRCLAS (II) = PRCLAS (II) +1. IF(IB.EQ.NSAMP)GO TO 6 IF (LEND. EC. NSAMP) GC TC 6 IA=IEND+1 18= NSAfl P GO TC 5 IA=1 IB=10»-1 GO TO 5 CHECK TRAINING DATA FOR UNREPRESENTED CLASSES: DO 9 K=1,5 KK=K-1 IF (PRCLAS (K).EC.0.)WRITE(6,10)KK FOHMAT(/' *** WARNING: NO SAMPLES FOB LEVEL',13/) APPLY BAYES ESTIMATION PROCEDURE TC PROB MATRICES: S=PBCLAS(1)»PRCLAS|2)*FFCLAS(3)«FFCLAS(4)4PRCLAS(S) DO 7 1=1,5 DO 8 J=1,NEI DO 8 K= 1, NQUANT PRCCND (I, J, K) = (PRCCNC (I,J,K) *1. ) / (PRCLAS ( 3) « FLO AT (NQUANT) ) PRCLAS (I) = (PRCLAS (I) *1.) / (S*5.) RETURN FtiC SUBROUTINE TEST ( LC J , I F N C , N EL, IP R INT , IPSO E) INTEGER IX (500 ,80) ,1 EV (500) , HUMP (500) SEAL CLASijM (5.5),PRCOND (5,MO, 12H) ,ri)CL(,S (5) , PTEST (5) 72 . 000 73 . 000 74 . 000 75.COO 76 . 000 17 . 000 78 . 000 79.CCO 80 . 000 ei.eoo 82 .000 83.COO 84 .000 es.coo e6.coo 87.CCO 88 .000 £9.CCO 90 . 000 91 . 000 92 . 000 93.CCO 94 .000 95.CCO S6.CC0 97 . 000 9e .CC0 99 . 000 1C0.CC0 1 0 1 . COO 102. COO 103 . COO 1C4.C00 105 .000 106.OCO 107 .000 108.CCO 109 .000 1 1 0 . CCO 111 . COO 112. CCO 113 .000 114.CCO 115 .000 116.OCO 117 . COO 118. CCO 119 .000 120.COO 1/1.000 1 2 2 . COO 123 . COO 124 . COO 125 .000 126.COO 127.OCO 12e.0C0 129 .000 13C.C00 131 .000 132.COO 133 .000 134.CCO 135 .000 136 .000 137 .000 138 .000 139 .000 14C.00O 1 4 1 . COO 1 4 2 . COO 143.000 144.COO 145 .000 146 .000 147 .000 1 4 8 . CCO 149 .000 15C.CC0 151.COO 152.OCO 153 .000 154 .000 155.CCO 156.000 157.COO 142 0004 COMMON /CHAIN/ I X . I E V . N U B I 158.000 0005 COMMON /TST/ PRCOND.PRCLAS 159.CCO OOOfa COMMCN /PRNT/ CLASSR . 160.000 C 161.COO c INITIALIZATION CN FIRST SUES CAIL: 162.000 0007 IF(LOW.NE.1)GO TO 1 163.0C0 oooa DO 2 1=1,5 164.000 0009 DO 2 J=1,5 165.000 0010 2 CLASSM(I,J)=0. 166.COO C 167.000 c GET CLASS CONDITIONAL FRCP. ESTIMATES FCR TESTING SAMPLE (S ) : ' 168.COO 0011 1 DO 10 I=LOW,IEND 169.000 0012 DO 3 K=1,5 170.000 0013 3 PTEST(K)=0. 171.CCO 0014 DO 4 IC1ASS=1,5 172.000 0015 DO 4 IEL=1,NEL 173.000 0016 4 PTEST (ICLASS) = PTEST (ICLASS) *ALOG (FBCONC (ICLASS, IEL, IX (I.IEL) ) ) 174.000 C 175.COO C INCLUDE A PRIORI CLASS FRCP'S AND ESTIMATE ANESTHESIA LEVEL: 176.000 0017 IF (TPROB. EQ.OJGO TO 5 177. 0C0 0018 DO 6 ICLASS=1,5 178.CCO 0019 6 PTEST (ICLASS)=PTEST IICLASS)+ ALOG (PRCLAS (ICLASS) ) 179.000 0020 5 IR = 1 180.000 0021 DO 7 ICLASS=2,5 181.COO 0022 7 I F (PTEST (ICLASS) .GT. ET EST (I R) ) I R= I CLASS 182.0C0 C 183.000 c UPDATE CLASSIFICATION M AT FIX ANC PRINT RESULTS I F EESIREE : 164.000 0023 II = LEV (I)»1 185.000 0020 CLASSH(II ,IR)=CLASSF (II, IB ) «1. 186.000 0025 IF (IPRINT.NE.O)GO TO 10 187.COO 0026 IHR=IR-1 188.000 0027 IF (I I.N E. IR) WRITE (6 ,8)1 .LEV (I) ,IRR, NUME ( I ) ie9.coo 0028 IF (II. EC. IR) WRITE (6,9) I, HUMP (I) , LEV (I) 190.000 0029 8 FORMAT (5X,13,• WAS K IS CL ASS IFI E E •, 13 . • — > • , 11, 5X , • t • , 13) 191.COO 0030 9 FORMAT(5X,I3, • (I'.13,') IS OK: LEVEL' ,12) 192.000 0031 10 CONTINUE 193.CCO 0032 RETURN 194.000 0033 END 195.000 0001 SUBROUTINE PRINT (NSAHP,NEL,NQDANT.IPBCB) 196.CCO C 197.000 0002 BEAL CLASSM (5, 5) ,TOTAL (5) 198.COO 0003 COMMON /PRNT/ CLASSE 199.000 0004 DO 78 IQ=1,5 2C0.COO 0005 78 TOTAL (IC) =0. 701.000 0006 10 WRITE(6,11) 202.000 0007 11 FORKAT( '1 »,20X, ' S U M M A R Y '////) 203.000 0008 WR ITS (6, 12) NSAHP 2C4.C00 0009 12 FORMAT (5 X , 'TCT AL NUMEER CE PATTERN S AM EL E S= • , 13/) . 205.CCO 0010 WRITE (6,16) 2C6.CCO 0011 16 FORMAT(5X,'METHOD CF EEFFCRMANCE ESTIMATION: " P I - * METHOD"'/) 207.000 0012 IF (IPROri.NS.O) SRIl'J (0,13) 208. 0C0 0013 IF (IPROB. E0.0) WRITE (6, 14) 209.000 0014 13 FORMAT (5X ,' UNEQUAL A FRICRI CLASS FRO E AE ILITIES WERE USED'/) 210.000 0015 14 FOR«AT(5X,'EQUAL A PRIORI CLASS PROBABILITIES WERE USED'/) 211.000 001b . WHII2 (6 ,17) NEI.NCUANT 212.COO 0017 17 FORMAT(5X,I2,• ELEMENTS IN FEATURE VECTOR WITH',14," QUANTIZATION 213.000 1 LEVELS PER FEATURE'/) 214.000 C 215.000 0018 WRITE (6 ,18) 216.000 0019 18 FORMAT(///10X,'CLASSIFICATION MATRIX: '//> 217.000 0020 OK=0. 218.CCO 0021 DO 19 1=1,5 219.000 0022 DO 20 J=1 ,5 220.000 0023 20 TOTAL (I) =TOTAL (I) •CLASSfl ( I , J ) 221.000 0024 OK=CK*CLASSM(1,1) 222.COO 0025 19 WRITE (6, 2 1) (CLASSM (I,J) ,J=1.5) , TOTAL ( I ) 223.000 0026 21 FORMAT (10X.5F10.2,10X,F6.0) 224.COO 0027 PERCNT=(OK/FLOAT(NSAMP))*100. 225.000 0026 WRITE (6 ,22) PERCNT.CK 226.CCO 0029 22 FORMAT(///5X,•«*»',F8.3,' PERCENT OB ' .FS.O,' SAMPLES WERE CLASSIFI 227.0Q0 1 ED CORRECTLY.'/) 228.COO 0030 BX = 1O0.-PERCNT 229.000 0031 WRITE (6 ,27) BX 230.COO 0032 27 FORMAT(5X,«•*» MISCLASSIFICATION ERROR: • ,F8.3///) 231.000 C 232.000 0033 WRITE(6,23) 233.000 0034 23 FORMAT (10X,'CLASSIFICATION PBCEAEILITY MATRIX:*//) 234.000 0035 DO 24 1=1,5 235.000 0036 DO 25 J=1 ,5 236 .COO 0037 25 CLASSM (I, J) =(CLASSM (I , J) /TOTAL (I) )»100. 237.COO 0038 24 WRITE (6 ,2b) (CISSSC (I.J) ,J=1,5) 238.CCO 0039 26 FORMAT ( 10X, 5F10.2) 239.000 0040 RETURN 24C.C00 004 1 END 241.COO 143 APPENDIX G PERFORMANCE ESTIMATION BY THE U* TECHNIQUE 0001 0002 0003 0001 0005 000b 0007 oooe 0009 0010 001 1 0012 0013 001U 0015 0016 0017 0018 0019 0020 0021 0022 0023 002U 0025 0026 0027 0028 0001 0002 0003 0004 0005 0006 0007 C_ c c c c c c c c c c c c c c c c c c_ c "APPENDIX r, E E R FC R M A K C E ESTIMATION ti t f i "» TECHNIQUE THIS PROGRAM CAN BE USEE TC ESTIMATE TEE PERFORMANCE OF SPECTRAL AND TIME DOMAIN EEG PATTERN RECOGNITION SYSTEMS BY THE U« TECHNIQUE. INPUT: NUMBER OF THE SUBJECTS TO BE CONSIDERED FEATURE VECTORS ANE LABELS C c •LUNIT M •LUNIT 5 OUTPUT: •LU MT 6 : A l l CUTEUT PARAMETERS: NEL = NUMBER CF ELEMENTS IN FEATURE VICTOR NQUANT = NUMBER OF POSSIBLE QUANTIZATION LEVELS SD = NUMBEB CF ST. IIV.'S ALLCWEC FOR FEATURE VARIATION IPHOB, = 0 IF EQUAL A PIORI CLASS PRCB *S ARE TC EF USEE IERINT = 0 TC PRINT TEST RESULTS AT EACB STEP LAST UPDATE: JANUARY 20 1975 REAL DATA (500, 80) INTEGER IX (500 ,80) .LEV (500) ,NUBP (500) COMMON /C ft A IN/ IX,LEV,SUMP COMMCN /MERCG/ EATA INITIALIZATION CF PARAMETERS: NEL=13 NQUANT=64 IPBOB = 0 SD=5. IPBINT=0 READ IN ALL AVAILABLE FEATUBE DATA: 11 READ(4,10,END=12)ETNT 10 FORMAT (F5.0) NPTNT=PTNT 1= 1 1 READ(5,2,ENC=3) (CATA(I.J) , J= 1 , N EL) , LEV (I).NUHP(I) 2 FORMAT (1X,13F9.2,4X.2I4) IF (NUHP (I) . NE. NPTNT) GO TC 1 1=1*1 GO TO 1 3 NSAMP=I-1 : »U HETHCD* CF PERFORMANCE ESTIMATION: DO 5 1=1, NSAHP CALL QUANT (1,1, NS AME, NIL, NQUANT,SI) CALL TRAIN(I,I,NSAMP,NEL,NQUANT) 5 CALL TEST (I,I,NEL,IE HI NT , IE RO E) CALL PRINT(NSAMP,NEL,NQUANT,IPRCB,NPTNT) RE KIND 5 GO TO 11 12 STOP END SUBROUTINE QnANT(IHID,ISSD,NSAHP,NEL,NQUANT,SD) : CONSIDERS ALL FEATURE VALUES FRCM TFI TRAINING CAT A (IE,NOT I SAMPLES FROM IMID,...,TEND) FOR EACH FEATURE. THE MIN, MAX, MIAN : AND ST. DEV. ARE CALCULATE!. ALL FEATURE VALUES ARE T KIN QUANTIZED INTEGER IX (500,80) HEAL DATA (SCO, 8 0) , DM IN (80) , DM A X (8 0) ,D AVER (80) , DSDEV (80) , F (80) COMMON /MERCG/ DATA COMMON /CHAIN/ IX : INITIALIZATION: RNSAHP=NSAMP-1-IENC*IHIE DO 1 J=1,NEL 1.CC0 2 .000 3.COO U.OCO 5.COO 6 .000 7.0CO e.coo 9.COO 10 .000 11.CCO 12 .000 13.COO 14 .000 15.COO 16 .000 17.0CO 18. COO 1 9 . COO 2 0 . 0 0 0 2 1 . COO 2 2 . COO 2 3 . COO 21 . 000 25.COO 26 .000 27.CCO 28 . 000 29.COO 30 . 000 31.COO 32 .000 33.CCO 31 . 000 35.COO 36 .000 37.COO 38 .000 39.COO 40 .000 11.CCO 12 . 000 13 . 000 11.COO IS.COO 16 .000 17.CCO 4 8 . COO 4 9 . CCO 50 . 000 51.COO 52 .0C0 53.COO 54 .000 55.COO 56 . 000 57.COO 58 .000 59.CCO 6 0 . 0 0 0 61.COO 62 . 000 6 3 . 0 0 0 6 4 . 0 0 0 65 . 000 6 6 . 0 0 0 6 7 . 0 0 0 6 8 . 0 0 0 144 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 00 2 1 0022 0023 0024 0025 0026 0027 0026 0029 0030 00 31 0032 0033 0034 0035 0036 00 3 7 0038 0001 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 10 C c c 9 10 DMIN (J)=999999 . Dn AX (.1) =-999999 . DAVER (J)=0. DSDIV(J)=0. IF (IHID.EU 1) GO TC 2 L0W=1 IHIGH = I F . I t - 1 FIND MIN, MAX, MEAN ANC SC. CEV. FCB IACF FEATURE: DO 3 I=LOW.IHIGH DO 3 J=1,S2I IF (CATA (I, J) .LT.DMIN (J) ) DMIN (J) =DATA (I,J) IF (DATA (I , J) .GT. CrAX (J) ) EM AX (J) = C AT A (I,J) DAVEH (J) = DAVER (J) +DATA (I, J) DSUEV<J) = L5EEV(J)*(EATA(I,J)»tATA(I,J)) IF((IHIGH.EQ.NSAHP) .OR. (IEND.EQ.NSAMP))GC TC 4 L0W=IEND+1 IHIGH=NSAMP GO TO 5 FIND C1ASS WIDTH FCR LINEAR QUANTIZATION: DO 6 J=1,NEL DAVER (J)=CAVER (J)/HNS AME DSDEV (J) = SQRT( (DSDEV (J) - (HNSAHP*DAVEH IJ) *DAVER (J) )) / (RNSAHP-1. ) ) IF(DMIN(J).IT. (CAVER (J)-St»ES CEV(J)))C MIN (J)=CAVER<J)-SE*ESCE\i|J) IF (CM AX (J) .GT. (DAVER (J) +DSDEV (J) »SD) ) DMAX (J) = DAVER (J) *SD*DSCEV IJ ) F (J) = (DMAX (J) -DM IN (J) ) /FLOAT (NCUANT) QUANTIZE ALL SAMPLE CATA (TRAINING AN C T 1ST IN G CAT*): DO 10 1=1, NSAMP DO 10 J=1 ,NEL IX (I,J)= (LATA (I.J)-DMIN (J) )/F (J) IX (I , J) = IX (I . J) *1 IF (IX (I.JJ.LT.I)IX II,J) = 1 IF (IX (I ,J) . GT. NCUANT) IX (I, J) = NQUANT RETURN END SUEROUTINE TRAIN (LOW,IEND,NSAMP,NEL,NCUANT) INTEGER IFLAG (5) , IX (500, 80) , LEV (5C0) REAL PRCCND(5,80,128),PRCLAS(5) COMMON /CMAIN/ IX,LEV COMMON /TST/ PRCCND,ERCLAS,IFIAG INITIALIZATION: DO 1 1=1,5 IFLAG (I) =0 PKCLAS(I)=0. DO 1 J=1,NEI DO 1 K= 1, NQUANT PBCCND(I,J,K)=0. US2 TRAINING CATA TC ESTIMATE PBOE 11ST R 1BUT IONS: IF(LOW.SE.1)GO TO 2 IA=ISND»1 IB=NSAMP DO 3 I=IA,IB II = LEV (I) »1 DO 4 J=1 , NF.I PRCOND (II, J , IX (I, J) ) = PBCOND (II, J,IX (I,J) ) • 1. PRCLAS (II) = E RCL AS (II) *1. IF(IB. EQ. NS AMP ) GO TO 6 IF (IEND. EC. NSAMP) GC TC 6 IA=IEND*1 IB = NSAM E GO TO 5 IA=1 IB=LOW-1 GO TO 5 CHECK TRAINING DATA FOR UNREPRESENTED CLASSES: AND FCR CLASSES WITH CNI SAMPLE CNLY: DO 9 K=1,5 KK=K-1 IF (PRCLAS (K) . EQ. 0.) IFLAG (K) =1 IF(FRCLAS(K).EC.0.)WRITE(6,10)KK FORMAT( • » WARNING: NO TRAINING SAMPLES FOR LEVEL«,I3) APPLY BAY^S ESTIMATION PROCEDURE TC PRCU MATRICES: S=PRCI.AS (1) *PRCLAS (2) •EFClAf. (3) + C R CL AS (4) »PRCLAS (5) DO 7 1=1,5 69.CCO 70 . 000 7 1 . 0 0 0 72 . 000 7 3 . COO 7 4 . COO 75 . 000 76 . 000 77.CCO 7 8 . 0 0 0 7 9 . 0 0 0 80 . 000 81.COO 82 . 000 8 3 . 0 0 0 £4.000 £5. COO 8 6 . 0 0 0 £7.000 88.COO 8 9 . 0 0 0 9 0 . 0 0 0 91.CCO 92 . 000 9 3 . 0 0 0 94.COO 9 5 . 0 0 0 96.OCO 9 7 . 0 0 0 98.CCO 9 9 . 0 0 0 1CC .000 101 .000 102.COO 103 .000 104.CCO 105 .000 106.OCO 107 . COO 1 0 8 . CCO 109 .000 11C.CCO 111 .000 1 1 2 . COO 113 . COO 114 . COO 115 .000 116 .000 117. CCO 1 1 8 . CCO 119 .000 12C.CC0 121 . CCO 1 2 2 . COO 123 .000 124 .000 125 .000 126 .000 127 .000 128.CCO 129 .000 130.COO 131 .000 132.COO 133 .000 134.CCO 135 .000 136.CCO 137 .000 138.COO 139 .000 14C.0C0 141 .000 142 .000 143 .000 144.COO 145 .000 146.CCO 147 .000 148.CCO 149 .000 145 0035 003b 0037 0038 0039 0040 0001 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 00 31 0032 0033 0034 0035 0036 0001 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 002b 0027 DU 8 J=1,KEl DO 8 K=1,N0UANT 8 PRCCND(I,J,K) = (PHCCKI (I,J,K) + 1. ) / (PRCL AS (I) *FLOAT (NQUANT) ) 7 PRCLAS (I) =(PRCLAS (I) • 1.) / (S*5.) RETURN END SUBROUTINE TEST(LOW,IENt,NEL,IPRINT,IEBOB) C INTEGER IFLAG(5) .IX (500 ,80) , LEV (500) , NUHP (500) REAL CLASSt! (5, 5) ,PRCOND (5,80, 128) .PRCLAS (5) ,PTEST (5) COMMON /CPAIN/ IX,LEV,NUME COMMON /TST/ PRCOHD,PRCLAS,IFLAG COMHCN /PRNT/ CLASSH C C INITIALIZATION CN FIRST SUES CALL: IF(LOW•NE.1)GO TO 1 DO 2 1=1 ,5 DO 2 J=1 ,5 2 CLASSM(I,J)=0. C C GET CLASS CONDITIONAL ERCE ESTIMATES ICE TESTING SAMPLE (S): I DO 10 I=LGW,IEND IF (IFLAG ( (LEV (I) •!) ) . EC. 1) GO TO 11 DO 3 K=1,5 3 PTEST ( K ) =0. DO 4 ICLASS=1,5 DO 4 ISL=1,NEl 4 PTEST (ICLASS)=PTEST (ICLASS)*ALOG (PRCOND (ICLASS, IEL , IX (I.IEL) ) ) C C INCLUDE A PRIORI CLASS PROB'S AND ESTIMATE ANESTHESIA LEVEL: IF (IPRCE. EO.O) GC TC 5 DO 6 ICLASS=1,5 .6 PTEST (ICLASS).= PTEST (ICLASS) • ALO G (PRCLAS (ICLASS) ) 5 IR=1 DO 7 ICLASS=2,5 • 7 IF (PTEST (ICLASS) .GT.PTEST (IR) )IR = ICLASS C C UPDATE CLASSIFICATION MATRIX AND PRINT RESULTS IF DESIRED: I I = IEV(I) *1 CLASSM (II,I9)=CLASSH (II,IB)*1. IF (IPRI NT. NE.O) GC TC 10 IRR=IR- 1 IF ( I I . NE. IR) WRITE (6.8) I.LIV (I) , IRR.NUMF (I) IF (II.EQ. IR) WRITE (6 ,9) I , NUMP (I) ,L IV (I) I I IF(IFLAG((LEV(I) • 1) ) .EQ. 1) WRITE (6 , 12) LEV (I) 12 FORMAT (' LEVEL',12,' NCT TESTED: CNLY CNr SAMPLE*) 8 FORMAT(5X,13, • WAS HISCLASSIFIED • ,13 , • — > ' ,11,5X. • t • ,13) 9 FORMAT(5X,I3,' (t',I3,«) IS OK: LEVEL",12) 10 CONTINUE RETURN END SUBROUTINE ERINT(NSAME,NEL,NQUANT,IPRCE,NPTNT) n REAL CLASSH(5,5) ,TCTAL(5) ,TOK/0./,TCT/0./ COMMON /PRNT/ CLASSM WRITE (6 ,10) NPTNT 30 FORMAT (/SX,'SUBJECT NUMBER: ',13) WRITE (6 , 12) NS A MP 12 FORMAT (5X , 'TOTAL NUMBER OF PATTERN SA MPLES= ', 13) WRITS(6,15) 15 FORMAT (SX ,' METHOD CF EEFFCRMANCI ESTIMATION: "U» MFTHOE" •) 16 FORMAT(5X,'METHOD OF PERFORMANCE ESTIMATION: "PI METHOD"') IF (IPROB. KE.O) WRITE (6,13) -IF (IPROE. EQ .0) WHITE (6, 14) 13 FORMAT (SX ,' UNEQUAL A FFICFI CLASS F EC I AE IL IT IIS WIRE USED') 14 FORMAT(5X,'EQUAL A PRIORI CLASS PROBABILITIES WERE USED') WRITE (6 ,17) NEI, NQUANT 17 FOEMAT(5X,I2,• ELEMENTS IN FEATURE VECTOR WITH',14,' QUANTIZATION 1LEVELS FES FEATUBE') DO 50 1=1 ,5 -50 TOTAL (I) =0. OK = 0 . WRITE(6,18) 18 FORMAT (//10X,1 CLASSIFICATION MATRIX:'//) DO 19 1=1,5 DO 20 J = 1 ,5 20 TOTAL (I) =TOTAL (I) *CLA5SH (I,J) OK = CK*CLASSr (1,1) 19 WRITE(b,21) (CLASSM (I.J) , J = 1, 5) ,TOTAL (I) T = TCTAL (1 ) *TOTAL (2) «TCTAL (3) «TCTAL (4) .TOTAL (5) I S C . 0 0 0 151 .000 152.COO 153 .000 154.COO 155 .000 156 .000 1 5 7 . CCO 158 . CCO 159 .000 160 .000 161.CCO 162 .000 163.000 164.000 165 .000 166.000 167 .000 168.COO 169 .0C0 170 .000 171.CCO 172 .000 173.CCO 174.000 175.COO 176 .000 177.CCO 178 .000 1 7 9 . CCO 180.000 181.COO i e 2 . 0 0 0 183.COO 184 .000 185.COO 186 .000 187.CCO 188.0C0 189 .000 190 .000 191.CCO 192 .000 193.COO 194 .000 195.COO 196 .000 1 9 7 . CCO 198 . COO 199 .000 2CC.CC0 201 .000 2C2.0C0 203 .000 204.CCO 205 .000 2C6.CC0 207 . 000 208.CCO 209 .000 21C.CC0 211 .000 212.CCO 213 .000 2 1 4 . COO 2 1 5 . COO 2 1 6 . CCO 217 .000 218.CCO 219 . 000 2 2 0 . COO 2 2 1 . COO 2 2 2 . COO 223 .000 224.COO 225 . 000 2 2 6 . COO 2 2 7 . COO 2 2 8 . CCO 229 .000 2 3 0 . 0 0 0 & o o o o o o o o £ W Ul U» o o o o o o o o o o w ui w ui UJ CM.n c u M O O O o o o o o Ul Ui K J Ki -* LT M m* ro ~ * ru so 1-3 ^ r i M 1 C U "J o *> O O O O =c W C O H » H C 50 M II 50 G t« H X 3 H li ii n ^ n a > m > rn H H ri C ! • H I Z • -3 « C ^Hwa-.o'. II • * • \ • • M X . » x L / i H 3 H o n \ M n o * _» n 5t H \ IV « X ' f Ln — \ « • • H •< X Ln # O « • * TJ w « » PC * - m # m « O \ » a o w o w # n o • H O • • Z O K! . *** - H • ^ » * * •rl O o C= 9 « X O Ul •*! n • w M K J K H O N } K ) K I M M M K I K ) M M M K ) C C C C C C C l J U U I U I I i l U I J l i l l i l O O O O O O r t O O O O O O O O O ooo o o o o o o o o o o o o o o o o o o o o o o o o o o o o o ON 147 APPENDIX H EVALUATION OF K-S STATISTICS FOR EEC AMPLITUDE DISTRIBUTIONS OOOI 0002 0003 0001 0005 0006 0007 000b 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 ""APpiMDIx"H"~IvALUAT^ 11G ANPLITUEI DISIBIE'E THIS P MO GRAM CALCULATES D1 (FOR GAIJSSIA HIT*) AND D2 (FCR FIRST-CBCE3 STATIONARITY) FOR EEG CATA SAMPLE! AT A FATE OF 64 HZ. TES DATA FAS PREVIOUSLY DEES (DIGITALLY) HP FILTERED AT 0.54 HZ AND LP FILTERED AT 30.0 HZ. INPUT: OUTPUT: •LUNIT 3: INPUT DATA TAPE • LUNIT 5: NUMEEBS CI THE T AF E FILES TO BE ANALYSED • LUNIT 1 : K-S C1 VALUES •LUNIT 2: K-S D2 VALnES LAST UPDATE: JUNE 25 1974 C c c c INTEGER 11/1/,12/2/,KFEC/O/ REAL XA(4O6),XB(4 09b),D(7,2,64,6C) INTEGER NSAMP/81 92/,fFLAG/0/,NCFA N/4/ REAL DATA (8192) -COMMON /CAT A/ CATA,INC EX F IN DEXF=0 SIGLEV = 0.05 SRATE=64. INPUT ONE CHANNEL OF DATA AND CHANGE SA RATE 3 CALL INPUT (NFIAG,NCHAN) IF (NFLAG. EQ. 1) GO TO 44, HREC=NREC«1 DO 10 K = 2,H192,2 KK=K/2 10 DATA (KK) =DATA (K) TEST SEGMENTS OF 2»»N SEC DURATION, N = 0 6 DO 1000 K=1,7 NS EC=2*» (K- 1) N= (NS2C«SBATE) »0. 1 NQ=N-1 MQ= (N/2J-1 CALL KS(HQ,SIGLEV.I1.DTHE01) CALL KS (MQ , SIGLEV , 12 , CT H5C2) WRITE (6, 1 11) NSEC, NQ,MQ,0THSO1 .DTHE02 111 FORMAT (• NSEC=<,I3,' JIC=•,15, • MC=',I5,' 1F9.6,' U2=',F9.6) DO 4 JJ=NSEC,64,NSEC LLIB= (JJ-NSEC) *SBATI*0. 1 INDFX=JJ/NSEC DO 5 JJJ=1,N XA (JJJ) =DATA (IIIR*JJJ) 5 XB (JJJ) = DATA (LLIfl+JJJ) C CALCULATE THE D VALUES AMD STOBE THEM M=N/2 CALL CDFDEV (XE (1) ,XE (H*1) ,H,D2) CALL DNCBMC (XA,Xt,N,E1) C(K,I2 INDEX,NREC) =D2 4 D(K,I1,INCEX,NBEC)=C1 1000 CONTINUE GO TO 3 C C OUTPUT ALL D VALUES 44 DO 45 K=1,7 LIM=64/ (2»* (K-1) ) DO 45 IREC=1.NREC WRITE (II,46) (E(K,I1,LL,IBEC) ,LL»1,LI1) E1 = 1.000 2 .000 3.000 4.CCO 5.OCO 6 .000 7 .000 e.cco 9 .000 1 C C 0 0 11 .000 12.COO 13 .000 14.COO 15 .000 16.COO 17 .000 18 .000 19 .000 2C .C00 21 . 000 22.COO 23 . 000 24.COO 25 . 000 26.COO 27 .000 28.COO 29 . 000 3C.C00 31 . 000 32.COO 33 . 000 34.OCO 35 . 000 36 . 000 37 . 000 38.COO 39 .000 4C .C00 41 . 000 42.COO 43 . 000 4 4 . COO 4 5 . CCO 46 . 000 47.CCO 48 .000 49.COO 50 .000 SI .COO 52 . 000 53 . 000 54 . 000 55.COO 56 . 000 £7.000 58.COO £9.000 6 0 . 0 0 0 6 1 . 0 0 0 6 2 . 0 0 0 63 . 000 64.COO 6 5 . 0 0 0 6 6 . 0 0 0 6 7 . 0 0 0 68.COO 148 o o a i 0042 0043 0044 0001 0002 0003 0004 0005 0 0 0 6 0007 0 0 0 8 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0001 45 46 0002 0003 0004 0005 000b 0007 0 0 0 8 0009 0010 001 1 0012 0013 0014 0015 0016 0017 0 0 1 8 0019 0001 0002 0003 0004 0005 0006 0007 20 12 14 10 c c c c c c c c c c 10 1 100 WRITE(I2,46) (D(K,I2,LL.IREC) ,LL=1,LIH) FORMAT (64 FH.6) STOP END SUBROUTINE INPUT (NPLAG,ICH) BEADS IN ON £ CHANNEL OF DATA SAMPLED AT 128 HZ. REAL DATA (8192) COMMON /DATA/ D AT A,INE EX f INTEGER*2 BLOCK (2048) ,LEN 1 LUNIT=3 NSKIP=0 READ THE FILE NO READ (5 .20 ,END=10)NPIII FO RM AT ( 15) WRITE (6,12) NFILE FORMAT ( ' »••»•, 15) PREPARE TO SKIP TO THE APPROPRIATE FILE ITEMP=NPIIE-INDEXF-1 CALL SKIP(ITEMP.NSKIP.LONIT) INDEXF=NFILE-1 DO 14 IELK=1,16 INCX=(IBLK-1) *512 CALL READ (BLOCK, LEN1 .0.LINE1 ,IUNIT,£10) DO 14 ISAH=1,2048,4 IR=ISDX*1*(ISAM-1J/4 IRR= (ICH- 1) *ISAH DATA (IR) = bLCCK (IBB) RETURN NFLAG=1 RETURN END SUBROUTINE DNCBME(X1,X2,N,E) THIS SUBR EEHFCRMS THE FCLLCWISG ECNS: 1. COMPUTES THE CDF FOR DATA IN X I 2. GETS S A M.F 1E MEAN AND V A S VIA "STAT" 3. CALCULATES A CDF FOR THE COR 3ESPONDING ' NORMAL DISTN 4. FINDS THE MAX DEV BETUEZN THE TWO COP'S REAL X I (N),X2 (N) ID = 0 BN = N FIRST,COMPUTE THE DIST FCN BY SORTING ARRAY VAL'S CALL SSC3I(X1,N,3,C10,G10) GO TO 2 WRITE (6,1) FORMAT (' ••** SORTING ERROR •••••) RETURN CALC A CCF FOR A NORMAL CIST WITH SAMPLE MEAN AND VARIANCE. ! CAIL STAT ( X I ,N, AVER,SCIV) DO 100 J J = 1.N ZUL= ( X I (OJ) -AVERJ/SCEV X2 (JJ)=0.5« ERF (ZUL/ 1.4 1421) *0.5 NEXT,FIND MAX DEV BETWEEN ARRAY INDICES FOR EACH SUCCESSIVE VAL OF X,USING X1 AS THE STANCAFC. NCT E: ARRAY INCIX 1->N IS IQUIV TO 0->N-1 OS 0->1 D=0. DO 3 J=1,N DEV=ABS ( (FLOAT (J) /FLCAT (N) ) -X2 (J) ) IF (CEV. GT.D) D=DEV RETURN END SUBROUTINE STAT (ARRAY,N,AVER,SDEV) THIS SUBR COMPUTES THE MEAN AN C STANEARE EIVIATICK CF THE SAMPLES STORED IN ARFAY(N) C INITIALIZATION DIMENSION ARRAY (N) SUH=0. SVAH=0. RN = N C C MEAN: DO 1 J«1,l 1 SUM^SIM «.\RPAY (J) 6 9 . 0 0 0 7 C . C 0 0 7 1 . COO 7 2 . CCO 7 3 . CCO 7 4 . 0 0 0 7 5 . C O O 7 6 . 0 0 0 7 7 . C O O 7 8 . 0 0 0 7 9 . CCO 8 0 . COO 8 1 . 0 0 0 8 2 . 0 0 0 8 3 . C C O 8 4 . 0 0 0 8 5 . 0 0 0 8 6 . 0 0 0 8 7 . C C O 8 8 . 0 0 0 8 9 . C O O 9 0 . 0 0 0 9 1 . C O O 9 2 . 0 0 0 9 3 . COO 9 4 . COO 9 5 . COO 9 6 . 0 0 0 9 7 . CCO 9 8 . COO 99 .COO 1 0 0 . 0 0 0 1 0 1 . C C O 102 .000 103 .COO 104 .000 105 .OCO 1 0 6 . C C C 1 0 7 . 0 0 0 1 0 8 . CCO 1 0 9 . CCO 1 1 C . C C 0 111 .000 1 1 2 . C C O 113 .000 1 1 4 . C C O 1 1 5 . 0 0 0 1 1 6 . CCO 117 . COO 1 1 8 . CCO 1 1 9 . 0 0 0 1 2 C . C C 0 1 2 1 . 0 0 0 1 2 2 . C C O 123 .000 1 2 4 . C C O 125 .000 126 .COO 127 .000 1 2 8 . C C O 1 2 9 . 0 0 0 1 3 0 . CCO 1 3 1 . COO 132 . CCO 133 .000 134 .COO 135 .000 136 .COO 137 .000 1 3 8 . C C O 139 .000 1 4 C . C C 0 141 .000 1 4 2 . 0 0 0 143 .000 1 4 4 . C C O 1 4 5 . 0 0 0 1 4 6 . C C O 147 .OCO 1 4 8 . C C O 149 .000 1 5 C . 0 C 0 151 .OCO 1 5 2 . C C O 153 .000 154 .COO 149 0008 0009 0010 001 1 0012 001 3 0014 001b 0001 0002 000 3 0004 ooos 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0001 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0 0 1 5 0016 0017 0018 0019 0020 0021 0022 0023 0024 AVER = SU«/BN SAMPLE VARIANCE: OO 3 L=1,N Z= ARRAY (L) -AVER SVAR = 5VAR»Z*Z SVAR=SVAR/(RN-1.) S DEV=SQRT (SV AB ) RSIUR N EN n SUBROUTINE KS(NSARE,SIGLIV,NSIZIS,ICR IT) THIS SUBH FINDS THE CRIT VALUE CF I FOB TEE ONE-SAHPLI . OR 2-SAMPLE K-S TEST AT THESE LEVELS CF SIGNIFICANCE: /O.01,0.05,0.10,0.15,0.20 / VALUES FOR THE 0NS-5AKPLE TEST ARE FROM JASA.P399, 1967. VAI.'JES FCR 2-SAITFLS TEST FFC.1 AN . N . ST AT . , P2 7 9 , 194 8 . RESTRTCTIONS:SAMPLES MUST BE GREATER THAN 100 AND IK THE 2-SAKFLE TEST,SIZES MUST EE EQUAL. REAL DNKS(5)/I.031,0.886,0.805,0.768,0.736/ REAL TWOKS(5)/1.63,1.36,1.22,1.14,1.07/ 1=0 HN=NSAHP RO0T=SQRT (RN) IF(SIGLEV.EQ.0.01)1=1 IP (SIGLEV.EQ.0.05)1=2 IF (SIGLEV.EQ.0. 10) 1=3 IF •(SIGLEV.EQ.0.15)1=4-IF (SIGLEV.EQ.0.20) 1 = 5 IF (I.EQ.O)WRITE (6,1) 1 FORMAT(• •*» ERROR IN KS »•• •) C C C C c c C GOODNESS OF FIT TEST (WITH MEAN AND VAR UNKNOWN) IF (NSIDES.EQ.2)GC TC 2 IF (NS I DES. HE. 1) WRITE (6, 1) DCRIT = DNKS (IJ/RCCT RETURN TWO SAMPLE TEST (EQUAL SAMPLE SIZES) FA CTCR=SC FT (2./BN) DCHIT=FACTOR»TWOKS (I) RETURN EN D SUBROUTINE CDFDEV (X1,X2, N, C) THIS SUBR TAKES TWO ARB ATS CF EQUAL S1Z E, COMPUT IS TEE CIST FCN FOR EACH,AND THEN CALCULATES THE MAXIMUM-DEVIATION BETWEEN THE TWO LIST FCNS....JAN 23.197' . BEAL XI (N) ,X2 (N) 10 = 0 .'IRST,COMPUTE THE 2 DIST FCNS BY SORTING ARRAY VAL'S CALL SSCRT (XI ,N,3 ,610,C10) CALL SSORT (X2,N,3,E10,610) GO TO 2 10 WRITE (6,1) 1 FORMAT( • »*»* SORTING ERROR »•**•) BETUBN : NEXT,FIND MAX DEV- BETWEEN ARRAY INI3CES FOR IACF. SUCCESSIVE VAL C OF X,USING XI AS THE STANDARD.NOTE:ARRAY INDEX 1->N IS EQUI? TO : O->N-I os o->i 2 DO 3 J=1,N XTEMP=X1 (J) DO 4 K=J,8 IF(X2(K) .GE.XTEHP) GO TO 7 4 CONTINUE 7 DO 6 IZZ=1,K IZ=IZZ-1 IF(X2(K-IZ) ,LE.XTEMP)GO TO 5 6 CONTINUE 5 IDTEMP=IAtiS (J-K*IZ) IF (IDT EM P. GT. ID) ID = IDTE(1P 3 CONTINUE : NOW,COMPUTE THE TRUE VAL CF DEVIATION C FOR USE IN 2 SAMPLE : K-S TEST. D=FLCAT (I C)/FLOAT ( (N-1) ) RETUttN END 155 .000 156 . COO 157. COO 1 5 8 . CCO 159 . COO 160 . CCO 161 .000 162.COO 163.0C0 164 .000 165 .000 166 . 0C0 167. CCO 168.0C0 169 .000 170.CCO 171.00C 172.CCO 173 .000 174.CCO 175.0C0 176.0C0 177 .000 178.CCO 179 .000 180 .000 181 .000 182.COO 183 .000 184.COO 185 .000 186.COO 187 .000 188 .000 189 .000 19C.C00 191 .000 192.0C0 193.000 194.COO 195 .000 196.CCO 197.OCO 198.CCO 199 .000 200 .000 201.CCO 202 .000 2C3.C00 204 .000 205.COO 206.OCO 207 .000 2 0 8 . COO 2 0 9 . COO 210 .000 211.COO 212 .000 213.COO 214 .000 21S .0C0 216 .000 2 1 7 . COO 218 . CCO 2 1 9 . CCO 220 .000 2 2 1 . COO 222 . COO 2 2 3 . COO 224 .000 225 .000 226 .000 227 . 000 228 .000 229.COO 230 .000 231 . 000 232 . COO 2 3 3 . COO 234 .000 235.COO 236 .000 237.CCO 238 .000 239.COO 150 APPENDIX I EVALUATION OF K-S STATISTICS FOR EEG SPECTRAL DISTRIBUTIONS 000 1 0002 0003 0004 0005 000b 0 0 0 7 0008 0009 0010 0011 0012 0013 0014 0 0 1 5 0016 0 0 1 7 0018 0019 002 0 0021 0022 0023 0024 0 0 2 5 0026 0027 0 0 2 8 0029 0030 0031 0032 0 0 3 3 0034 0035 0036 0 0 3 7 0038 0 0 3 9 004 0 004 1 0042 0043 C _ c c c c c c c c c c c c c_ c" A P P E N D I X I E V A L U A T I O N O P K -STATISTICS FOB IEG SPECTRAL OIETHIE'E T H I S P R O G R A M C A L C U L A T E S D 2 ( F O R S P E C T R A L D I S T R I B U T I O N F U N C T I O N S ) F C R E E G D A T A S A M P L E D A T A R A T E C E 1 2 8 H Z . T H E C A T A H A S P R E V I O U S L Y B E E N ( D I G I T A L L Y ) H P F I L T E R E D A T 0 . 5 4 H Z A N D L P F I L T E R E D A T 3 C . C H Z . I N P U T : • L t K U T 3 : I N P U T D A T A T A P E • L U N I T 5 : N U M B E R S O F T H E T A P E F I L E S T O B E A N A L Y S E D O U T P U T : * L U K I T 2 : K - S E 2 ( S P E C T R A L ) V A L U E S L A S T U P D A T E : J U N E 2 5 1 9 7 4 I N T E G E R 1 1 / 1 / , 1 2 / 2 / . N R E C / 0 / R E A L S M C O I H ( 2 0 4 9 ) , S 2 ( 2 0 4 9 ) , E ( 7 , 6 4 , 6 0 ) C O M M O N /S1100TH/ S M O O T H I N T E G F R N S A M P / 3 1 9 2 / , N F L A C / 0 / , N C F A N / 4 / R E A L D A T A ( 8 1 9 2 ) , D A T B ( 4 0 9 8 ) C O M M O N / T H A N / D A T E C O M M O N / D A T A / D A T A , I N D E X F I N D E X F = 0 S I G L E V = 0 . 0 5 S R A T E = 1 2 8 . : I N P U T C N E C H A N N E L O F , C A T A , . 3 C A L L I N P U T ( M F L A G , N C H A N ) I F ( N F L A G . E Q . 1) G C T C 4 4 N R E C = N R E C • 1 : T E S T S E G M E N T S O F 2 * * N S E C D U R A T I O N , N = 0 . . . . , 6 D O 1 0 0 0 K = 1 , 7 N S E C = 2 * * ( K - 1) N = ( N S E O S R A T E ) » 0 . 1 I S P E C = ( N S E C » 6 4 ) / 2 » 1 N X = N S E C » 1 . I X = I S P E C - ( 2 * h S E C ) I S T H E O = I X - N X C A L L K S ( I S T H E C , S I G L E V , I 2 , E T H E C B ) W R I T E ( 6 , 1 1 1 ) N S E C , I S T H S O , D T H E O R 111 F O R M A T { ' N S E C = ' , 1 3 , ' 1 S T H E C = • , 1 5 , • C T F . I O R = • , F 9 . 6) D O 4 J J = N S E C , 6 4 , N S 5 C L L I H = ( J J - N S E C ) * S K A T E » 0 . 1 I N D E X = J J / N S E C : C A L C U L A T E T H H D V A L U E S A N C S T O R E T E E M : N O T E : O N L Y T H E S P E C T R A L V A L U E S F R O M 1-30 H Z A B E C O M P A R E D . M = N / 2 D3 = 1. D O 3 3 J = 1 , H 3 3 D A T B ( J ) = D A T A ( L L I M + J ) C A L L S P E C T ( M . S H A T E ) D O 3 3 1 J = 1, I S P E C 331 S 2 ( J ) = S M O O T H ( J ) D O 3 3 2 J = 1 , M 3 3 2 D A T B ( J ) = B A T A ( L L I f l * M * J ) C A L L S P E C T ( M , S R A T E ) C A L L C D F D E V ( S M O O T H ( N X . ) , S 2 ( N X ) , I X , D 3 ) 4 D ( K , I N D E X , N P E C ) = C 3 1000 C O N T I N U E G O T O 3 : O U T P U T A L L D V A L U E S 4 4 D O 4 5 K = 1 , 7 L I M = 6 4 / ( 2 « * ( K - 1 ) ) D O 4 5 I B E C = 1 , N R B C 1. C00 2 . CCO 3 . COO 4 . CCO 5 . 0 0 C 6 . C O O 7 . 0 0 0 8 . C C O 9 . 0 0 0 1 C . 0 C 0 11 .000 1 2 . C C O 13 .000 1 4 . C O O 15 .000 16 .COO 17 .000 18 .COO 19 .000 2 0 . C O O 2 1 . 0 0 0 2 2 . COO 2 3 . COO 2 4 . COO 2 5 . 0 0 0 2 6 . O C O 2 7 . 0 0 0 2 8 . C C O 2 9 . 0 0 0 3 C . C C 0 3 1 . 0 0 0 32 .COO 3 3 . 0 0 0 3 4 . C C O 3 5 . 0 0 0 3 6 . C O O 3 7 . 0 0 0 3 8 . C C O 3 9 . 0 0 0 4 C . C C 0 4 1 . 0 0 0 4 2 . C O O 4 3 . 0 0 0 4 4 . C C O 4 5 . 0 0 0 4 6 . C O O 4 7 . 0 0 0 4 8 . COO 4 9 . CCO 5 C . C C 0 5 1 . 0 0 0 5 2 . C C O 5 3 . 0 0 0 5 4 . C O O 5 5 . 0 0 0 5 6 . C C O 5 7 . 0 0 C se.cco 5 9 . 0 0 0 6 0 . 0 0 0 6 1 . COO 6 2 . COO 6 3 . 0 0 0 6 4 . C O O 6 5 . 0 0 0 6 6 . C O O 6 7 . 0 0 0 68.CCO 151 ouu 0045 0046 0047 OOOI 0002 00 OJ 0001 000"> 000b 0007 0008 0009 001C 001 1 0012 0013 0010 0015 0016 0017 0016 0019 0020 0021 0022 0023 0024 0025 0026 0027 0026 0029 0030 0031 0032 0033 0034 0035 003b 0037 0 0 3 8 0039 0001 0002 0003 0004 0 0 0 5 0006 0 0 0 7 0006 0009 0010 0011 0012 0 0 1 3 0014 0015 001b 0017 00 18 0 0 1 9 0020 c c c 45 NRITE(I2,46) (C(K,IL,IRIC) , t i * 1, l If!) 46 FOHHAT (64F8.6) STCP END SUBROUTINE SPECT(N,SRATI) C COMPUTES THE POWER SFECTRUH VIA MITHOI OF CUM ERflUTH IT AL, C IEEE TRANS AUDIO DEC '70. COBPLEX THAN (2049) REAL DATA (4096) COBSCN / TRAN / TRAN EQUIVALENCE (TRAN,DATA) REAL SMCCTH (2049) COMMON / SMOOTH / SMOOTH INTEGER NN(1) REAL PI/3.141592/ C C WINDOW DATA BEFORE FFT...SES EEG HANDBCCK,VS-A.P50 ILIM=(N/10)+1 LIHUP=M-LLIM XINT=PLCAT (LLIH) DO 1 IQ=1,LLIM 1 DATA (IQ) = DAT A (IQ) *0.5* (1. - COS (P I* fLCAT (IQ) /X INT) ) DO 2 IQ=L1MUP,N 2 DATA (IQ) = DATA (IQ) *0.5* (1. -COS (PI*FLCAT (N-IQJ/XINT)) C C GET RAW SPECTRAL ESTIMATES VIA FFT NN(1)=N ISIGN=-1 CALL FOUR2(DATA,NN, 1,ISIGN.O) DE LT=1./S FAT E C NOTE:EXTRA FACTOR HEEDED BECAUSE OF TAPER ; (SPECTRA ABE 1-SIDEE) FACTCR= (D£LT/FLCAT (N) ) * 1 • 14625 MID=N/2*1 DO 99 1=1.MID T= CABS (TRAN (I) ) DATA (I),=T * T * F A CT C B 99 CONTINUE ' SMOOTHED SPECTRAL ESTIMATES OBTAINED VIA SQUARE WINDOW (2W*1)=7 THE FIRST AND LAST 3 FONTS ARE NCT SHCOTEEI DO 52 1=1.3 52 SMCCTH (I) = DATA (I) DO 11 1=1,3 11 SMCCTH (MIE-3»I) = CATA (MIE-3*!) LIB=BID-3 DO 50 1=4,LIB SDK=0. DO 51 J=1,7 51 SUM=SUM*DATA ( (1-1) J-3) SHOOTH(I) =SUB/7. 50 CONTINUE • RETURN END SUBROUTINE INPUT (N FLAG, ICH) : BEADS IN CNE CHANNEL CE C AT A SAMPLE! AT 128 EZ. REAL DATA (8192) COMMON /DATA/ DATA,INDEXF INTEGER*2 BLOCK (2048) ,LEN1 LUNIT=3 NSKIP=0 : BEAD THE FILE NO READ (5,20,END=10)NFILE 20 FORMAT(15) WRITE (6, 1 2) NFILE 12 FORBAT( • *•«•',15) : PREPARE TC SKIP TC THE AEEROPBIAT! I1LI ITEMP=NFILE-INDEXF-1 CALL SKIP (ITEPP, tiSKIF, LUNIT) IN DEX F=N FIL E- 1 DO 14 IBLK=1,16 INDX= (IBLK-1) »512 CALL READ (HLOCK, LEN 1,0,LIN5 1,LUNIT,6 10) DO 14 ISAM=1,2048,4 IR = IN DX «1 • (ISAM-1 )/4 IRR= (ICH- 1) »ISAH 14 DATA (IR) = bLCCK (IRB) 6 9 . 0 0 0 ' 7 C . C C 0 7 1 . 0 0 0 7 2 . C C O 7 3 . 0 0 0 7 4 . CCO 7 5 . COO 7 6 . CCO 7 7 . 0 0 0 7 8 . C C O 7 9 . 0 0 0 8 0 . COO 8 1 . COO 8 2 . 0 0 0 8 3 . 0 0 0 8 4 . C O O 8 5 . 0 0 0 86 .C O O 8 7 . 0 0 0 8 8 . CCO 8 9 . 0 0 0 9 0 . O C O 9 1 . 0 0 0 9 2 . C O O 9 3 . 0 0 0 9 4 . C O O 9 5 . 0 0 0 9 6 . 0 0 0 9 7 . 0 0 0 9 8 . 0 0 0 9 9 . 0 0 0 1 C 0 . C C 0 101 .000 102 .COO 103 .000 104 .COO 1 0 5 . 0 0 0 1 C 6 . C C C 107 .000 1 0 8 . C C O 109 .000 1 1 C . C C 0 111 .000 112 .COO 1 1 3 . 0 0 0 1 1 4 . C C O 1 1 5 . 0 0 0 116 .COO 117 .000 1 1 8 . C C O 1 1 9 . 0 0 0 120 .COO 121 .000 1 2 2 . 0 0 0 1 2 3 . COO 124. COO 1 2 5 . CCO 126 .000 127 .COO 128 .000 1 2 9 . 0 0 0 130 .000 1 3 1 . 0 0 0 132 .000 133 .COO 1 3 4 . 0 0 0 135 .COO 136 .000 137 .COO 1 3 8 . 0 0 0 139 .COO 140 .000 141 .COO 142 .000 143 .COO 1 4 4 . 0 0 0 145 .COO 146 .000 1 4 7 . COO 148 . CCO 1 4 9 . 0 0 0 150 .000 152 0021 0022 0023 0024 0001 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 00 IK 0015 0 0 0 1 0002 0003 OOOU 0005 0006 0007 000b 0 0 0 9 0010 0 0 1 1 0 0 1 2 0013 0014 0015 0016 0017 0018 0019 0020 0021 0001 0002 0003 0004 0005 0006 0007 0008 0009 RETURN 10 NFLAG=1 RETURN END SUBROUTINE S T A T ( A B B A Y , N , A V F B , S E I V ) : THIS SUBR COMPUTES THE MEAN AND STANEABE I IV IAT ION OF 1EE : SAMPLES STORED IN ARRAY (N) : I N I T I A L I Z A T I O N DIMENSION ARRAY (N ) SUB=0. SV»R=0. HN = N MEAN: DO 1 J = 1 , N 1 SUM=SUM*APRAI(J) AVER=SOH/RN C ' " . C SAMPLE VARIANCE: DO 3 L=1,N Z-ARRAY (L ) -AVER 3 SVAR=SVAB*Z*Z SV AR=SVAR / (RN - 1 . ) SDEV=SQBT (SVAB) RETURN END SUBBOUTINE KS(NSAMP.S IG IEV ,NSIDES ,DCHIT ) C C C c c c c c c 10 1 THIS SOBB FINDS THE CRIT VALUE OF D FOR THE CNE-SAMPLE OS 2 -SAMPLE K-S TEST AT TF.ISE LEVELS Of S IGNIF ICANCE: / O . 0 1 , 0 . 0 5 . 0 . 10,0. 15.0 .20 / VALUES FCR THE CNE-SAMFLE T EST ARE FROM JAS A , P 3 9 9 , 1967. VALUES FOR 2-SAMPLE TEST FROM AN . fl . 3T AT . , P 27 9 , 194 8 . RESTRICTICfcS:SAMPLES MUST EE GREATER T F AN 100 ANE IN THE 2-SAMPLE TEST,SIZES MUST BE EQUAL. REAL DNKS ( 5 ) / 1 . 0 3 1,0.8 8 6 ,0 . 8 0 5,0.7 6 8 ,0 . 7 3 6 / REAL TWCKS (5) /-1 . 6 3 , 1 . 3 6 , 1 . 2 2 , 1 . 14,1.0 7 / 1=0 BN=NSABE BOOT = SQRT (RN) IF(SIGLEV.E3w6.0i ) I= 1 IF(SIGLEV.EC.0.05)1=2 IP (SIGLEV. EQ.O. 10)1 = 3 IF(SIGLEV.EC.0.15)1=4 IF (SIGLEV.EQ .O.20)1 = 5 I F (I.EQ.O) WRITE ( b , 1) FOHMAT( 1 •** ERROR IN KS *•» *) GOODNESS CF F I T TEST (HITS MEAN ANE V AR UNKNOWN) I F (NSIDES.EQ. 2) GO TO 2 IF (NSIDES.NE.1) WHITE (6,1) DCBIT = DNKS( I ) /ROOT RETURN TWO SAMPLE TEST (EQUAL SAMPLE S I Z E S ) FACTOR=SQRT(2. /B;JJ DCRIT = FACTOB»TWOKS (I) RETURN END SUBROUTINE CDFDEV |X1,X2,N,D) THIS SUBR TAKES TWO ARRAYS OF EQUAL SIZE,COMPUTES THE CIST FCN FCR EACH,AND THEN CALCULATES THE MAXIMUM EEVIATION BETWEEN TEE TWO EIST P C N S . . . . J A N 2 3 , 1 9 7 4 . REAL X1 (NJ.X2 (N) ID = 0 FIRST,COMPUTE THE 2 EIST ICNS EY SCBTINC ARBAY V A L ' S CALL SSORT (X 1, N, 3 , 6 10 , S10) CALL SSCRT (X2 , N , 3 , 6 1 0 . 6 1 0 ) GO TO 2 «HIT2 (6 ,1 ) FOHMAT (• •»»• SORTING EEBCE *»•»') RETURN NEXT,F IND MAX DEV BETWEEN ARRAY INDICES FOB EACH SUCCESSIVE VAL OF X ,US ING X1 AS THE ST AN [ A f E. NCT E : AR R AY IN E EX 1->N IS EQUIV TO 151 .COO 152 .000 1 5 3 . COO 154. COO 155.OCO 156 .COO 1 5 7 . 0 0 0 1 5 8 . C C O 1 5 9 . 0 0 0 1 6 0 . 0 0 0 161 .000 162 .OCO 1 6 3 . 0 0 0 1 6 4 . 0 0 0 1 6 5 . 0 0 0 166 .COO 1 6 7 . 0 0 0 168 .COO 169 .000 1 7 0 . C C O 1 7 1 . 0 0 0 1 7 2 . C C O 173 .OCO 1 7 4 . C C O 1 7 5 . 0 0 0 1 7 6 . C C O 177 .OCO 17e.C00 1 7 9 . 0 0 0 1 8 0 . COO 181 . COO 182 . COO 183 .000 i e 4 . C C 0 185 .000 1 8 6 . COO 1 8 7 . 0 0 0 1 8 8 . COO 1 8 9 . COO 1 9 0 . COO 1 9 1 . 0 0 0 192. CCO 193 . COO 1 9 4 . COO 195 .000 1 9 6 . CCO 197 . CCO 198 .OCO 199 .000 2 C 0 . C C O 2 0 1 . 0 0 0 2 0 2 . COO 2 0 3 . COO 2 C 4 . C C 0 2 0 5 . 0 0 0 2 0 6 . C O O 2 0 7 . 0 0 0 2 0 8 . C C O 2 0 9 . 0 0 0 2 1 C . C C 0 2 1 1 . 0 0 0 2 1 2 . CCO 2 1 3 . COO 2 1 4 . 0 0 0 2 1 5 . C C O 2 1 6 . 0 0 0 2 1 7 . C O O 2 1 8 . 0 0 0 2 1 9 . C C O 2 2 0 . 0 0 0 2 2 1 . C C O 2 2 2 . 0 0 0 2 2 3 . C C O 2 2 4 . 0 0 0 2 2 5 . C C O 2 2 6 . 0 0 0 2 2 7 . C C O 2 2 8 . 0 0 0 2 2 9 . C O O 2 3 0 . O C O 2 3 1 . C O O 153 0010 0011 0012 0013 0010 0015 0016 0017 0018 0019 0020 0021 0022 0023 0020 C 0->N-1 OB 0->1 2 DO 3 J«l,l XTEHP=X 1 (J) DO 4 K=J,N IF (X2 ( X ) .GS.XTEBPJGC TC 7 4 CONTINUE 7 DO 6 IZZ=1,K IZ=IZZ-1 IF (X2 (K-IZ) .IE. XTEEF)GC TC 5 6 CONTINUE 5 IDTEKP'IABS (J-K»IZ) IF (IDTEBF.GT. ID) IC=IETIBE 3 CONTINUE : NOW,COMPUTE THE TRUE VAL OF DEVIATION D FOB USE IN 2 SAHFLE : K-S TEST. C= FLOAT (ID) /FLOAT ( (N- 1) ) RETURN END 232.000 233. COO 230.COO 235.COO 236.000 237.CCO 238.000 239.COO 240.000 241.COO 242.000 243.OCO 244.000 245.COO 246.000 247.000 248. C C J 249. COO 250.000 251 .CCO 252.000 154 APPENDIX J TESTS OF K-S STATISTICS OOOI 0002 0003 000<4 0005 0006 0007 000b 000 9 0010 00 1 1 0012 0013 0014 0015 001b 0017 0 0 1 b 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0 0 3 5 0036 0037 003b 0039 0040 0041 0042 C_ c c c c c c c c c c c c c c c c APPENDIX J TESTS OF K-S STATISTICS THIS PROGRAM INTERPRETS THE SIGNIFICANCE CF THE K-S VALUES PRODUCEE BY MEANS OF THE PROGRAMS L 1ST E E INPUT: IN "APFENEIX F" ANE "APPENDIX I". • LUNIT 1: K-S C1 (SMPL1TIIIE) VALUES •LUNIT 2: K-S D2 (AMPLITUDE) VALUES •LUNIT 3 : K-S E2 (SPECTRAL) VALUES OUTPUT: •LUNIT 7: •LUNIT 8 : •LUNIT 9: •LUNIT 10: LAST UPDATE: JUNE 28 1974 GAUSSIAN FERCENTPCES FIRST-ORDHR STATIONARY PERCENTAGES V1IEE-SENSE STATICNSRY PERCENTAGES W-S STATIONARY AND GAUSSIAN PERCENTAGES INTEGER I1/1/,T2/2/,L1/1/,L2/2/,L3/3/,L4/4/,ISKIP 1/30/,ISKIP/0/ REAL G(7}/7*0./,FS (7)/7*0./,!i'"S (7)/7*0./,wSSG (7)/7*0./ INTEGER IG(7)/63, 127,255, 51 1, 1023.2047,4095/ INTEGER IFS (7) /31 ,6 3 , 127, 2 55, 51 1, 102 3, 204 7/ INTEGER ISP(7)/29,58,116,232,464,928,1856/ REAL GKS(7),FSKS(/),SEKS(7),SIGL£V/0.0 5/,X(64),Y(fc4),Z(64) CALCULATE VALUES FCR K-S TESTS AT SCME SIGNIFICANCE LEVEL: DO 1 1=1,7 CALL KS(IG(I),SIGIEV,I1,GKS(I)) CALL KS (IFS ( I) ,SIGLEV,12,FSKS(I)) CALL KS (ISP (I) ,SIGLEV,I2,SFKS (I) ) HRITE(6,1U2)IG(I),GKS(T),IFS(I),FSKS(I),ISP(I),SFKS(I)-FOR MAT (' IG=',I5,' GKS=,,F8.6,' IES = ,,15,' ESKS=• , F8 . t, • I£P = 1 •, 15, • SPKS= ' , F b . 6) 102 C c 1 CONTINUE INPUT D VALUES ANE TEST TEEM: CALL SK IP (0, ISKIP, 1) CALL SKIP (0 ,ISKIP,2) CALL SKIP (0, ISKIP, 3) DO 44 J = 1 ,7 LIM = 64/ (2** (J-1).' DO 4 N=1,30 REACH, 100) (X (L),L=1,LIM) READ(2,100) (Y(L) ,L=1,Lir) REAL (3, 100) (Z (L) ,L=1,LI11) 100 FORMAT(64F8.6) DO 4 L=1,LIB IF (X (L) .LE.GKS (J) ) G (J) =G (J) *1. IF (Y (L) . IE. FSKS (J) ) F5 (J) = ES (J) «1. IF((Z(L).LE.SPKS(J)).AND.(Y(L).LE.FSKS(J)))HSS(J)=HSS(J)+1. IF ( (Z (I) .LE.SFKS (J) ). ANE. (Y (L). LE. FSKS (J) ) .ANE. (X (L) .LE.GKS(J))) 1HSSG(J) =WSSG(J) +1. 4 CONTINUE CALL SK IP (0, ISKIP 1, 1) CALL SKIP (0 ,ISKIE1 ,2) CALL SKIP (0 ,ISKIF1 ,3) 44 CONTINUE CALCULATE PERCENTAGES AND CORRECT FOR TYPE I ERRORS: CORREC=1.-SIGLEV DO 5 J= 1,7 DENCM=( (64*30.) / (2*« (J-1) ) ) «CCRBEC XX=J-1 G(J)=(G(J)/EENOM) •100. IF (G (J)'.GT. 100. )G (J) = 100. FS (J) = (FS (J)/C2NCM) *1C0. IF (FS (J ) .GT. 100. ) FS (J) = 100. WSS (J) = (WSS (J)/DENOM) »100. 1 .000 2 . C C C 3 . 0 0 0 4 . O C O £ . 0 0 0 6 . 0 0 0 7 . 0 0 0 8 . C O O 9 . 0 0 0 1 0 . C O O 1 1 . 0 0 0 12 . CO O 1 3 . 0 0 0 1 4 . 0 0 0 1 5 . 0 0 0 16 .OCO 17 . COO 1 8 . COO 19 .000 2 0 . C O O 2 1 . 0 0 0 2 2 . C O O 2 3 . 0 0 0 2 4 . C C O 2 5 . 0 0 0 2 6 . C O O 2 7 . 0 0 0 2 8 . C C O 2 9 . 0 0 0 3 0 . COO 3 1 . COO 3 2 . COO 3 3 . 0 0 0 3 4 . COO 3 5 . COO 3 6 . 0 0 0 3 7 . COO 3 8 . COO 3 9 . COO 4 0 . 0 0 0 4 1 . C O O 4 2 . O C O 4 3 . 0 0 0 4 4 . 0 0 0 4 5 . O C O 4 6 . 0 0 0 4 7 . COO 4 8 . COO 4 9 . COO 5 0 . 0 0 0 5 1 . C O O £ 2 . 0 0 0 5 3 . 0 0 0 5 4 . 0 0 0 5 5 . C O O 5 6 . 0 0 0 5 7 . C O O £ 8 . 0 0 0 £ 9 . 0 0 0 6 0 . COO 6 1 . COO 6 2 . 0 0 0 6 3 . 0 0 0 6 4 . 0 0 0 6 5 . 0 0 0 6 6 . 0 0 0 6 7 . 0 0 0 6 8 . 0 0 0 . 155 om 0044 0045 0 0 4 6 0 0 4 7 0 0 4 H 0 0 4 9 0050 0 0 5 1 0 0 5 2 0 0 5 3 0 0 5 4 0 0 0 1 C c 0002 0003 0004 0005 000b 0 0 0 7 0008 0009 0010 0011 0 0 1 2 0013 0014 0015 0016 0017 0 0 1 8 0019 0020 0021 5 1 3 1 4 1 5 C C c c c c c c c I F ( W S S ( J ) . G T . 1 0 0 . ) W S S |J) = 1 0 0 . W S S G (J) = ( W S S G ( J ) / D E N O M ) » 1 0 0 . P R E P A R E A P L O T P I L E : W R I T E ( 7 , 1 3 ) X X , G ( J ) , 1 4 W H I T E ( 8 , 1 3 ) X X , F S , ( J ) , L 3 W R I I E ( 9 , 1 3 ) X X . W S S j J ) , L 2 W R I T E ( 1 0 , 1 3 ) X X , W S S G ( J ) , L 1 F O R M A T ( 2 F 1 0 . 2 . 2 X . I 2 ) D O 1 4 J = 7 , 1 0 W H I T E ( J , 1 5 ) F O R M A T ( • S E N C F I I S * ) S T O P E N D .-"X S U B R O U T I N E K S ( N S A H P . S I G L E V , N S I D E S , D C H I T ) T H I S S U B R F I N D S T H E C R I T tfALUE O F D F O R T H E O N E - S A M P L E O R 2 - S A M P L E K - S T E S T A T T H E S E I E V 5 I S O F S I G N I F I C A N C E : / 0 . 0 1 , 0 . 0 5 , 0 . 1 0 , 0 . 1 5 , 0 . 2 0 / V A L U E S F C R T H E C N E - S A M E L E T E S T A R E F R O M J A S A , P 3 9 9 , 1 9 6 7 . V A L U E S F O R 2 - S A M P L E T E S T F R O M A N . M . S T A T . , P 2 7 9 , 1 9 4 8 . R E S I R I C T I C N S : S A K P L E S M U S T E E G R E A T E R T F A N 1 0 0 A N D I N T H E 2 - S A M P L E T E S T , S I Z E S M U S T B E E Q U A L . R E A L D N K S ( 5 ) / 1 . 0 3 1 , 0 . 8 8 6 , 0 . 8 0 5 , 0 . 7 6 8 , 0 . 7 3 6 / R E A L T W C K S ( 5 ) / 1 . 6 3 , 1 . 3 6 , 1 . 2 2 , 1 . 1 4 , 1 . 0 7 / 1 = 0 R N = N S A H P H O O T = S Q R T ( R N ) I F ( S I G L E V I F ( S I G L E V I F ( S L G L E V I F ( S I G L E V I F ( S I G L E V ,EQ.0.01)1=1 .EC.0.05)1=2 ,EQ.O.10)1=3 .EC.O.15)1=4 , EQ.0.20)1=5 I F ( I . E Q . O ) W R I T E ( 6 , 1 ) F O R M A T ( ' » * * E B F C R I N K S » « • *) G O O D N E S S C F F I T T E S T ( W I T H M E A N A N ! V A R U N K N O W N ) I F ( N S I D E S . E Q . 2 ) G O T O 2 I F ( N S I D E S . N E . 1 ) W R I T E ( 6 , 1 ) C C R I T = D N K S ( I ) - / R O O T -R E T U R N T W O S A M P L E T E S T ( E C U A L S A M P L E S I Z E S ) F A C T O R = S Q R T ( 2 . / R N ) D C R I T = F A C T C R * T S O K S ( I ) R E T U R N E N D 6 9 . CCO 7 0 . O C O 7 1 . C C O 7 2 . 0 0 0 7 3 . C O O 7 4 . 0 0 0 7 5 . C C O 7 6 . 0 0 0 7 7 . C C O 7 8 . 0 0 0 7 9 . C C O 8 0 . 0 0 0 ei.coo 8 2 . 0 0 0 e3.cco 8 4 . C C O es.ooo 8 6 . C C O 8 7 . 0 0 0 68 . C C O 8 9 . 0 0 0 9 C . C C 0 9 1 . 0 0 0 9 2 . C O O 9 3 . 0 0 0 9 4 . C C O 9 5 . 0 0 0 9 6 . C O O 9 7 . 0 0 0 9 8 . C C O 9 9 . 0 0 0 I O C . O C O 101 .000 1 0 2 . C C O 1 0 3 . 0 0 0 1 0 4 . C C O 105 .OCO 1 C 6 . C C 0 107 .000 1 C 8 . C 0 O 1 0 9 . 0 0 0 1 1 C . C C O 1 1 1 . 0 0 0 1 1 2 . C C O 1 1 3 . 0 0 0 1 1 4 . C O O 1 1 5 . 0 0 0 1 1 6 . C C O 1 1 7 . 0 0 0 1 1 8 . C O O 156 REFERENCES [1] K.A. Kooi, Fundamentals of Electroencephalography. New York: Harper and Row, 1971. [2] F.A. Gibbs and E.L. Gibbs, Medical Electroencephalography. Reading: Addison-Wesley, 1967. [3] L.G. Kiloh and J.W. Osselton, C l i n i c a l Electroencephalography. Wash-ington: Butterworths, 1966. [4] J.P. Laidlaw and J.B. Stanton, The EEG in C l i n i c a l Practice. Edin-burgh: E. & S. Livingstone, 1966. [5] T.C. Gray and J.F. Nunn, Eds., General Anaesthesia: Volume One, Basic  Sciences. London, Butterworths, 1971. [6] T.C. Gray and J.F. Nunn, Eds., General Anaesthesia: Volume Two, Cl i n - i c a l Practice. London: Butterworths, 1971. [7] W.D. Wylie and H.C. Churchill-Davidson, A Practice of Anaesthesia. London: Lloyd-Luke, 1972. [8] L.C. Jenkins, General Anaesthesia and the Central Nervous System. Baltimore: Williams and Wilkins, 1969. [9] F.A. Gibbs, E.L. Gibbs and W.G. Lennox, "Effect on the electroenceph-alogram of certain drugs which influence nervous act i v i t y , " Arch. Intern. Med., vol. 60, pp. 154-166, July 1937. [10] M.A. Rubin and H. Freeman, "Brain potential changes in man during Cyclopropane anesthesia," J. Neurophysiol., vol. 3, pp. 33-42, Jan. 1940. [11] R.F. Courtin, R.G. Bickford and A. Faulkoner, Jr., "The classification and significance of electroencephalographic patterns produced by nitrous oxide-ether anesthesia during surgical operations," Proc. Staff Meet. Mayo Clin., vol..25, pp. 197-206, 1950. [12] D.K. Kiersay, R.G. Bickford and A. Faulkoner, Jr., "Electroencephalo-graphic patterns produced by thiopental sodium during surgical oper-ations: Description and cl a s s i f i c a t i o n , " Br. J. Anesth., vol. 23, pp. 141-152, 1951. [13] A. Faulkoner, Jr., "Correlation of concentration of ether in a r t e r i a l blood with electroencephalographic patterns during ether-oxygen and during nitrous oxide, oxygen and ether anesthesia of human surgical patients," Anesthesiology, vol. 13, pp. 361-369, July 1952. [14] S. Possati, A. Faulkoner, Jr., R.G. Bickford, et a l . , "Electroenceph-alographic patterns during anesthesia with cyclopropane: Correlation with concentrations in a r t e r i a l blood," Anesth. Artalg. (Cleve.), vol. 32, pp. 130-135, 1953. 157 [15] D.L. Clark and B.S. Rosner, "Neurophysiological effects of general an-esthetics; The electroencephalogram and sensory evoked responses i n man," Anesthesiology, vol. 38, pp. 564-582, June 1973. [16] J.T. Martin, A. Faulkoner, Jr., and R.G. Bickford, "Electroencephalo-graphy in anesthesiology," Anesthesiology, vol. 20, pp. 359-376, May 1959. [17] V.L. Brechner, R.D. Walter, and J.B. Dillon, Practical Electroenceph- alography for the Anesthesiologist. Springfield: Thomas, 1962. [18] J. Volavka, M. Matousek, S. Feldstein et a l . , "The r e l i a b i l i t y of EEG assessment," Z. EEG-EMG, vol. 4, pp. 123-130, 1973 (German). [19] E.A. Gain and S.G. Paletz, "An attempt to correlate the c l i n i c a l signs of fluothane anesthesia with the electroencephalographic levels," Can. Anaesth. Soc. J., vol. 4, pp. 289-294, July 1957. [20] S.J. Galla, A.K. Olmedo, H.E. Kretchmer, et a l . , "Correlation of EEG patterns with a r t e r i a l concentrations and c l i n i c a l signs during halo-thane anesthesia," Anesthesiology, vol. 23, pp. 147-148, Jan. 1962. [21] J . Dumermuth, P.J. Huber, B. Kleiner and T. Gasser, "Numerical analysis of electroencephalographic data," IEEE Trans. Audio Electroacoust., vol. AU-18, pp. 404-411, Dec. 1970. [22] J.R. Cox, Jr., F.M. Nolle, and R.M. Arthur, "Digital analysis of the electroencephalogram, the blood pressure wave and the electrocardio-gram," Proc. IEEE, vol. 60, pp. 1137-1164, Oct. 1972. [23] P. Kellaway and I. Petersen, Eds., Automation of C l i n i c a l Electroen- cephalography . New York: Raven Press, 1973. [24] G. Nagy, "State of the art in pattern recognition," Proc. IEEE, vol. 56, pp. 836-862, May 1968. [25] G.T. Toussaint, "Bibliography on estimation of misclassification," IEEE Trans. Inform. Theory, vol. IT-20, pp. 472-479, July 1974. [26] L. Kanal, "Patterns in pattern recognition: 1968-1974," IEEE Trans. Inform. Theory, vol. IT-20, pp. 697-722, Nov. 1974. [27] G.F. Franklin and D.H. Utter, "Parameter identification from EEG data taken during anesthesia," in Proc. 5th Hawaii Int. Conf. on System  Sciences - Computers in Biomedicine (Honolulu, Hawaii), pp. 15-17, 1972. [28] M.A. Branthwaite, "Factors affecting cerebral activity during open-heart surgery," Anaesthesia, vol. 28, pp. 619-625, 1973. [29] J.J. Stockard, J.F. Schauble, T.W. Bil l i n g e r and T.G. Bickford, "Intraoperative EEG updated: new techniques and future applications," Proc. San Diego Biomedical Symp. (San Diego, C a l i f . ) , vol. 11, pp. 277-286, 1972. 158 [30] J.J. Stockard and R.G. Bickford, "Pressure-dependent cerebral iscbetnia during cardiopulmonary bypass," Neurology, vol. 23, pp. 521-529, 1973. [31] R.R. Myers, J.J. Stockard, N.I. Fleming, C.J. France and R.G. Bickford, "The use of on-line telephone computer analysis of the EEG i n anaes-thesia," B r i t . J. Anaesth., vol. 45, pp. 664-670, 1973. [32] M.S. Schwartz, M.P. Colvin, P.F. Prior et a l . , "The cerebral function monitor," Anaesthesia, vol. 28, pp. 611-618, 1973. [33] J.A. McEwen, G.B. Anderson, L.C. Jenkins, B.A. Saunders and M.D. Low, "EEG spectra during impaired consciousness and anesthesia," Electro-enceph. c l i n . Neurophysiol, vol. 34, pp. 724-725, 1973 (Abs). [34] J.A. McEwen, G.B. Anderson, M.D. Low, J.L. Berezowskyj, and L.C. Jenkins, "Identification of anesthesia levels during surgery by com-puter-based EEG pattern recognition," in Fift h Canadian Medical and  Biological Engineering Conf. Dig. (Montreal, Canada), pp. 10.3a -10.3b, 1974. [35] J.A. McEwen, "Modelling spontaneous electroencephalographic act i v i t y , " in F i f t h Canadian Medical and Biological Engineering Corif. Dig. (Montreal, Canada), pp. 10.4a - 10.4b, 1974. [36] J.L. Berezowskyj, J.A. McEwen, L.C. Jenkins, and G.B. Anderson, "A study of anesthesia depth by power spectral analysis of the electro-encephalogram, " submitted to Canad. Anaesth. Soc. J. [37] J.A. McEwen and G.B. Anderson, M.D. Low, and L.C. Jenkins, "Monitoring the level of anesthesia by automatic analysis of spontaneous EEG ac-t i v i t y , " IEjgsj^rju]^ vol. BME-22, pp. 299-303, July 1975. [38] J.A. McEwen and G.B. Anderson, "Modeling the stationarity and Gaus-sianity of spontaneous electroencephalographic activity," IEEE Trans. Bio-Med. Eng., to be published in September 1975. [39] J.A. McEwen, "On estimating and reducing the effect of intersubject EEG variation on the performance of EEG pattern recognition systems," in Proc. 8th Hawaii Int. Conf. on System Sciences (Honolulu, Hawaii), pp. 158-160, 1975. [40] Dorlands's Illustrated Medical Dictionary, 24th ed. Philadelphia: Saunders, 1965. [41] J . Snow, On the Inhalation of the Vapour of Ether. London: Churchill, 1847 (Reproduced 1959, Lea and Febiger, Philadelphia). [42] A.E. Guedel, Inhalational Anesthesia: a Fundamental Guide. New York: Macmillan, 1937. [43] D.J. Cullen, E.I. Eger II, W. Stevens et a l . , " C l i n i c a l signs of anesthesia," Anesthesiology, vol. 36, pp. 21-36, 1972. 159 [44] J.G. Robson, "Measurement of depth of anesthesia," Brit. J. Anaesth., vol. 41, pp. 785-788, 1969. [45] S.J. Galla, A.G. Rocco and L.D. Vandam, "Evaluation of the traditional signs and stages of anesthesia: an electroencephalographic and c l i n i c a l study," Anesthesiology, vol. 19, pp. 328-338, 1958. [46] J.L. Berezowskyj, "Concept of depth of anesthesia," unpublished report. [47] R. Hutchinson, "Awareness during surgery: A study of i t s incidence," Br i t . J. Anaesth., vol. 33, pp. 463-469, 1960. [48] D.J. Waters, "Factors causing awareness during surgery," B r i t . J.  Anaesth., vol. 40, pp. 259-264, 1968. [49] J.W.R. Mclntyre, "Awareness during general anesthesia: preliminary observations," Canad. Anaesth. Soc. J., vol. 13, pp. 495-499, 1966. [50] E. Lowenstein, "Morphine 'anesthesia' - a perspective," Anesthesiology, vol. 35, pp. 563-565, 1971. [51] D.L. Scott, "Awareness during general anesthesia," Canad. Anaesth. Soc. J., vol. 19, pp. 173-183, 1972. [52] R.A. Brown and D.V. Catton, "Awareness during anesthesia," Canad. An- aesth. Soc. J., vol. 20, pp. 763-768, 1973. [53] H.B. Graves, Annual Report - Statistics - 1974. Department of Anaes-: thesia, Vancouver General Hospital* (unpublished) . [54] E.P. Radford, Jr., B.G. Ferris, Jr.and B.C. Kriete, " C l i n i c a l use of a nomogram to estimate proper ventilation during a r t i f i c i a l res-piration," New Eng. J. Med., vol. 251, pp. 877-884, 1954. [55] A. Faulkoner, J.W. Pender and R.G. Bickford, "The influence of partial pressure of nitrous oxide on the depth of anesthesia and the electro-encephalogram in man," Anesthesiology, vol. 10, pp. 601-609, 1949. [56] M. Malkin and D. Eisenberg, "Correlation between c l i n i c a l and electro-encephalographic findings during the f i r s t stage of nitrous oxide an-esthesia," J. Oral Surg., Anesth. & Hosp. D. Serv., vol. 21, pp. 16-23, 1963. [57] S.M. Smith, H.0. Brown, J.E.P. Toman and L.S. Goodman, "The lack of cerebral effects of d-tubocurarine," Anesthesiology, vol. 8, pp. 1-14, 1947. [58] S.C. Alexander, H. Wollman, P.J. Cohen et a l . , "Cerebrovascular res-ponse to Pa^o 'during halothane anesthesia in man," J. Appl. Physiol., vol. 19, pp. 561-565, 1964. [59] R.S. N e i l l and B.A. Nixon, "Halothane and tubocurarine," Anaesthesia, vol. 20, pp. 250-257, 1965. 160 [60] J.C. F i n d e i s s , G.A. Kien, J.O.W. Huse et a l . , "Power s p e c t r a l density of the electroencephalogram during halothane and cyclopropane anes-t h e s i a i n man," Anesth. Analg., v o l . 48, pp. 1018-1023, 1969. [61] W.C. Pearcy, J.R. Knott, R.O. Bjurstrom, "Studies on nit r o u s oxide, meperidine and levallorphan with unipolar electroencephalography," Anesthesiology, v o l . 18, pp. 310-315, 1957. [62] H.W. Linde, V.E. Lamb, C.W. Quimby, J r . , J . Homi and J.E. Eckenhoff, "The search f o r b e t t e r anesthetic agents: c l i n i c a l i n v e s t i g a t i o n of Ethrane," Anesthesiology, v o l . 32, pp. 555-559, 1970. [63] B.E. Marshall, P.J. Cohen, C H . Klingenmaier et a l . , "Some pulmonary and cardiovascular e f f e c t s of enflurane (Ethrane) anaesthesia with varying PacO^ i n m a n » " B r i t . J . Anaesth., v o l . 43, pp. 996-1002, 1971. [64] J.L. Neigh, J.K. Garman and J.R. Harp, "The electroencephalographic pattern during anesthesia with Ethrane," Anesthesiology, v o l . 35, pp. 482-487, 1971. [65] A.J. Bart, J . Homi and H.W. Linde, "Changes i n power spectra of e l e c -tro-encephalograms during anesthesia with fluroxene, methoxyflurane and Ethrane," Anesth. Analg., v o l . 50, pp. 53-63, 1971. [66] A. Egilmez and A.B. Dobkin, "Enflurane (Ethrane, compound 347) i n man," Anaesthesia, v o l . 27, pp. 171-178, 1972. [67]. N.M.. Green, "Halothane* anesthesia-,and• h e p a t i t i s i n a. high-r-risk popu- -l a t i o n , " New Eng. J . Med., v o l . 289, pp. 304-307, 1973. [68] B. McPeek and J.P. G i l b e r t , "Onset of postoperative jaundice r e l a t e d to anaesthetic h i s t o r y , " B r i t . Med. J . , v o l . 3, pp. 615-617, 1974. [69] J.P. Bunker, W.H. F o r r e s t , J r . , F. Most e l l e r , et a l . , The National Halothane Study. Washington: U.S. Government P r i n t i n g O f f i c e , 1969. [70] H.H. Jasper, "Report of the committee on methods of c l i n i c a l examin-atio n i n electroencephalography," Electroenceph. c l i n . Neurophysiol., v o l . 10, pp. 370-375, 1958. [71] M.A.B. Br a z i e r , " P h y s i o l o g i c a l e f f e c t s of carbon-dioxide on a c t i v i t y of c e n t r a l nervous system i n man: With s p e c i a l reference to problem of high a l t i t u d e f l y i n g , " Medicine, v o l . 22, pp. 205-215, 1943. [72] L. Kanal and B. Chandrasekaran, "On dimensionality and sample s i z e i n s t a t i s t i c a l pattern c l a s s i f i c a t i o n , " Patt. Recog., v o l . 3, pp. 225-234, 1971. [73] G.F. Hughes, "On the mean accuracy of s t a t i s t i c a l pattern recognizers," IEEE Trans. Inform. Theory, v o l . IT-14, pp. 55-63, 1968. [74] J.W. Cooley and J.W. Tukey, "An algorithm for the machine c a l c u l a t i o n of complex Fourier s e r i e s , " Mathematics of Computation, v o l . 19, pp. 297-301, 1965. 161 [75] C. Bingham, M.D. Godfrey and J.W. Tukey, "Modern techniques of power spectrum estimation," IEEE Trans. Audio Electroacoust., v o l . AU-15, pp. 56-66, 1967. [76] G. Dumermuth; and E. K e l l e r , "EEG s p e c t r a l analysis by means of Fast Fourier Transform," i n Automation of C l i n i c a l Electroencephalography, P. Kellaway and I. Petersen, Eds. New York: Raven Press, 1973. [77] D.O. Walter, J.M. Rhodes and W.R. Adey, "Discriminating among states of consciousness by EEG measurements: A study of four subjects," Electroenceph. c l i n . Neurophysiol., v o l . 22, pp. 22-29, 1967. [78] B. Sklar, J . Hanley and W.W. Simmons, "A computer analysis of EEG s p e c t r a l signatures from normal and d y s l e x i c c h i l d r e n , " IEEE Trans. Bio-Hed. Eng., v o l . 20, pp. 20-26, 1973. [79] J . Gotman, D.R. Skuce, C.J. Thompson, P. Gloor, J.R. Ives and W.F. Ray, " C l i n i c a l a p p l i c a t i o n s of s p e c t r a l analysis and e x t r a c t i o n of features from electroencephalograms with slow waves i n adult p a t i e n t s , " Electroenceph. c l i n . Neurophysiol., v o l . 35, pp. 225-235, 1973. [80] W.R Adey, R.T. Kado and D.O. Walter, "Computer analysis of EEG data from Gemini f l i g h t GT-7, Aerosy. Med., v o l . 38, pp. 345-359, 1967. [81] G. Dumermuth, W. Walz, G. S c o l l o - L a v i z z a r i and B. K l e i n e r , "Spectral analysis of EEG a c t i v i t y i n d i f f e r e n t sleep stages i n normal a d u l t s , " Europ. Neurol., v o l . 7, pp. 265-296, 1972. [82] L. Johnson, A. Lubin, P. Naitoh, C. Nute and M. Austin, "Spectral analysis of the EEG of dominant and non-dominant alpha subjects during waking and sleeping," Electroenceph. c l i n . Neurophysiol., v o l . 26, pp. 361-370, 1969. [83] L.E. Larsen and D.O. Walter, "On automatic methods of sleep staging bv EEG spectra," Electroenceph. c l i n . Neurophysiol., v o l . 28, pp. 459-467, 1970. [84] A. Papoulis, P r o b a b i l i t y , Random Variables and Stochastic Processes. New York: McGraw-Hill, 1965. [85] A. Remond, Ed., Handbook of Electroencephalography and C l i n i c a l Neur- ophysiology (Vol. 5A). Amsterdam: E l s e v i e r , 1973. [86] J.F. Ormsby, "Designs of numerical f i l t e r s with a p p l i c a t i o n of m i s s i l e data processing," J . Ass. Comput. Mach., v o l . 8, pp. 440-446, 1961. [87] R.B. Blackman and J.W. Tukey, The Measurement of Power Spectra from the Point of View of Communication Engineering. New York: Dover, 1958. [88] B. K l e i n e r , H. F l u h l e r , P.J. Huber and G. Dumermuth, "Spectral an-a l y s i s of the electroencephalogram, 1 1 Comp. Progr. Biomed., v o l . 1, pp. 183-197, 1970. [89] U n i v e r s i t y of B r i t i s h Columbia Computing Centre, UBC FOURT: Discrete  Four i e r Transforms, January 1970. 162 [90] N. Brenner, "Cooley-Tukey Fast Fourier Transform: F0UR2 in assembly language," in IBM Contributed Program Library (#360D - 13.4.008). [91] D.O. Walter, R.T. Kado, J.M. Rhodes and W.R. Adey, "Electroencepbalo-graphic baselines in astronaut candidates estimated by computation and pattern recognition techniques,11 Aerosp. Med., vol. 38, pp. 371-379, 1967. [92] B. Saltzberg and N.R. Burcb, "Period analytic estimates of moments of the power spectrum: a simplified time-domain procedure," Electroen- ceph. c l i n . Neurophysiol., vol. 30, pp. 568-570, 1971. [93] B. Hjorth, "EEG analysis based on time domain properties," Electroen- ceph. c l i h . Neurophysiol., vol. 29, pp. 306-310, 1970. [94] N.R. Burch, W.J. Nettleton, J. Sweeney and R.J. Edwards, "Period an-alysis of the electroencephalogram on a general purpose d i g i t a l com-puter," AnnI_JLJ£^^ vol. 115, pp. 827-843, 1964. [95] P. Kellaway, "Automation of c l i n i c a l electroencephalography: The nature and scope of the problem," i n Automation of Cl i n i c a l Electroencephalo- graphy , P. Kellaway and I. Petersen, Eds. New York: Raven Press, 1973. [96] J.D. Frost, Jr. "An automatic sleep analyzer," Electroenceph. c l i n . Neurophysiol., vol. 29, pp. 88-92, 1970. [97] J.F. Kenney and E.S. Keeping, Mathematics of Statistics: Part One. Princeton: Van Nostrand, 1954, pp. 90-106. [98] E. Kaiser, I. Petersen and R. Magnusson, "A method in automatic pattern recognition i n EEG," in Automation of Cli n i c a l Electroencephalography, P. Kellaway and I. Petersen, Eds. New York: Raven Press, 1973. [99] T.W. Anderson, Introduction to Multivariate Statistics. New York: Wiley, 1958, pp. 142-153. [100] W.J. Dixon, "BMD07M, stepwise discriminant analysis," i n Biomedical  Computer Programs. Berkeley, Ca l i f . : Univ. California Press, 1970. [101] D.J. Doyle, "Towards computer based analysis of c l i n i c a l electroen-cephalograms," M.A.Sc. thesis, Univ. British Columbia, Vancouver, Canada, Oct. 1974. [102] R.O. Duda and P.E. Hart, Pattern Classification and Scene Analysis. New York: Wiley, 1973. [103] I.J. Good, The Estimation of Probabilities, Research Monograph 30. Cambridge, Mass.: M.I.t. Press, 1965. [104] L.E. Larsen, D.O. Walter, J.J. McNew and W.R. Adey, "On the problem of bias in error rate estimation for discriminant analysis," Patt. Recog., vol. 3, pp. 217-223, 1971. [105] J.M. Rhodes, D.O. Walter and W.R. Adey, "Discriminant analysis of 'activated' EEG," Psychon. Sci., vol. 6, pp. 439-440, 1966. 163 [106] A.B.S. Hussain, G.T. Toussaint and R.W. Donaldson, "Results obtained using a simple character recognition procedure on Munson's hand-printed data," IEEE Trans. Comput. (Short Notes), vol. C-20, pp. 201-205, 1972. [107] G.T. Toussaint and P.M. Sharpe, "An efficient method for estimating the probability of misclassification applied to a problem in medical diagnosis," Computers i n Biology and Medicine, to be published. [108] P.A. Lachenbruch, "An almost unbiased method of obtaining confidence intervals for the probability of misclassification in discriminant analysis," Biometrics, vol. 23, pp. 639-645, 1967. [109] P.A. Lachenbruch and R.M. Mickey, "Estimation of error rates i n dis-criminant analysis," Technometrics, vol. 10, pp. 1-11, 1968. [110] A.N. Mucciardi and E.E. Gose, "A comparison of seven techniques for choosing subsets of pattern recognition properties," IEEE Trans. Comput., vol. C-20, pp. 1023-1031, 1971. [ I l l ] K.S. Lion and D.F. Winter, "A method for the discrimination between signals and random noise of electrobiological potentials," Electro- enceph. c l i n . Neurophysiol., vol. 5, pp. 109-111, 1953. [112] V.A. Kozhevnikov, "Some methods of automatic measurement of the elec-troencephalogram," Electroenceph. c l i n . Neurophysiol., vol. 10, pp. 259-278, 1958. [113] M.G. Saunders, "Amplitude probability density studies on alpha and alpha-like patterns," Electroenceph. c l i n . Neurophysiol., vol. 15, pp. 761-767, 1963. [114] J. Campbell et a l . , "On the sufficiency of autocorrelation functions as EEG descriptors," IEEE Trans. Bio-Med. Eng., vol. BME-14, pp. 49-52, 1167. [115] R. E l u l , "Gaussian behaviour of the electroencephalogram: changes during performance of mental task," Science, vol. 164, pp. 328-331, 1969. [116] M.S. Weiss, "Non-Gaussian properties of the EEG during sleep," Elec- troenceph. c l i n . Neurophysiol., vol. 34, pp. 200-202, 1973. [117] G. Dumermuth et a l . , "Analysis of the inter-relations between f r e -quency bands of the EEG by means of the bispectrum," Electroenceph. c l i n . Neurophysiol., vol. 31, pp. 137-148, 1971. [118] E. Strehl, Zur Amplitudenverteilung Pes Spontanen Wach-Elektroenceph- alogramms, Inaugural-Dissertation, Universitat Zurich, Zuerich, 1972. [119] J.B. Thomas, An Introduction to S t a t i s t i c a l Communication Theory. New York: Wiley, 1969. [120] J. Bendat and A. Piersol, Measurement and Analysis of Random Data. New York: Wiley, 1966, pp. 88-91. 164 [121] B.W. Lindgren, S t a t i s t i c a l Theory. New York: MacMillan, 1968, pp. 329-337. [122] D.A. D a r l i n g , "The Kolmogorov-Smirnov, Cramer-von Mises t e s t s , " Ann. Math. Stat., v o l . 28, pp. 823-837, 1957. [123] M. Kac, J. K i e f f e r and J. Wolfowitz, "On tests of normality and other t e s t s of f i t based on distance methods," Ann. Math. Stat., v o l . 25, pp. 189-241, 1955. [124] H.W. L i l l i e f o r s , "On the Kolmogorov-Smirnov t e s t f o r normality with mean and variance unknown," J . Amer. Stat. Ass., v o l . 62, pp. 399-402, 1967. [125] J . Persson, "Comments on estimations and tes t s of EEG amplitude d i s t r i b u t i o n s , " Electroenceph. c l i n . Neurophysiol., v o l . 37, pp. 309-313, 1974. [126] G.P. T h r a l l , An Analysis of Amplitude P r o b a b i l i t y Measurements. FDL-TDR-64-116, Research and Technology D i v i s i o n , AFSC, Wright-Patterson AFB, Ohio, 1965. [127] B.R. Tharp, "The future of electroencephalography," i n Proc. F i f t h  Hawaii Int. Conf. -on System Sciences - Computers i n Biomedicine (Honolulu, Hawaii), pp. 6-8, 1972. [128] R.G. Bickford et a l . , "A computer and enunciator system f o r e s t i -r/iation of b r a i n death," i n Proc. San Diego Biomedical Symp. (San Diego, C a l i f . ) , v o l . 10, pp. 117-123, 1971. [129] W.W. W i e r v i l l e , "A new approach to the spectrum analysis of non-stati o n a r y s i g n a l s , " IEEE Trans. Appl. Ind., v o l . 82, pp. 322-327, 1963. [130] P.D. Welch, "The use of fa s t F o u r i e r transform for the estimation of power spectra: A method based on time averaging over short, modified periodograms," IEEE Trans. Audio Electroacoust., v o l . AU-15, pp. 70-73, 1967. [131] N. Kawabata, "A nonstationary analysis of the electroencephalogram," IEEE Trans. Bio-Med. Eng., v o l . BME-20, pp. 444-452, 1973. [132] L.R. Pinneo, D.J. H a l l and D.E. Wolf, " I d e n t i f i c a t i o n of unique e l e c t r o p h y s i o l o g i c a l c o r r e l a t e s of overt and covert speech," Science, to be published. [133] G.M. Jenkins and D.G. Watts, Spectral Analysis and I t s App l i c a t i o n s . San Francisco: Holden-Day, 1968, pp. 356-359. [134] L.D. Enockson, "Frequency response functions and coherence functions f o r multiple input l i n e a r systems," NASA Report CR-32, Measurement Analysis Corp., Los Angeles, C a l i f . , 1964. [135] P.R. Roth, "How to use the spectrum and coherence func t i o n , " Sound  and V i b r a t i o n , v o l . 5, pp. 100-105, 1971. 165 [136] G.W. Snedecor and W.G. Cochran, S t a t i s t i c a l Methods. Ames, Iowa: Iowa State University Press, 1967, pp. 258-298. [137] W.J. Dixon, "BMD 07M, stepwise discriminant analysis," in Biomedical  Computer Programs. Berkeley, Calif: Univ. California Press, 1970. [138] B.P. Lathi, An Introduction to Random Signals and Communication  Theory. Scranton: International, 1968. [139] L.D. Harmon, "Automatic recognition of print and script," Proc. IEEE, vol. 60, pp. 1165-1176, Oct. 1972. [140] J.A. McEwen, "Evaluating the performance of EEG pattern recognition systems," in Proc. 28th Ann. Conf. Engineering in Medicine and Biology (New Orleans, La.), to be published. PUBLICATIONS: 1. J.A. McEwen, G.B. Anderson, L.C. Jenkins, B.A. Saunders and M.D. Low, "EEG spectra during impaired consciousness and anesthesia," E l e c t r o -encepli. c l i n . Neuroplvsiol., v o l . 34, pp. 724-725, 1973 (Abs) . 2. J.A. McEwen, G.B. Anderson, M.D. Low, J.L. Berezowskyj, and L.C. Jenkins, " I d e n t i f i c a t i o n of anesthesia l e v e l s during surgery by computer-based EEG pattern r e c o g n i t i o n , " i n F i f t h Canadian  Medical and B i o l o g i c a l Engineering Conf. Dig. (Montreal, Canada), pp. 10.3a - 10.3b, 1974. 3. J.A. McEwen, "Modelling spontaneous electroencephalographic a c t i v i t y , " i n F i f t h Canadian Medical and B i o l o g i c a l Engineering Conf. Dig. (Montreal, Canada), pp. 10.4a - 10.4b, 1974. 4. J.L. Berezowskyj, J.A. McEwen, L.C. Jenkins, and G.B. Anderson, "A study of anesthesia depth by power s p e c t r a l analysis of the e l e c t r o -encephalogram," submitted to Canad. Anaesth. Soc. J . 5. J.A. McEwen and G.B. Anderson, M.D. Low, and L.C. Jenkins, "Monitoring the l e v e l of anesthesia by automatic analysis of spontaneous EEG a c t i v i t y , " IEEE Trans. Bio-Med. Eng., v o l . BME-22, pp. 299-305, J u l y 1975. 6 . J.A. McEwen and G.B. Anderson, "Modeling the s t a t i o n a r i t y and . Gaussianity of spontaneous electroencephalographic a c t i v i t y , " IEEE  Trans. Bio-Med. Eng., t<~> be published i n September 1975. 7. J.A. McEwer, "On estimating and reducing the e f f e c t of in t e r s u b j e c t EEG v a r i a t i o n on the performance of EEG pattern r e c o g n i t i o n systems," i n Proc. 8th Hawaii Int. Conf. on System Sciences (Honolulu, Hawaii), pp. 158-160, 1975. 8. J.A. McEwen, "Evaluating the performance of EEG pattern recognition systems," i n Proc. 28th Ann. Conf. Engineering i n Medicine and  Biology (New Orleans, La.), to be published. 

Cite

Citation Scheme:

        

Citations by CSL (citeproc-js)

Usage Statistics

Share

Embed

Customize your widget with the following options, then copy and paste the code below into the HTML of your page to embed this item in your website.
                        
                            <div id="ubcOpenCollectionsWidgetDisplay">
                            <script id="ubcOpenCollectionsWidget"
                            src="{[{embed.src}]}"
                            data-item="{[{embed.item}]}"
                            data-collection="{[{embed.collection}]}"
                            data-metadata="{[{embed.showMetadata}]}"
                            data-width="{[{embed.width}]}"
                            async >
                            </script>
                            </div>
                        
                    
IIIF logo Our image viewer uses the IIIF 2.0 standard. To load this item in other compatible viewers, use this url:
http://iiif.library.ubc.ca/presentation/dsp.831.1-0065438/manifest

Comment

Related Items