# Instance-Based Learning Following Physician Reasoning for Assistance during Medical Consultation
## 5 Medical Consultation Flows
### Selecting an Already Defined Case Type
In the learning approach, a similarity metric between clinical CTs is calculated by using all previously recorded CTs as training examples. Since the problem-solving ability of the proposed method is increased with each newly defined CT, it is important to analyze the performance of the proposed learning method when faced with CKBs with a great number of CTs. #### 7.3.1 Execution Platform of Performance Evaluation

The execution time analysis was performed on an Intel(R) Core(TM) i7-4700 MQ CPU @ 2.40 GHz, 16 GB RAM, and running 64-bit Windows 10 Pro. #### 7.3.2 Execution Time

The efficiency of the learning method was evaluated when faced with CKBs of different sizes. To make a realistic evaluation, the 250 CTs registered by students were considered as input data, and the average time of 50 executions was measured for each CKB analyzed. Figure 4 presents the average execution time of the proposed method when using different CKB sizes. The algorithm was executed on CKBs containing from 25 to 250 CTs. Figure 4 shows how the size of a CKB has a direct influence on the execution time of the proposed method. Results also demonstrate that the proposed learning method is able to process 250 CTs in less than 90 milliseconds. \begin{table}
\begin{tabular}{l l l l} \hline \hline
**Very Important** & **Fairly Important** & **Important** & **Slightly Important** \\
**(Weight 0.16)** & **(Weight 0.12)** & **(Weight 0.08)** & **(Weight 0.04)** \\ \hline Diagnosis & Consultation reason & Medication & Message agents \\  & Current illness & Studies & Advisors \\  & Physical examination & Procedures & Excuse notes \\  & & Referral & Observations \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Weight of conceptual component types. #### 7.3.3 Execution Time Projection

In order to estimate the efficiency of the learning method when facing larger CKBs, auxiliary CTs were generated based on the information recorded by the students. Although the auxiliary CTs were artificially built and do not reflect real clinical scenarios, they can be used to evaluate the performance of the learning method as they have the same data dimension as the CTs written by the students. The graphic in Figure 5 reports the average time of the proposed method regarding CKB sizes. Figure 5 shows that the learning method generated suggestions in less than 1.25 s, even when facing larger CKBs with a great number of CTs. Given that 3000 represents a suitable bound for the number of CTs included in a physician CKB, the proposed method is able to produce suggestions in reasonable execution times, even when processing real CKBs with several workday scenarios. #### 7.3.4 Comparison with a Bayesian Learning Approach

To further analyze the applicability of the proposed approach, this subsection presents a comparison of the proposed instance-based learning method with a Bayesian learning method, which is based on a classical algorithm described by [PERSON] (2016) for classifying text documents. The implemented Bayesian learning method works under the assumption that the occurrence probability of a word is independent of its position within a document. During the learning task, all medical records are examined as training examples, aiming at extracting the vocabulary of all words appearing in patient histories. After that, the frequency of each word is computed on all case types, to obtain the probability estimates of the Bayesian approach. Finally, to classify a new draft of the register editor, the probability estimates are used to determine the most likely case type to be applied. Figure 4: Average execution time of the proposed learning method regarding different CKB sizes. Figure 5: Average execution time of the proposed learning method when facing larger CKBs. Figure 6 reports the average execution time of both the Bayesian method and the instance-based method, regarding different CKB sizes, when processing the testbed of 250 CTs registered by students.