{
  "id": 469192,
  "title": "Hard labels and soft labels",
  "url": "/competitions/hms-harmful-brain-activity-classification/discussion/469192",
  "author_name": "",
  "post_date": "2024-01-19T13:46:58.508277Z",
  "votes": 4,
  "comment_count": 1,
  "views": 0,
  "content": "<p>In this notebook <a href=\"https://www.kaggle.com/code/yunsuxiaozi/hms-baseline-resnet34d-512-512-training-5-folds\" target=\"_blank\">https://www.kaggle.com/code/yunsuxiaozi/hms-baseline-resnet34d-512-512-training-5-folds</a>, I used resnet and used probability values to calculate KL divergence to train the model. However, in this notebookhttps://<a href=\"http://www.kaggle.com/code/yunsuxiaozi/hms-baseline-lgb-10-folds-training\" target=\"_blank\">www.kaggle.com/code/yunsuxiaozi/hms-baseline-lgb-10-folds-training</a>, I can only use labels and cannot directly use probability to train the model. I believe this is the reason for the difference in performance between the two models. Is there a way to improve the tree model to achieve the same effect as the neural network</p>",
  "messages": [
    {
      "id": "2609441",
      "postDate": "01/19/2024 13:46:58",
      "content": "<p>In this notebook <a href=\"https://www.kaggle.com/code/yunsuxiaozi/hms-baseline-resnet34d-512-512-training-5-folds\" target=\"_blank\">https://www.kaggle.com/code/yunsuxiaozi/hms-baseline-resnet34d-512-512-training-5-folds</a>, I used resnet and used probability values to calculate KL divergence to train the model. However, in this notebookhttps://<a href=\"http://www.kaggle.com/code/yunsuxiaozi/hms-baseline-lgb-10-folds-training\" target=\"_blank\">www.kaggle.com/code/yunsuxiaozi/hms-baseline-lgb-10-folds-training</a>, I can only use labels and cannot directly use probability to train the model. I believe this is the reason for the difference in performance between the two models. Is there a way to improve the tree model to achieve the same effect as the neural network</p>",
      "rawMarkdown": "In this notebook https://www.kaggle.com/code/yunsuxiaozi/hms-baseline-resnet34d-512-512-training-5-folds, I used resnet and used probability values to calculate KL divergence to train the model. However, in this notebookhttps://www.kaggle.com/code/yunsuxiaozi/hms-baseline-lgb-10-folds-training, I can only use labels and cannot directly use probability to train the model. I believe this is the reason for the difference in performance between the two models. Is there a way to improve the tree model to achieve the same effect as the neural network",
      "votes": null
    },
    {
      "id": "2640252",
      "postDate": "02/06/2024 18:52:37",
      "content": "<p>Have you tried to melt rows so that you have row per vote? I would expect that this handles data similarly to probability targets since your model will have to calibrate estimates to avoid overestimation and can factor in some elements of certainty based on the number of votes. In polars:</p>\n<pre><code>pl.([\n     pl.DataFrame({'rowix':, 'vote':[]}) \n        (df_train_sample.shape[])\n        pred_classes\n        (df_train_sample[, ])\n])\n</code></pre>",
      "rawMarkdown": "Have you tried to melt rows so that you have row per vote? I would expect that this handles data similarly to probability targets since your model will have to calibrate estimates to avoid overestimation and can factor in some elements of certainty based on the number of votes. In polars:\n\n```\npl.concat([\n     pl.DataFrame({'rowix':row, 'vote':[col]}) \n     for row in range(df_train_sample.shape[0])\n     for col in pred_classes\n     for _ in range(df_train_sample[row, col])\n])\n```",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2640252,
      "author_name": "jrhaberstroh",
      "author_url": "",
      "post_date": "02/06/2024 18:52:37",
      "content": "<p>Have you tried to melt rows so that you have row per vote? I would expect that this handles data similarly to probability targets since your model will have to calibrate estimates to avoid overestimation and can factor in some elements of certainty based on the number of votes. In polars:</p>\n<pre><code>pl.([\n     pl.DataFrame({'rowix':, 'vote':[]}) \n        (df_train_sample.shape[])\n        pred_classes\n        (df_train_sample[, ])\n])\n</code></pre>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2609441": "In this notebook https://www.kaggle.com/code/yunsuxiaozi/hms-baseline-resnet34d-512-512-training-5-folds, I used resnet and used probability values to calculate KL divergence to train the model. However, in this notebookhttps://www.kaggle.com/code/yunsuxiaozi/hms-baseline-lgb-10-folds-training, I can only use labels and cannot directly use probability to train the model. I believe this is the reason for the difference in performance between the two models. Is there a way to improve the tree model to achieve the same effect as the neural network",
    "2640252": "Have you tried to melt rows so that you have row per vote? I would expect that this handles data similarly to probability targets since your model will have to calibrate estimates to avoid overestimation and can factor in some elements of certainty based on the number of votes. In polars:\n\n```\npl.concat([\n     pl.DataFrame({'rowix':row, 'vote':[col]}) \n     for row in range(df_train_sample.shape[0])\n     for col in pred_classes\n     for _ in range(df_train_sample[row, col])\n])\n```"
  },
  "source": "meta"
}