2. The Backend Services
The model training service is provided by our python deep feedforward neural network (DFNN) programs
[1], [2], which were developed by using the Keras python package [3]. We included this service in the
iMedBot because we assume there are scenarios in which the users prefer training prediction models using
their own data. When a model training service call is initialized in the front end and passed to the back end,
the dataset provided by the user will be split in stratified manner: 80% of the data will be used to train
models following the 5-fold cross validation strategies and 20% of the data will be used as the validation
dataset. The validation AUC is one of the output of the model training service, which will be displayed by
the [4].which will be generated by testing the best output model of a grid search using the validation dataset.
Grid search is a systematic way of conduct hyperparameter tuning to identify the best performing models
in deep learning [3]. Our DFNN models have 13 hyperparameters. We call one particular value assignment
of the set of hyperparameters of our DFNN models a hyperparameter setting. So each DFNN model has a
unique hyperparameter setting. Before a grid search, each of the hyperparameters is given a range of values
the hyperparameter can take. Grid search will train all DFNN models corresponding to all possible
hyperparameter settings determined by the preselected ranges of values for the hyperparameters. The results
returned by the model training service include the validation AUC, the ROC curve plot [4], and the best
prediction model found by grid search.
The prediction service is provided by a set of deep feedforward neural network (DFNN) models
that were pretrained with our DFNN programs [3] by Grid search strategy.[3] Grid search will train all
DFNN models corresponding to all possible hyperparameter settings determined by the preselected ranges
of values for the hyperparameters. The same procedures used in model training service were used for
pretraining these models. The difference between these two kinds of services is that the model training
service is meant to train models using user-provided datasets, while the pretrained DFNN models were
trained using the LSM 5-, 10-, 15-year datasets that are publicly available [3], [5]. The pretrained DFNN
models are the best performing models selected from a large set of models trained via grid search. A detailed
description of the DFNN model training, grid search, and model evaluation is provided in [3], [6]. The
pretrained DFNN models contain a set of predictors [3], which are the clinical features defined by the
datasets from which these models were trained; These models can be used to conduct personalized
prediction once the patient-specific values of the predictors are received.
In addition to the two core services, the back end contains other python tools that we developed for
tasks such as processing input data, analyzing results, and evaluating the prediction performance of models.
These tools provide some of the assistant services such as generating the ROC curves based on the 5-fold
cross validation to compare the prediction performance of different models [3]. The iMedBot is currently
hosted at the AWS (Amazon Web Services), and therefore there are other supporting system components
in the backend, which are provided by AWS S3.
3. The Front End
The front end of the iMedBot has a main user friendly agent-user interaction window, which hosts the
sequence of dialogues once the “conversion” between the again and user begins. The possible dialogues are
designed based on the current two core back end services that the iMedBot can provide: the prediction and
model training. For example, to provide the personalized prediction service, the iMedBot will initialize a
sequence of dialogues to go through with the user the set of the predictors of the back end DFNN models
one after another. For each of the predictors, the iMedBot will provide to the user a list of all possible values
of the predictor, from which ana user can select his/her patient specific value with an action as simple as
clicking a button. Once the iMedBot receives the user input/responses, it will communicate with the proper
back end components, pass over the user input collected through the “conversation” to the best model object
that we deployed in our S3 bucket in the backend, and then receive and display the results from the back
end. Figure 2, 3 show two examples of these agent-user interaction dialogues. The first example shows the