{"action":"created","comment":{"url":"https://api.github.com/repos/giovanichiachia/simple-hp/pulls/comments/23073552","id":23073552,"diff_hunk":"@@ -0,0 +1,167 @@\n+# Authors: Giovani Chiachia <giovani.chiachia@gmail.com>\n+#\n+# License: BSD\n+\n+import os\n+import optparse\n+import pprint\n+\n+from scipy import misc\n+from scipy import io\n+\n+import hyperopt\n+\n+from simplehp.opt.base import datasets, learning_algos\n+from simplehp.opt.hp import objective, build_search_space\n+from simplehp.util.util import load_hp\n+\n+speed_thresh = {'seconds': 2.0, 'elements': 4}\n+\n+\n+class WriteAdapter(object):\n+\tdef __init__(self, dataprovider, filename):\n+\t\tsuper(WriteAdapter, self).__init__()\n+\t\tself.provider = dataprovider\n+\t\tself.filename = filename\n+\n+\tdef protocol_imgs(self):\n+\t\treturn self.provider.protocol_imgs()\n+\t\n+\tdef protocol_eval(self, algo, feat_set):\n+\n+\t\tX = feat_set\n+\t\tY = []\n+\n+\t\tif 'protocol_labels' in dir(self.provider):\n+\t\t\tY = self.provider.protocol_labels()\n+\n+\t\tdataset = dict(X = X, Y = Y)\n+\n+\t\tio.savemat(self.filename, dataset, do_compression=True)","path":"simplehp/scripts/generate_dataset.py","position":40,"original_position":40,"commit_id":"c5389a1d9f6d288e3b10c5bd26aeab78ed6068c2","original_commit_id":"c5389a1d9f6d288e3b10c5bd26aeab78ed6068c2","user":{"login":"giovanichiachia","id":1382889,"avatar_url":"https://avatars.githubusercontent.com/u/1382889?v=3","gravatar_id":"","url":"https://api.github.com/users/giovanichiachia","html_url":"https://github.com/giovanichiachia","followers_url":"https://api.github.com/users/giovanichiachia/followers","following_url":"https://api.github.com/users/giovanichiachia/following{/other_user}","gists_url":"https://api.github.com/users/giovanichiachia/gists{/gist_id}","starred_url":"https://api.github.com/users/giovanichiachia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giovanichiachia/subscriptions","organizations_url":"https://api.github.com/users/giovanichiachia/orgs","repos_url":"https://api.github.com/users/giovanichiachia/repos","events_url":"https://api.github.com/users/giovanichiachia/events{/privacy}","received_events_url":"https://api.github.com/users/giovanichiachia/received_events","type":"User","site_admin":false},"body":"please save in pkl format for consistency","created_at":"2015-01-16T10:45:14Z","updated_at":"2015-01-16T10:45:14Z","html_url":"https://github.com/giovanichiachia/simple-hp/pull/2#discussion_r23073552","pull_request_url":"https://api.github.com/repos/giovanichiachia/simple-hp/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/giovanichiachia/simple-hp/pulls/comments/23073552"},"html":{"href":"https://github.com/giovanichiachia/simple-hp/pull/2#discussion_r23073552"},"pull_request":{"href":"https://api.github.com/repos/giovanichiachia/simple-hp/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/giovanichiachia/simple-hp/pulls/2","id":27248593,"html_url":"https://github.com/giovanichiachia/simple-hp/pull/2","diff_url":"https://github.com/giovanichiachia/simple-hp/pull/2.diff","patch_url":"https://github.com/giovanichiachia/simple-hp/pull/2.patch","issue_url":"https://api.github.com/repos/giovanichiachia/simple-hp/issues/2","number":2,"state":"open","locked":false,"title":"Generate Dataset","user":{"login":"alan-mnix","id":3215952,"avatar_url":"https://avatars.githubusercontent.com/u/3215952?v=3","gravatar_id":"","url":"https://api.github.com/users/alan-mnix","html_url":"https://github.com/alan-mnix","followers_url":"https://api.github.com/users/alan-mnix/followers","following_url":"https://api.github.com/users/alan-mnix/following{/other_user}","gists_url":"https://api.github.com/users/alan-mnix/gists{/gist_id}","starred_url":"https://api.github.com/users/alan-mnix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alan-mnix/subscriptions","organizations_url":"https://api.github.com/users/alan-mnix/orgs","repos_url":"https://api.github.com/users/alan-mnix/repos","events_url":"https://api.github.com/users/alan-mnix/events{/privacy}","received_events_url":"https://api.github.com/users/alan-mnix/received_events","type":"User","site_admin":false},"body":"scripts/generate-dataset.py file to save datasets in the MATLAB/OCTAVE format.","created_at":"2015-01-13T05:14:20Z","updated_at":"2015-01-16T10:45:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"74ddf713c74b6272bea65134838db33d9fb97eb1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/giovanichiachia/simple-hp/pulls/2/commits","review_comments_url":"https://api.github.com/repos/giovanichiachia/simple-hp/pulls/2/comments","review_comment_url":"https://api.github.com/repos/giovanichiachia/simple-hp/pulls/comments/{number}","comments_url":"https://api.github.com/repos/giovanichiachia/simple-hp/issues/2/comments","statuses_url":"https://api.github.com/repos/giovanichiachia/simple-hp/statuses/c5389a1d9f6d288e3b10c5bd26aeab78ed6068c2","head":{"label":"alan-mnix:generate-dataset","ref":"generate-dataset","sha":"c5389a1d9f6d288e3b10c5bd26aeab78ed6068c2","user":{"login":"alan-mnix","id":3215952,"avatar_url":"https://avatars.githubusercontent.com/u/3215952?v=3","gravatar_id":"","url":"https://api.github.com/users/alan-mnix","html_url":"https://github.com/alan-mnix","followers_url":"https://api.github.com/users/alan-mnix/followers","following_url":"https://api.github.com/users/alan-mnix/following{/other_user}","gists_url":"https://api.github.com/users/alan-mnix/gists{/gist_id}","starred_url":"https://api.github.com/users/alan-mnix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alan-mnix/subscriptions","organizations_url":"https://api.github.com/users/alan-mnix/orgs","repos_url":"https://api.github.com/users/alan-mnix/repos","events_url":"https://api.github.com/users/alan-mnix/events{/privacy}","received_events_url":"https://api.github.com/users/alan-mnix/received_events","type":"User","site_admin":false},"repo":{"id":29173907,"name":"simple-hp","full_name":"alan-mnix/simple-hp","owner":{"login":"alan-mnix","id":3215952,"avatar_url":"https://avatars.githubusercontent.com/u/3215952?v=3","gravatar_id":"","url":"https://api.github.com/users/alan-mnix","html_url":"https://github.com/alan-mnix","followers_url":"https://api.github.com/users/alan-mnix/followers","following_url":"https://api.github.com/users/alan-mnix/following{/other_user}","gists_url":"https://api.github.com/users/alan-mnix/gists{/gist_id}","starred_url":"https://api.github.com/users/alan-mnix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alan-mnix/subscriptions","organizations_url":"https://api.github.com/users/alan-mnix/orgs","repos_url":"https://api.github.com/users/alan-mnix/repos","events_url":"https://api.github.com/users/alan-mnix/events{/privacy}","received_events_url":"https://api.github.com/users/alan-mnix/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alan-mnix/simple-hp","description":"Hyperparameter Optimization made Simple","fork":true,"url":"https://api.github.com/repos/alan-mnix/simple-hp","forks_url":"https://api.github.com/repos/alan-mnix/simple-hp/forks","keys_url":"https://api.github.com/repos/alan-mnix/simple-hp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alan-mnix/simple-hp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alan-mnix/simple-hp/teams","hooks_url":"https://api.github.com/repos/alan-mnix/simple-hp/hooks","issue_events_url":"https://api.github.com/repos/alan-mnix/simple-hp/issues/events{/number}","events_url":"https://api.github.com/repos/alan-mnix/simple-hp/events","assignees_url":"https://api.github.com/repos/alan-mnix/simple-hp/assignees{/user}","branches_url":"https://api.github.com/repos/alan-mnix/simple-hp/branches{/branch}","tags_url":"https://api.github.com/repos/alan-mnix/simple-hp/tags","blobs_url":"https://api.github.com/repos/alan-mnix/simple-hp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alan-mnix/simple-hp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alan-mnix/simple-hp/git/refs{/sha}","trees_url":"https://api.github.com/repos/alan-mnix/simple-hp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alan-mnix/simple-hp/statuses/{sha}","languages_url":"https://api.github.com/repos/alan-mnix/simple-hp/languages","stargazers_url":"https://api.github.com/repos/alan-mnix/simple-hp/stargazers","contributors_url":"https://api.github.com/repos/alan-mnix/simple-hp/contributors","subscribers_url":"https://api.github.com/repos/alan-mnix/simple-hp/subscribers","subscription_url":"https://api.github.com/repos/alan-mnix/simple-hp/subscription","commits_url":"https://api.github.com/repos/alan-mnix/simple-hp/commits{/sha}","git_commits_url":"https://api.github.com/repos/alan-mnix/simple-hp/git/commits{/sha}","comments_url":"https://api.github.com/repos/alan-mnix/simple-hp/comments{/number}","issue_comment_url":"https://api.github.com/repos/alan-mnix/simple-hp/issues/comments/{number}","contents_url":"https://api.github.com/repos/alan-mnix/simple-hp/contents/{+path}","compare_url":"https://api.github.com/repos/alan-mnix/simple-hp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alan-mnix/simple-hp/merges","archive_url":"https://api.github.com/repos/alan-mnix/simple-hp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alan-mnix/simple-hp/downloads","issues_url":"https://api.github.com/repos/alan-mnix/simple-hp/issues{/number}","pulls_url":"https://api.github.com/repos/alan-mnix/simple-hp/pulls{/number}","milestones_url":"https://api.github.com/repos/alan-mnix/simple-hp/milestones{/number}","notifications_url":"https://api.github.com/repos/alan-mnix/simple-hp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alan-mnix/simple-hp/labels{/name}","releases_url":"https://api.github.com/repos/alan-mnix/simple-hp/releases{/id}","created_at":"2015-01-13T05:12:01Z","updated_at":"2015-01-13T05:12:03Z","pushed_at":"2015-01-13T05:13:02Z","git_url":"git://github.com/alan-mnix/simple-hp.git","ssh_url":"git@github.com:alan-mnix/simple-hp.git","clone_url":"https://github.com/alan-mnix/simple-hp.git","svn_url":"https://github.com/alan-mnix/simple-hp","homepage":null,"size":113,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"giovanichiachia:master","ref":"master","sha":"c51ee95a129516f1389cea43917591355832a59c","user":{"login":"giovanichiachia","id":1382889,"avatar_url":"https://avatars.githubusercontent.com/u/1382889?v=3","gravatar_id":"","url":"https://api.github.com/users/giovanichiachia","html_url":"https://github.com/giovanichiachia","followers_url":"https://api.github.com/users/giovanichiachia/followers","following_url":"https://api.github.com/users/giovanichiachia/following{/other_user}","gists_url":"https://api.github.com/users/giovanichiachia/gists{/gist_id}","starred_url":"https://api.github.com/users/giovanichiachia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giovanichiachia/subscriptions","organizations_url":"https://api.github.com/users/giovanichiachia/orgs","repos_url":"https://api.github.com/users/giovanichiachia/repos","events_url":"https://api.github.com/users/giovanichiachia/events{/privacy}","received_events_url":"https://api.github.com/users/giovanichiachia/received_events","type":"User","site_admin":false},"repo":{"id":25687268,"name":"simple-hp","full_name":"giovanichiachia/simple-hp","owner":{"login":"giovanichiachia","id":1382889,"avatar_url":"https://avatars.githubusercontent.com/u/1382889?v=3","gravatar_id":"","url":"https://api.github.com/users/giovanichiachia","html_url":"https://github.com/giovanichiachia","followers_url":"https://api.github.com/users/giovanichiachia/followers","following_url":"https://api.github.com/users/giovanichiachia/following{/other_user}","gists_url":"https://api.github.com/users/giovanichiachia/gists{/gist_id}","starred_url":"https://api.github.com/users/giovanichiachia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giovanichiachia/subscriptions","organizations_url":"https://api.github.com/users/giovanichiachia/orgs","repos_url":"https://api.github.com/users/giovanichiachia/repos","events_url":"https://api.github.com/users/giovanichiachia/events{/privacy}","received_events_url":"https://api.github.com/users/giovanichiachia/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/giovanichiachia/simple-hp","description":"Hyperparameter Optimization made Simple","fork":false,"url":"https://api.github.com/repos/giovanichiachia/simple-hp","forks_url":"https://api.github.com/repos/giovanichiachia/simple-hp/forks","keys_url":"https://api.github.com/repos/giovanichiachia/simple-hp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/giovanichiachia/simple-hp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/giovanichiachia/simple-hp/teams","hooks_url":"https://api.github.com/repos/giovanichiachia/simple-hp/hooks","issue_events_url":"https://api.github.com/repos/giovanichiachia/simple-hp/issues/events{/number}","events_url":"https://api.github.com/repos/giovanichiachia/simple-hp/events","assignees_url":"https://api.github.com/repos/giovanichiachia/simple-hp/assignees{/user}","branches_url":"https://api.github.com/repos/giovanichiachia/simple-hp/branches{/branch}","tags_url":"https://api.github.com/repos/giovanichiachia/simple-hp/tags","blobs_url":"https://api.github.com/repos/giovanichiachia/simple-hp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/giovanichiachia/simple-hp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/giovanichiachia/simple-hp/git/refs{/sha}","trees_url":"https://api.github.com/repos/giovanichiachia/simple-hp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/giovanichiachia/simple-hp/statuses/{sha}","languages_url":"https://api.github.com/repos/giovanichiachia/simple-hp/languages","stargazers_url":"https://api.github.com/repos/giovanichiachia/simple-hp/stargazers","contributors_url":"https://api.github.com/repos/giovanichiachia/simple-hp/contributors","subscribers_url":"https://api.github.com/repos/giovanichiachia/simple-hp/subscribers","subscription_url":"https://api.github.com/repos/giovanichiachia/simple-hp/subscription","commits_url":"https://api.github.com/repos/giovanichiachia/simple-hp/commits{/sha}","git_commits_url":"https://api.github.com/repos/giovanichiachia/simple-hp/git/commits{/sha}","comments_url":"https://api.github.com/repos/giovanichiachia/simple-hp/comments{/number}","issue_comment_url":"https://api.github.com/repos/giovanichiachia/simple-hp/issues/comments/{number}","contents_url":"https://api.github.com/repos/giovanichiachia/simple-hp/contents/{+path}","compare_url":"https://api.github.com/repos/giovanichiachia/simple-hp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/giovanichiachia/simple-hp/merges","archive_url":"https://api.github.com/repos/giovanichiachia/simple-hp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/giovanichiachia/simple-hp/downloads","issues_url":"https://api.github.com/repos/giovanichiachia/simple-hp/issues{/number}","pulls_url":"https://api.github.com/repos/giovanichiachia/simple-hp/pulls{/number}","milestones_url":"https://api.github.com/repos/giovanichiachia/simple-hp/milestones{/number}","notifications_url":"https://api.github.com/repos/giovanichiachia/simple-hp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/giovanichiachia/simple-hp/labels{/name}","releases_url":"https://api.github.com/repos/giovanichiachia/simple-hp/releases{/id}","created_at":"2014-10-24T12:23:05Z","updated_at":"2014-10-24T12:26:04Z","pushed_at":"2014-10-24T15:55:40Z","git_url":"git://github.com/giovanichiachia/simple-hp.git","ssh_url":"git@github.com:giovanichiachia/simple-hp.git","clone_url":"https://github.com/giovanichiachia/simple-hp.git","svn_url":"https://github.com/giovanichiachia/simple-hp","homepage":null,"size":156,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/giovanichiachia/simple-hp/pulls/2"},"html":{"href":"https://github.com/giovanichiachia/simple-hp/pull/2"},"issue":{"href":"https://api.github.com/repos/giovanichiachia/simple-hp/issues/2"},"comments":{"href":"https://api.github.com/repos/giovanichiachia/simple-hp/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/giovanichiachia/simple-hp/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/giovanichiachia/simple-hp/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/giovanichiachia/simple-hp/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/giovanichiachia/simple-hp/statuses/c5389a1d9f6d288e3b10c5bd26aeab78ed6068c2"}}}}