{
  "id": 208899,
  "title": "Using hyperopt with constraints",
  "url": "/competitions/riiid-test-answer-prediction/discussion/208899",
  "author_name": "Long Luu",
  "post_date": "2021-01-05T14:26:04.334000",
  "votes": 0,
  "comment_count": 0,
  "views": 0,
  "content": "<p>I am using Hyperopt to find the best hyperparams.<br>\nTo create search space for hyperopt, we can simply do:</p>\n<pre><code>space = {\n    'x': hp.uniform('x', -10, 10),\n    'y': hp.uniform('y', -10, 10)\n}\n</code></pre>\n<p>However, how can I do this when I want a condition like <code>x+y = 1</code>? And extend to more conditions like<code>x+y+z+t+...=1</code>, assume that we know how many variables there are?</p>",
  "messages": [
    {
      "id": 1139619,
      "postDate": "2021-01-05T14:26:04.333Z",
      "content": "<p>I am using Hyperopt to find the best hyperparams.<br>\nTo create search space for hyperopt, we can simply do:</p>\n<pre><code>space = {\n    'x': hp.uniform('x', -10, 10),\n    'y': hp.uniform('y', -10, 10)\n}\n</code></pre>\n<p>However, how can I do this when I want a condition like <code>x+y = 1</code>? And extend to more conditions like<code>x+y+z+t+...=1</code>, assume that we know how many variables there are?</p>",
      "rawMarkdown": "I am using Hyperopt to find the best hyperparams.\nTo create search space for hyperopt, we can simply do:\n```\nspace = {\n    'x': hp.uniform('x', -10, 10),\n    'y': hp.uniform('y', -10, 10)\n}\n\n```\nHowever, how can I do this when I want a condition like `x+y = 1`? And extend to more conditions like`x+y+z+t+...=1`, assume that we know how many variables there are?"
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "1139619": "I am using Hyperopt to find the best hyperparams.\nTo create search space for hyperopt, we can simply do:\n```\nspace = {\n    'x': hp.uniform('x', -10, 10),\n    'y': hp.uniform('y', -10, 10)\n}\n\n```\nHowever, how can I do this when I want a condition like `x+y = 1`? And extend to more conditions like`x+y+z+t+...=1`, assume that we know how many variables there are?"
  }
}