{
  "id": 83313,
  "title": "Ensemble and TTA Can help to boost your score",
  "url": "/competitions/histopathologic-cancer-detection/discussion/83313",
  "author_name": "",
  "post_date": "2019-03-08T14:17:43.182000",
  "votes": 12,
  "comment_count": 17,
  "views": 0,
  "content": "<p>I tried averaging ensemble by two .csv file which output in my kernel edit by Fastai v1 Densenet201 public kernel, one .csv scored 0.9605 and the other scored 0.9579, after averaging ensemble method I got 0.9744 finally\nHope you can boost your score by Ensemble methods</p>",
  "messages": [
    {
      "id": 486274,
      "postDate": "2019-03-08T14:17:43.183Z",
      "content": "<p>I tried averaging ensemble by two .csv file which output in my kernel edit by Fastai v1 Densenet201 public kernel, one .csv scored 0.9605 and the other scored 0.9579, after averaging ensemble method I got 0.9744 finally\nHope you can boost your score by Ensemble methods</p>",
      "rawMarkdown": "I tried averaging ensemble by two .csv file which output in my kernel edit by Fastai v1 Densenet201 public kernel, one .csv scored 0.9605 and the other scored 0.9579, after averaging ensemble method I got 0.9744 finally\nHope you can boost your score by Ensemble methods",
      "votes": 12
    },
    {
      "id": 489423,
      "postDate": "2019-03-13T22:14:28.150Z",
      "content": "<p>TTA is amazing, I tried my densenet169 model with TTA and predict 8 times and get mean of 8 predictions, I got 0.9730; with 16 predictions, I got 0.9738, with 32 predictions got 0.9742. For my nasnet-mobile model, I only test 4 predictions and 8 predictions, 4 predictions got 0.9689 and 8 predictions got 0.9702.  For my densenet121 model, 8 predictions got 0.9722 and 16 predictions got 0.9730.  </p>",
      "rawMarkdown": "TTA is amazing, I tried my densenet169 model with TTA and predict 8 times and get mean of 8 predictions, I got 0.9730; with 16 predictions, I got 0.9738, with 32 predictions got 0.9742. For my nasnet-mobile model, I only test 4 predictions and 8 predictions, 4 predictions got 0.9689 and 8 predictions got 0.9702.  For my densenet121 model, 8 predictions got 0.9722 and 16 predictions got 0.9730.  ",
      "votes": 7,
      "replies": [
        {
          "id": 489444,
          "postDate": "2019-03-13T23:21:18.440Z",
          "rawMarkdown": "",
          "isDeleted": true
        },
        {
          "id": 489724,
          "postDate": "2019-03-14T03:21:47.233Z",
          "content": "<p>Good job!</p>",
          "rawMarkdown": "Good job!",
          "votes": 3
        },
        {
          "id": 489756,
          "postDate": "2019-03-14T03:56:38.353Z",
          "content": "<p>lol</p>",
          "rawMarkdown": "lol",
          "votes": 2
        },
        {
          "id": 497235,
          "postDate": "2019-03-23T07:22:07.830Z",
          "content": "<p>Is there a limit after which ensemble doesn't maximize?</p>",
          "rawMarkdown": "Is there a limit after which ensemble doesn't maximize?"
        },
        {
          "id": 497434,
          "postDate": "2019-03-23T15:00:54.420Z",
          "content": "<p>You mean TTA or ensemble of different models? Whatever, TTA is like the ensemble of the same structure nets  with different inputs (I think. Since we do many transformation, there are so many combinations of our transformation, every prediction could be different with each other,  and the diversity could increase the result. I don't test more than 32 times since the computation cost is so large, but I think more predictions might help the result too. I don't read any papers or proof, but from my intuition, if we get all predictions of all transformation combinations that we used in training, the result could be the limit.   </p>",
          "rawMarkdown": "You mean TTA or ensemble of different models? Whatever, TTA is like the ensemble of the same structure nets  with different inputs (I think. Since we do many transformation, there are so many combinations of our transformation, every prediction could be different with each other,  and the diversity could increase the result. I don't test more than 32 times since the computation cost is so large, but I think more predictions might help the result too. I don't read any papers or proof, but from my intuition, if we get all predictions of all transformation combinations that we used in training, the result could be the limit.   ",
          "votes": 1
        }
      ]
    },
    {
      "id": 486803,
      "postDate": "2019-03-09T12:51:06.627Z",
      "content": "<p>Absolutely!  Ensemble methods really works in deep learning competitions, even the simplest mean ensemble.</p>",
      "rawMarkdown": "Absolutely!  Ensemble methods really works in deep learning competitions, even the simplest mean ensemble.",
      "votes": 3
    },
    {
      "id": 486847,
      "postDate": "2019-03-09T14:39:30.307Z",
      "content": "<p>Ensemble  and TTA both works.</p>",
      "rawMarkdown": "Ensemble  and TTA both works.",
      "votes": 4,
      "replies": [
        {
          "id": 486848,
          "postDate": "2019-03-09T14:46:30.300Z",
          "content": "<p>Thanks for your sharing, I will try to use TTA</p>",
          "rawMarkdown": "Thanks for your sharing, I will try to use TTA",
          "votes": 1
        },
        {
          "id": 487128,
          "postDate": "2019-03-10T07:26:07.993Z",
          "content": "<p>Hey @HanLi, thanks for your suggestion. Could you please tell me what type of TTAs should we prefer for this particular competition?</p>",
          "rawMarkdown": "Hey @HanLi, thanks for your suggestion. Could you please tell me what type of TTAs should we prefer for this particular competition?"
        },
        {
          "id": 487300,
          "postDate": "2019-03-10T16:12:07.487Z",
          "content": "<ol>\n<li>Horizontally flip/Vertically flip/rotate by 4 multiples of 90.All 8 orientations are valid because pathology slides do not have canonical orientations.</li>\n<li>you can also use some other transforms like change brightness/ saturation/contrast slightly.</li>\n</ol>\n\n<p>take the average of regular predictions(8 orientations) (with a weight beta) with the average of predictions obtained through augmented versions  (with a weight 1-beta)</p>",
          "rawMarkdown": "1. Horizontally flip/Vertically flip/rotate by 4 multiples of 90.All 8 orientations are valid because pathology slides do not have canonical orientations.\n2. you can also use some other transforms like change brightness/ saturation/contrast slightly.\n\ntake the average of regular predictions(8 orientations) (with a weight beta) with the average of predictions obtained through augmented versions  (with a weight 1-beta)",
          "votes": 5
        },
        {
          "id": 490218,
          "postDate": "2019-03-14T12:02:03.493Z",
          "rawMarkdown": "",
          "isDeleted": true
        },
        {
          "id": 491562,
          "postDate": "2019-03-15T19:49:33.440Z",
          "content": "<p>Hello HangLi, thank you for contribution. \nWhat do you mean saying \"with a weight beta\"?</p>",
          "rawMarkdown": "Hello HangLi, thank you for contribution. \nWhat do you mean saying \"with a weight beta\"?\n",
          "votes": 1
        },
        {
          "id": 492925,
          "postDate": "2019-03-18T02:08:11.930Z",
          "content": "<p>something like {sum(predictions with flip or rotate) / #aug of orientations}*beta + {sum(predictions with other augmentations) /#aug} * (1-beta)</p>",
          "rawMarkdown": "something like {sum(predictions with flip or rotate) / #aug of orientations}*beta + {sum(predictions with other augmentations) /#aug} * (1-beta)",
          "votes": 1
        }
      ]
    },
    {
      "id": 494482,
      "postDate": "2019-03-19T22:06:45.097Z",
      "content": "<p>Ensemble learning is amazing!</p>",
      "rawMarkdown": "Ensemble learning is amazing!",
      "votes": 1
    },
    {
      "id": 486332,
      "postDate": "2019-03-08T16:10:42.987Z",
      "content": "<p>Hope for your replies</p>",
      "rawMarkdown": "Hope for your replies",
      "votes": 1
    },
    {
      "id": 486365,
      "postDate": "2019-03-08T17:13:14.563Z",
      "content": "<p>That's a big jump. Will going to do that just before the end of the competition.</p>",
      "rawMarkdown": "That's a big jump. Will going to do that just before the end of the competition."
    }
  ],
  "comments": [
    {
      "id": 489423,
      "author_name": "jionie",
      "author_url": "",
      "post_date": "2019-03-13T22:14:28.150000",
      "content": "<p>TTA is amazing, I tried my densenet169 model with TTA and predict 8 times and get mean of 8 predictions, I got 0.9730; with 16 predictions, I got 0.9738, with 32 predictions got 0.9742. For my nasnet-mobile model, I only test 4 predictions and 8 predictions, 4 predictions got 0.9689 and 8 predictions got 0.9702.  For my densenet121 model, 8 predictions got 0.9722 and 16 predictions got 0.9730.  </p>",
      "votes": 7,
      "replies": [
        {
          "id": 489444,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-03-13T23:21:18.440000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 489724,
          "author_name": "seefun",
          "author_url": "",
          "post_date": "2019-03-14T03:21:47.233000",
          "content": "<p>Good job!</p>",
          "votes": 3,
          "replies": []
        },
        {
          "id": 489756,
          "author_name": "jionie",
          "author_url": "",
          "post_date": "2019-03-14T03:56:38.353000",
          "content": "<p>lol</p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 497235,
          "author_name": "Sayantan Das",
          "author_url": "",
          "post_date": "2019-03-23T07:22:07.830000",
          "content": "<p>Is there a limit after which ensemble doesn't maximize?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 497434,
          "author_name": "jionie",
          "author_url": "",
          "post_date": "2019-03-23T15:00:54.420000",
          "content": "<p>You mean TTA or ensemble of different models? Whatever, TTA is like the ensemble of the same structure nets  with different inputs (I think. Since we do many transformation, there are so many combinations of our transformation, every prediction could be different with each other,  and the diversity could increase the result. I don't test more than 32 times since the computation cost is so large, but I think more predictions might help the result too. I don't read any papers or proof, but from my intuition, if we get all predictions of all transformation combinations that we used in training, the result could be the limit.   </p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 486803,
      "author_name": "seefun",
      "author_url": "",
      "post_date": "2019-03-09T12:51:06.627000",
      "content": "<p>Absolutely!  Ensemble methods really works in deep learning competitions, even the simplest mean ensemble.</p>",
      "votes": 3,
      "replies": []
    },
    {
      "id": 486847,
      "author_name": "StepD",
      "author_url": "",
      "post_date": "2019-03-09T14:39:30.307000",
      "content": "<p>Ensemble  and TTA both works.</p>",
      "votes": 4,
      "replies": [
        {
          "id": 486848,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-03-09T14:46:30.300000",
          "content": "<p>Thanks for your sharing, I will try to use TTA</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 487128,
          "author_name": "Rishabh Agrahari",
          "author_url": "",
          "post_date": "2019-03-10T07:26:07.993000",
          "content": "<p>Hey @HanLi, thanks for your suggestion. Could you please tell me what type of TTAs should we prefer for this particular competition?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 487300,
          "author_name": "StepD",
          "author_url": "",
          "post_date": "2019-03-10T16:12:07.487000",
          "content": "<ol>\n<li>Horizontally flip/Vertically flip/rotate by 4 multiples of 90.All 8 orientations are valid because pathology slides do not have canonical orientations.</li>\n<li>you can also use some other transforms like change brightness/ saturation/contrast slightly.</li>\n</ol>\n\n<p>take the average of regular predictions(8 orientations) (with a weight beta) with the average of predictions obtained through augmented versions  (with a weight 1-beta)</p>",
          "votes": 5,
          "replies": []
        },
        {
          "id": 490218,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-03-14T12:02:03.493000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 491562,
          "author_name": "Dimitrij Shulkin",
          "author_url": "",
          "post_date": "2019-03-15T19:49:33.440000",
          "content": "<p>Hello HangLi, thank you for contribution. \nWhat do you mean saying \"with a weight beta\"?</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 492925,
          "author_name": "StepD",
          "author_url": "",
          "post_date": "2019-03-18T02:08:11.930000",
          "content": "<p>something like {sum(predictions with flip or rotate) / #aug of orientations}*beta + {sum(predictions with other augmentations) /#aug} * (1-beta)</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 494482,
      "author_name": "Heng Fang",
      "author_url": "",
      "post_date": "2019-03-19T22:06:45.097000",
      "content": "<p>Ensemble learning is amazing!</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 486332,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-03-08T16:10:42.987000",
      "content": "<p>Hope for your replies</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 486365,
      "author_name": "Rohit Gupta",
      "author_url": "",
      "post_date": "2019-03-08T17:13:14.563000",
      "content": "<p>That's a big jump. Will going to do that just before the end of the competition.</p>",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "486274": "I tried averaging ensemble by two .csv file which output in my kernel edit by Fastai v1 Densenet201 public kernel, one .csv scored 0.9605 and the other scored 0.9579, after averaging ensemble method I got 0.9744 finally\nHope you can boost your score by Ensemble methods",
    "489423": "TTA is amazing, I tried my densenet169 model with TTA and predict 8 times and get mean of 8 predictions, I got 0.9730; with 16 predictions, I got 0.9738, with 32 predictions got 0.9742. For my nasnet-mobile model, I only test 4 predictions and 8 predictions, 4 predictions got 0.9689 and 8 predictions got 0.9702.  For my densenet121 model, 8 predictions got 0.9722 and 16 predictions got 0.9730.  ",
    "486803": "Absolutely!  Ensemble methods really works in deep learning competitions, even the simplest mean ensemble.",
    "486847": "Ensemble  and TTA both works.",
    "494482": "Ensemble learning is amazing!",
    "486332": "Hope for your replies",
    "486365": "That's a big jump. Will going to do that just before the end of the competition."
  }
}