{
  "id": 477742,
  "title": "KL Divergence for Gradient Descent ",
  "url": "/competitions/hms-harmful-brain-activity-classification/discussion/477742",
  "author_name": "",
  "post_date": "2024-02-17T15:39:08.083814400Z",
  "votes": 1,
  "comment_count": 1,
  "views": 0,
  "content": "<p>Is it possible to use the KL divergence as the loss function in something like XGBClassifier? I've been trying to do this and I'm stuck on being able to calculate the gradient of the function.  I'm not very sophisticated with respect to math, but I know that if I was able to somehow calculate the gradient and hessian for KL then I could create a custom loss function to use with XGBClassifier.</p>",
  "messages": [
    {
      "id": "2656316",
      "postDate": "02/17/2024 15:39:08",
      "content": "<p>Is it possible to use the KL divergence as the loss function in something like XGBClassifier? I've been trying to do this and I'm stuck on being able to calculate the gradient of the function.  I'm not very sophisticated with respect to math, but I know that if I was able to somehow calculate the gradient and hessian for KL then I could create a custom loss function to use with XGBClassifier.</p>",
      "rawMarkdown": "Is it possible to use the KL divergence as the loss function in something like XGBClassifier? I've been trying to do this and I'm stuck on being able to calculate the gradient of the function.  I'm not very sophisticated with respect to math, but I know that if I was able to somehow calculate the gradient and hessian for KL then I could create a custom loss function to use with XGBClassifier.",
      "votes": null
    },
    {
      "id": "2660947",
      "postDate": "02/20/2024 22:27:24",
      "content": "<p>Interesting idea!  Let us know how it pans out.  Thanks</p>",
      "rawMarkdown": "Interesting idea!  Let us know how it pans out.  Thanks",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2660947,
      "author_name": "matucker",
      "author_url": "",
      "post_date": "02/20/2024 22:27:24",
      "content": "<p>Interesting idea!  Let us know how it pans out.  Thanks</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2656316": "Is it possible to use the KL divergence as the loss function in something like XGBClassifier? I've been trying to do this and I'm stuck on being able to calculate the gradient of the function.  I'm not very sophisticated with respect to math, but I know that if I was able to somehow calculate the gradient and hessian for KL then I could create a custom loss function to use with XGBClassifier.",
    "2660947": "Interesting idea!  Let us know how it pans out.  Thanks"
  },
  "source": "meta"
}