{
  "id": 157060,
  "title": "AUC Metric",
  "url": "/competitions/siim-isic-melanoma-classification/discussion/157060",
  "author_name": "",
  "post_date": "2020-06-09T06:57:16.772275200Z",
  "votes": null,
  "comment_count": 1,
  "views": 0,
  "content": "<p>I have been trying to use label smoothing for training.\nCorrect me if im wrong, \"In label smoothing i need to one hot encode the target and have a softmax function in the model output layer\".\nI used tf.keras.metrics.AUC() in the metrics section.But in the whole training process the auc value is showing zero all the time.\nAnd additionally i have used class_weights parameter in the model.fit() method that i computed from the sklearn.utils.compute_class_weight.\nIs there anything wrong that i did to have an AUC Metric Error(\"Always showing zeros\")!!!</p>",
  "messages": [
    {
      "id": "879069",
      "postDate": "06/09/2020 06:57:16",
      "content": "<p>I have been trying to use label smoothing for training.\nCorrect me if im wrong, \"In label smoothing i need to one hot encode the target and have a softmax function in the model output layer\".\nI used tf.keras.metrics.AUC() in the metrics section.But in the whole training process the auc value is showing zero all the time.\nAnd additionally i have used class_weights parameter in the model.fit() method that i computed from the sklearn.utils.compute_class_weight.\nIs there anything wrong that i did to have an AUC Metric Error(\"Always showing zeros\")!!!</p>",
      "rawMarkdown": "I have been trying to use label smoothing for training.\nCorrect me if im wrong, \"In label smoothing i need to one hot encode the target and have a softmax function in the model output layer\".\nI used tf.keras.metrics.AUC() in the metrics section.But in the whole training process the auc value is showing zero all the time.\nAnd additionally i have used class_weights parameter in the model.fit() method that i computed from the sklearn.utils.compute_class_weight.\nIs there anything wrong that i did to have an AUC Metric Error(\"Always showing zeros\")!!!",
      "votes": null
    },
    {
      "id": "886283",
      "postDate": "06/14/2020 21:35:27",
      "content": "<p>The AUC metric requires a non 1 hot output layer. You need your final layer to have 1 output with 'sigmoid' activation function so that it is always a float between 0 and 1. This is required as the AUC metric does a sensitivity/specificity analysis which requires a % confidence estimation, not a binary 1 or 0. </p>",
      "rawMarkdown": "The AUC metric requires a non 1 hot output layer. You need your final layer to have 1 output with 'sigmoid' activation function so that it is always a float between 0 and 1. This is required as the AUC metric does a sensitivity/specificity analysis which requires a % confidence estimation, not a binary 1 or 0.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 886283,
      "author_name": "camlaman",
      "author_url": "",
      "post_date": "06/14/2020 21:35:27",
      "content": "<p>The AUC metric requires a non 1 hot output layer. You need your final layer to have 1 output with 'sigmoid' activation function so that it is always a float between 0 and 1. This is required as the AUC metric does a sensitivity/specificity analysis which requires a % confidence estimation, not a binary 1 or 0. </p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "879069": "I have been trying to use label smoothing for training.\nCorrect me if im wrong, \"In label smoothing i need to one hot encode the target and have a softmax function in the model output layer\".\nI used tf.keras.metrics.AUC() in the metrics section.But in the whole training process the auc value is showing zero all the time.\nAnd additionally i have used class_weights parameter in the model.fit() method that i computed from the sklearn.utils.compute_class_weight.\nIs there anything wrong that i did to have an AUC Metric Error(\"Always showing zeros\")!!!",
    "886283": "The AUC metric requires a non 1 hot output layer. You need your final layer to have 1 output with 'sigmoid' activation function so that it is always a float between 0 and 1. This is required as the AUC metric does a sensitivity/specificity analysis which requires a % confidence estimation, not a binary 1 or 0."
  },
  "source": "meta"
}