Added _calculate_loss_function with exception processing
Created by: gorokhovnik
PipelineTuner is not able to optimize metrics that have formats that are different from to return of cv_tabular_predictions. Thus it is needed to operate cases when metrics required another format. Examples: auc for binary classification, accuracy