[{'role': 'system', 'content': "You are an expert in machine learning and your task is to classify the code snippets into categories from the provided list of categories. List of categories: ['helper_functions', 'load_data', 'data_exploration', 'data_preprocessing', 'evaluation', 'modelling', 'prediction', 'result_visualization', 'save_results', 'comment_only']"}, {'role': 'user', 'content': 'Identify to which category the provided code belongs and assign the code snippet to at least 1 but up to 5 categories based on the probabilities, ignore if the probability of the category is negligible. Strictly provide your response as a list. Avoid providing any additional information, commentary, or personal opinions.\\nPython Code:# Useful functions\n\nfrom tensorflow.keras.metrics import AUC\n\ndef mAP(y_true, y_pred):\n    return tf.py_func(average_precision_score, (y_true, y_pred), tf.double)\n\ndef compile_model(model, loss, metrics, optimizer):\n    model.compile(loss=loss, metrics=metrics, optimizer=optimizer)\n    return model\n\ndef plot_keras_history(history, measures):\n    """\n    history: Keras training history\n    measures = list of names of measures\n    """\n    rows = len(measures) // 2 + len(measures) % 2\n    fig, panels = plt.subplots(rows, 2, figsize=(15, 5))\n    plt.subplots_adjust(top = 0.99, bottom=0.01, hspace=0.4, wspace=0.2)\n    try:\n        panels = [item for sublist in panels for item in sublist]\n    except:\n        pass\n    for k, measure in enumerate(measures):\n        panel = panels[k]\n        panel.set_title(measure + \' history\')\n        panel.plot(history.epoch, history.history[measure], label="Train "+measure)\n        panel.plot(history.epoch, history.history["val_"+measure], label="Validation "+measure)\n        panel.set(xlabel=\'epochs\', ylabel=measure)\n        panel.legend()\n        \n    plt.show(fig)\''}, {'role': 'assistant', 'content': "['result_visualization']"}]