**3.1 Formalizing the situation in the ISD**

The additional circumstances present in an ISD in which its knowledge management could be performed by KDSM can be formalized as follows:

*Given:*


*In this particular ISD with serial measures Y, the KDSM methodology will be able to carry out knowledge management that provides:*


In short, the KDSM is a hybrid methodology that uses machine learning and statistical techniques for the knowledge management of an ISD where the above circumstances are present.

### **3.2 Data structure**

A generic description of the specific circumstances of ISD is shown in **Figure 1** by representing a series of *individuals i*ð Þ <sup>1</sup> … *in* in which *ni* occurrences of a given *event E* take place at different times *Ei*<sup>1</sup> … *Eini* ð Þ, f g *i*<sup>1</sup> … *in* . Connected to each event, there is an attribute (or set of attributes) of interest *Y* that affects the individual's behavior. When performing knowledge management through KDSM, the aim is to know the behavior of *Y* during a very short period of time *t*1, *tr* ½ � immediately after each occurrence of *E*.

Therefore, a minimum number of serial measurements (*r*) of *Y* is fixed for each individual and each occurrence of *E*. In this particular case, the times at which *Y* will be recorded are fixed and will always be counted for all times *E* is presented.

In this sense, in the actual implementation of the Section 4, it is stated: *I* ¼ f g *i*<sup>1</sup> … *in is a set of patients p*<sup>1</sup> … *pn* � �*,*

*Toward Optimization of Medical Therapies with a Little Help from Knowledge Management DOI: http://dx.doi.org/10.5772/intechopen.101987*

*E is the application of an electroshock ES to a given patient at a given time point. Thus, every patient has a ES sequence; then the electroconvulsive therapy ECTi* ¼ *ESi*<sup>1</sup> … *ESini* f g*.*

*Y are the attributes whose behavior is of interest to observe and which in this example corresponds to the reaction time RT of the patient to a given light stimulus presented at some point after each ES. Serial measurements of this attribute are recorded during the first 24 hours after each ES application, in particular after t*<sup>1</sup> ¼ 2*h, t*<sup>2</sup> ¼ 4*h, t*<sup>3</sup> ¼ 6*h, <sup>t</sup>*<sup>4</sup> <sup>¼</sup> <sup>8</sup>*h, t*<sup>5</sup> <sup>¼</sup> <sup>12</sup>*h, and t*<sup>6</sup> <sup>¼</sup> <sup>24</sup>*h; (r* <sup>¼</sup> <sup>6</sup>*) then Y* <sup>¼</sup> *<sup>Y</sup>*<sup>2</sup> , *Y*4, *Y*6, *Y*12, *Y*<sup>24</sup> *.*

*Figure 2 is a graphical representation of the record of the reaction time RT observed in the 24 hours following the application of each electroshock to a set of patients. The rows Yt <sup>i</sup>*<sup>0</sup> *of the matrix Y are the RT curves for each patient before initiating ECT.*

*The X matrix contains quantitative or qualitative information regarding the patients (e.g. age, gender … ) and the Z matrix contains quantitative or qualitative information regarding each ES applied to each patient (e.g. energy level, impedance … ).*

The data for this scenario is structured as follows:

1.For each *i* a set of quantitative or qualitative characteristics *X*<sup>1</sup> … *XK* is available. This can be represented by a matrix-like as shown in **Table 1**.

On matrix *X*, *xik*, where *i* ¼ f g 1 … *n* and *k* ¼ f g 1 … *K* , is the value taken by *XK* for an individual *n*.

*For example, if X*<sup>1</sup> *corresponds to the patients' age, then x*<sup>11</sup> *must be the first patient's age and so on.*

2.Each time *E* occurs, measurements of *Y* are recorded at each fixed point in time. Let *Eij i* ¼ f g 1 … *n* and *j* ¼ f g 1 … *ni* be the jth occurrence of event *E* in the

**Figure 2.** *Electroshocks applied to some patients.*

### *Recent Advances in Knowledge Management*


**Table 1.**

*Matrix X.*


### **Table 2.** *Matrix Y.*

individual<sup>1</sup> *i*. Therefore, for a given individual *i*, there are *ni* the number of occurrences of *E*. Considering that time resets to 0 at each occurrence of *E*, it is possible to set *t*<sup>1</sup> … *tr* as the moments in time at which *Y* will be recorded after each *E* occurs.

*For example, if E*<sup>11</sup> *corresponds to the first electroshock applied to the first patient, then Y*<sup>1</sup> <sup>11</sup> *must be a record of the reaction time (attribute of interest) measured 2 h after applying the electroshock (instant t*1*). By analogy, Y*<sup>3</sup> <sup>21</sup> *must be the third record of the reaction time measured 6 h (instant t*3*) after the first electroshock is applied (j* ¼ 1*) to the second patient (i* ¼ 2*).*

The *Y* records form a second data matrix with the structure shown in **Table 2**.

3.Also for each *Eij*, there are quantitative and/or qualitative characteristics, which are not serial measurements, *Z* ¼ *Z*<sup>1</sup> … *ZL* that form a data matrix with the structure shown in **Table 3**.

In the matrix *Z*, *z*ð Þ*ij <sup>l</sup>*, where *i* ¼ f g 1 … *n* , *j* ¼ f g 1 … *ni* and *l* ¼ f g 1 … *L* , is the value *ZL* has for the specific event *Eij*. There are no *z*ð Þ *<sup>i</sup>*<sup>0</sup> *<sup>l</sup>* values since *j* ¼ 0 relates to the baseline measurements in *Y*, and are recorded before the first occurrence of the event.

*For example, if Z*<sup>1</sup> *is the energy level of the electroshocks, then z*ð Þ <sup>23</sup> <sup>1</sup> *is the energy level of the third electroshock applied to the second patient (E*23*).*

The attributes of interest are contained in *Y*, which contains serial measurements of the target attribute *Y* after each occurrence of *E* in each individual *i*. Thus, the cells of matrix *Y* are *Y<sup>t</sup> ij*, where *i* ¼ f g 1 … *n* is the individual, *j* ¼ f g 0 … *ni*

<sup>1</sup> Remember that *<sup>j</sup>* <sup>¼</sup> 0 records the baseline serial measurements.

*Toward Optimization of Medical Therapies with a Little Help from Knowledge Management DOI: http://dx.doi.org/10.5772/intechopen.101987*


**Table 3.** Matrix Z*.*

indicates the jth occurrence of *E* on the individual *i* and *t*∈f g 1 … *r* (where r is small) indexes the time recorded in *Y* after the occurrence of *Eij*. It should be noted that *those moments of time for the measurement are all equal* in terms of the time of occurrence of all events for all individuals.
