  Standard objective functions used during the training of neural-network-based
predictive models do not consider clinical criteria, leading to models that are
not necessarily clinically acceptable. In this study, we look at this problem
from the perspective of the forecasting of future glucose values for diabetic
people. In this study, we propose the coherent mean squared glycemic error
(gcMSE) loss function. It penalizes the model during its training not only of
the prediction errors, but also on the predicted variation errors which is
important in glucose prediction. Moreover, it makes possible to adjust the
weighting of the different areas in the error space to better focus on
dangerous regions. In order to use the loss function in practice, we propose an
algorithm that progressively improves the clinical acceptability of the model,
so that we can achieve the best tradeoff possible between accuracy and given
clinical criteria. We evaluate the approaches using two diabetes datasets, one
having type-1 patients and the other type-2 patients. The results show that
using the gcMSE loss function, instead of a standard MSE loss function,
improves the clinical acceptability of the models. In particular, the
improvements are significant in the hypoglycemia region. We also show that this
increased clinical acceptability comes at the cost of a decrease in the average
accuracy of the model. Finally, we show that this tradeoff between accuracy and
clinical acceptability can be successfully addressed with the proposed
algorithm. For given clinical criteria, the algorithm can find the optimal
solution that maximizes the accuracy while at the same meeting the criteria.
