{
  "id": 7698,
  "title": "Python scripts for Correlation Benchmarks",
  "url": "/competitions/connectomics/discussion/7698",
  "author_name": "",
  "post_date": "2014-04-15T18:01:10.697Z",
  "votes": 2,
  "comment_count": 2,
  "views": 1219,
  "content": "<p>Python scripts for Correlation Benchmarks with discretization are now available at https://github.com/bisakha/Connectomics<br>1. Download the data (valid.tgz and test.tgz), uncompress it, and put it in the SampleCode/data directory.<br>2. In challengeMain.py on line 153 and 155, change mockvalid and mocktest to valid and test.<br>3. Run python challengeMain.py<br>This will produce a file [algoname]_[dataset1]_[dataset2]_[datetime]_kaggle_ready.csv with 2000001 rows. Upload this as your submission to Kaggle.</p>",
  "messages": [
    {
      "id": "41948",
      "postDate": "04/15/2014 18:01:10",
      "content": "<p>Python scripts for Correlation Benchmarks with discretization are now available at https://github.com/bisakha/Connectomics<br>1. Download the data (valid.tgz and test.tgz), uncompress it, and put it in the SampleCode/data directory.<br>2. In challengeMain.py on line 153 and 155, change mockvalid and mocktest to valid and test.<br>3. Run python challengeMain.py<br>This will produce a file [algoname]_[dataset1]_[dataset2]_[datetime]_kaggle_ready.csv with 2000001 rows. Upload this as your submission to Kaggle.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "41976",
      "postDate": "04/15/2014 22:53:26",
      "content": "<p>I've updated my Python correlation benchmark blogpost with a link to the github repo.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "42293",
      "postDate": "04/18/2014 06:39:32",
      "content": "<p>Just to get some of you started, you can do as good as GTE in less than 10&nbsp;lines of Python, within a few seconds of CPU time. No need for tons of code.&nbsp;</p>\n<p><code>import pandas as pd<br>import numpy as np</code></p>\n<p><code>data = pd.read_csv(&quot;fluorescence_normal-1.txt&quot;).values<br>data = np.diff(data, axis=0)<br>data = data &gt; 0.12 # Discretize</code></p>\n<p><code>network = np.corrcoef(data.T)</code></p>\n<p><code>from sklearn.metrics import roc_auc_score<br>roc_auc_score(graph.ravel(), network.ravel()) # graph is the true network on normal-1<br>&gt;&gt;&gt; 0.87998231706737085</code></p>",
      "rawMarkdown": "",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 41976,
      "author_name": "triskelion",
      "author_url": "",
      "post_date": "04/15/2014 22:53:26",
      "content": "<p>I've updated my Python correlation benchmark blogpost with a link to the github repo.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 42293,
      "author_name": "glouppe",
      "author_url": "",
      "post_date": "04/18/2014 06:39:32",
      "content": "<p>Just to get some of you started, you can do as good as GTE in less than 10&nbsp;lines of Python, within a few seconds of CPU time. No need for tons of code.&nbsp;</p>\n<p><code>import pandas as pd<br>import numpy as np</code></p>\n<p><code>data = pd.read_csv(&quot;fluorescence_normal-1.txt&quot;).values<br>data = np.diff(data, axis=0)<br>data = data &gt; 0.12 # Discretize</code></p>\n<p><code>network = np.corrcoef(data.T)</code></p>\n<p><code>from sklearn.metrics import roc_auc_score<br>roc_auc_score(graph.ravel(), network.ravel()) # graph is the true network on normal-1<br>&gt;&gt;&gt; 0.87998231706737085</code></p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "41948": "",
    "41976": "",
    "42293": ""
  },
  "source": "meta"
}