{
  "id": 114369,
  "title": "multi class weighted ensemble",
  "url": "/competitions/rsna-intracranial-hemorrhage-detection/discussion/114369",
  "author_name": "Kartik Nighania",
  "post_date": "2019-10-25T19:40:32.110000",
  "votes": 0,
  "comment_count": 2,
  "views": 0,
  "content": "<p>i was wondering how to do multiclass weighted ensembling of models here. After getting the output of each model on valid set and having the targets for them. How to find the ensemble weights and apply them on test set predictions ?</p>",
  "messages": [
    {
      "id": 658259,
      "postDate": "2019-10-25T21:01:42.517Z",
      "content": "<p>i might be to naive though,....\n<code>preds = [m1, m2, mx...]</code>\n<code>weights= [w1, w2, wx...]</code>\n<code>sub = np.sum( [i*ii for i.ii in zip(preds,weights)] , axis) / sum(weights)</code></p>",
      "rawMarkdown": "i might be to naive though,....\n`preds = [m1, m2, mx...]`\n`weights= [w1, w2, wx...]`\n`sub = np.sum( [i*ii for i.ii in zip(preds,weights)] , axis) / sum(weights)`",
      "replies": [
        {
          "id": 658486,
          "postDate": "2019-10-26T04:05:21.290Z",
          "content": "<p>thanks. Im trying to find out the weights first. :)</p>",
          "rawMarkdown": "thanks. Im trying to find out the weights first. :)",
          "votes": 1
        }
      ]
    },
    {
      "id": 658211,
      "postDate": "2019-10-25T19:40:32.110Z",
      "content": "<p>i was wondering how to do multiclass weighted ensembling of models here. After getting the output of each model on valid set and having the targets for them. How to find the ensemble weights and apply them on test set predictions ?</p>",
      "rawMarkdown": "i was wondering how to do multiclass weighted ensembling of models here. After getting the output of each model on valid set and having the targets for them. How to find the ensemble weights and apply them on test set predictions ?"
    }
  ],
  "comments": [
    {
      "id": 658259,
      "author_name": "Miroslav Valan",
      "author_url": "",
      "post_date": "2019-10-25T21:01:42.517000",
      "content": "<p>i might be to naive though,....\n<code>preds = [m1, m2, mx...]</code>\n<code>weights= [w1, w2, wx...]</code>\n<code>sub = np.sum( [i*ii for i.ii in zip(preds,weights)] , axis) / sum(weights)</code></p>",
      "votes": 0,
      "replies": [
        {
          "id": 658486,
          "author_name": "Kartik Nighania",
          "author_url": "",
          "post_date": "2019-10-26T04:05:21.290000",
          "content": "<p>thanks. Im trying to find out the weights first. :)</p>",
          "votes": 1,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "658259": "i might be to naive though,....\n`preds = [m1, m2, mx...]`\n`weights= [w1, w2, wx...]`\n`sub = np.sum( [i*ii for i.ii in zip(preds,weights)] , axis) / sum(weights)`",
    "658211": "i was wondering how to do multiclass weighted ensembling of models here. After getting the output of each model on valid set and having the targets for them. How to find the ensemble weights and apply them on test set predictions ?"
  }
}