{
  "id": 17928,
  "title": "beat the benchmark - 0.042738",
  "url": "/competitions/second-annual-data-science-bowl/discussion/17928",
  "author_name": "",
  "post_date": "2015-12-15T18:06:37.450Z",
  "votes": 17,
  "comment_count": 3,
  "views": 2509,
  "content": "<pre><code>import pandas as pd\nimport numpy as np\ntrain = pd.read_csv('train.csv')\ndef doHist(data):\n    h = np.zeros(600)\n    for j in np.ceil(data.values).astype(int):\n        h[j:] += 1\n    h /= len(data)\n    return h\nhSystole = doHist(train.Systole)\nhDiastole = doHist(train.Diastole)\nsub = pd.read_csv('sample_submission_validate.csv', index_col='Id')\nN = len(sub)//2\nX = np.zeros((2*N,600))\nfor i in range(N):\n    X[2*i,:] = hDiastole\n    X[2*i+1,:] = hSystole\nsub[sub.columns] = X\nsub.to_csv('submission.csv')\n</code></pre>",
  "messages": [
    {
      "id": "101518",
      "postDate": "12/15/2015 18:06:37",
      "content": "<pre><code>import pandas as pd\nimport numpy as np\ntrain = pd.read_csv('train.csv')\ndef doHist(data):\n    h = np.zeros(600)\n    for j in np.ceil(data.values).astype(int):\n        h[j:] += 1\n    h /= len(data)\n    return h\nhSystole = doHist(train.Systole)\nhDiastole = doHist(train.Diastole)\nsub = pd.read_csv('sample_submission_validate.csv', index_col='Id')\nN = len(sub)//2\nX = np.zeros((2*N,600))\nfor i in range(N):\n    X[2*i,:] = hDiastole\n    X[2*i+1,:] = hSystole\nsub[sub.columns] = X\nsub.to_csv('submission.csv')\n</code></pre>",
      "rawMarkdown": "import pandas as pd\r\n    import numpy as np\r\n    train = pd.read_csv('train.csv')\r\n    def doHist(data):\r\n        h = np.zeros(600)\r\n        for j in np.ceil(data.values).astype(int):\r\n            h[j:] += 1\r\n        h /= len(data)\r\n        return h\r\n    hSystole = doHist(train.Systole)\r\n    hDiastole = doHist(train.Diastole)\r\n    sub = pd.read_csv('sample_submission_validate.csv', index_col='Id')\r\n    N = len(sub)//2\r\n    X = np.zeros((2*N,600))\r\n    for i in range(N):\r\n        X[2*i,:] = hDiastole\r\n        X[2*i+1,:] = hSystole\r\n    sub[sub.columns] = X\r\n    sub.to_csv('submission.csv')",
      "votes": null
    },
    {
      "id": "101534",
      "postDate": "12/15/2015 19:43:55",
      "content": "<p>@udibr you set up a new benchmark!\nI can't believe why this works so well at this point. This one even do not use data in train.zip...\nI guess when ppl start using train.zip, they will beat this result...</p>",
      "rawMarkdown": "udibr you set up a new benchmark!\r\nI can't believe why this works so well at this point. This one even do not use data in train.zip...\r\nI guess when ppl start using train.zip, they will beat this result...",
      "votes": null
    },
    {
      "id": "101542",
      "postDate": "12/15/2015 20:15:08",
      "content": "<p>[quote=Hang;101534]\nI guess when ppl start using train.zip, they will beat this result...\n[/quote]</p>\n\n<p>The Fourier and Deep learning tutorials disagree! hehe :D</p>",
      "rawMarkdown": "[quote=Hang;101534]\r\nI guess when ppl start using train.zip, they will beat this result...\r\n[/quote]\r\n\r\nThe Fourier and Deep learning tutorials disagree! hehe :D",
      "votes": null
    },
    {
      "id": "101689",
      "postDate": "12/16/2015 14:11:30",
      "content": "<p>Great. I tried DL for whole day, but I still cannot make my model run.</p>",
      "rawMarkdown": "Great. I tried DL for whole day, but I still cannot make my model run.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 101534,
      "author_name": "soundwaveli00",
      "author_url": "",
      "post_date": "12/15/2015 19:43:55",
      "content": "<p>@udibr you set up a new benchmark!\nI can't believe why this works so well at this point. This one even do not use data in train.zip...\nI guess when ppl start using train.zip, they will beat this result...</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 101542,
      "author_name": "carloshuertas",
      "author_url": "",
      "post_date": "12/15/2015 20:15:08",
      "content": "<p>[quote=Hang;101534]\nI guess when ppl start using train.zip, they will beat this result...\n[/quote]</p>\n\n<p>The Fourier and Deep learning tutorials disagree! hehe :D</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 101689,
      "author_name": "yejiming",
      "author_url": "",
      "post_date": "12/16/2015 14:11:30",
      "content": "<p>Great. I tried DL for whole day, but I still cannot make my model run.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "101518": "import pandas as pd\r\n    import numpy as np\r\n    train = pd.read_csv('train.csv')\r\n    def doHist(data):\r\n        h = np.zeros(600)\r\n        for j in np.ceil(data.values).astype(int):\r\n            h[j:] += 1\r\n        h /= len(data)\r\n        return h\r\n    hSystole = doHist(train.Systole)\r\n    hDiastole = doHist(train.Diastole)\r\n    sub = pd.read_csv('sample_submission_validate.csv', index_col='Id')\r\n    N = len(sub)//2\r\n    X = np.zeros((2*N,600))\r\n    for i in range(N):\r\n        X[2*i,:] = hDiastole\r\n        X[2*i+1,:] = hSystole\r\n    sub[sub.columns] = X\r\n    sub.to_csv('submission.csv')",
    "101534": "udibr you set up a new benchmark!\r\nI can't believe why this works so well at this point. This one even do not use data in train.zip...\r\nI guess when ppl start using train.zip, they will beat this result...",
    "101542": "[quote=Hang;101534]\r\nI guess when ppl start using train.zip, they will beat this result...\r\n[/quote]\r\n\r\nThe Fourier and Deep learning tutorials disagree! hehe :D",
    "101689": "Great. I tried DL for whole day, but I still cannot make my model run."
  },
  "source": "meta"
}