{"action":"created","comment":{"url":"https://api.github.com/repos/mlpack/mlpack/pulls/comments/181250843","pull_request_review_id":111833039,"id":181250843,"diff_hunk":"@@ -0,0 +1,50 @@\n+/**\n+ * @file spsa_test.cpp\n+ * @author N Rajiv Vaidyanathan\n+ *\n+ * Test file for SPSA (simultaneous pertubation stochastic approximation).\n+ *\n+ * mlpack is free software; you may redistribute it and/or modify it under the\n+ * terms of the 3-clause BSD license.  You should have received a copy of the\n+ * 3-clause BSD license along with mlpack.  If not, see\n+ * http://www.opensource.org/licenses/BSD-3-Clause for more information.\n+ */\n+#include <mlpack/core.hpp>\n+#include <mlpack/core/optimizers/spsa/spsa.hpp>\n+#include <mlpack/core/optimizers/problems/sgd_test_function.hpp>\n+#include <mlpack/core/optimizers/problems/generalized_rosenbrock_function.hpp>\n+#include <mlpack/core/optimizers/problems/sphere_function.hpp>\n+#include <mlpack/methods/logistic_regression/logistic_regression_function.hpp>\n+\n+#include <boost/test/unit_test.hpp>\n+#include \"test_tools.hpp\"\n+\n+using namespace std;\n+using namespace arma;\n+using namespace mlpack;\n+using namespace mlpack::optimization;\n+using namespace mlpack::optimization::test;\n+using namespace mlpack::regression;\n+\n+BOOST_AUTO_TEST_SUITE(SPSATest);\n+\n+BOOST_AUTO_TEST_CASE(SimpleSPSATestFunction)\n+{\n+  for (size_t i = 10; i <= 50; i++)\n+  {\n+      SphereFunction h(i);\n+      GeneralizedRosenbrockFunction f(i);\n+\n+      SPSA optimiser(0.1, 0.102, 0.16,\n+                     0.3, 100000);","path":"src/mlpack/tests/spsa_test.cpp","position":39,"original_position":39,"commit_id":"99ad9c17bfa0b36ec545e29cfd55f2b042657bb7","original_commit_id":"99ad9c17bfa0b36ec545e29cfd55f2b042657bb7","user":{"login":"zoq","id":4209744,"avatar_url":"https://avatars3.githubusercontent.com/u/4209744?v=4","gravatar_id":"","url":"https://api.github.com/users/zoq","html_url":"https://github.com/zoq","followers_url":"https://api.github.com/users/zoq/followers","following_url":"https://api.github.com/users/zoq/following{/other_user}","gists_url":"https://api.github.com/users/zoq/gists{/gist_id}","starred_url":"https://api.github.com/users/zoq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zoq/subscriptions","organizations_url":"https://api.github.com/users/zoq/orgs","repos_url":"https://api.github.com/users/zoq/repos","events_url":"https://api.github.com/users/zoq/events{/privacy}","received_events_url":"https://api.github.com/users/zoq/received_events","type":"User","site_admin":false},"body":"When wrapping a line, the next line should be tabbed twice from where the previous line began.  See https://github.com/mlpack/mlpack/wiki/DesignGuidelines#line-length-and-wrapping for more information.","created_at":"2018-04-12T23:28:50Z","updated_at":"2018-04-12T23:36:47Z","html_url":"https://github.com/mlpack/mlpack/pull/1153#discussion_r181250843","pull_request_url":"https://api.github.com/repos/mlpack/mlpack/pulls/1153","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/mlpack/mlpack/pulls/comments/181250843"},"html":{"href":"https://github.com/mlpack/mlpack/pull/1153#discussion_r181250843"},"pull_request":{"href":"https://api.github.com/repos/mlpack/mlpack/pulls/1153"}}},"pull_request":{"url":"https://api.github.com/repos/mlpack/mlpack/pulls/1153","id":154538291,"html_url":"https://github.com/mlpack/mlpack/pull/1153","diff_url":"https://github.com/mlpack/mlpack/pull/1153.diff","patch_url":"https://github.com/mlpack/mlpack/pull/1153.patch","issue_url":"https://api.github.com/repos/mlpack/mlpack/issues/1153","number":1153,"state":"open","locked":false,"title":"Implementation of SPSA optimizer","user":{"login":"Rajiv2605","id":16632603,"avatar_url":"https://avatars1.githubusercontent.com/u/16632603?v=4","gravatar_id":"","url":"https://api.github.com/users/Rajiv2605","html_url":"https://github.com/Rajiv2605","followers_url":"https://api.github.com/users/Rajiv2605/followers","following_url":"https://api.github.com/users/Rajiv2605/following{/other_user}","gists_url":"https://api.github.com/users/Rajiv2605/gists{/gist_id}","starred_url":"https://api.github.com/users/Rajiv2605/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rajiv2605/subscriptions","organizations_url":"https://api.github.com/users/Rajiv2605/orgs","repos_url":"https://api.github.com/users/Rajiv2605/repos","events_url":"https://api.github.com/users/Rajiv2605/events{/privacy}","received_events_url":"https://api.github.com/users/Rajiv2605/received_events","type":"User","site_admin":false},"body":"As of now, I have just created the basic files necessary to implement the optimizer for the sake of creating the PR... I'll push the code in the subsequent commits :v: ","created_at":"2017-11-24T12:30:24Z","updated_at":"2018-04-12T23:36:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"48769efb3e99651ec8512255b54d43a5c2fbc53d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mlpack/mlpack/pulls/1153/commits","review_comments_url":"https://api.github.com/repos/mlpack/mlpack/pulls/1153/comments","review_comment_url":"https://api.github.com/repos/mlpack/mlpack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mlpack/mlpack/issues/1153/comments","statuses_url":"https://api.github.com/repos/mlpack/mlpack/statuses/99ad9c17bfa0b36ec545e29cfd55f2b042657bb7","head":{"label":"Rajiv2605:master","ref":"master","sha":"99ad9c17bfa0b36ec545e29cfd55f2b042657bb7","user":{"login":"Rajiv2605","id":16632603,"avatar_url":"https://avatars1.githubusercontent.com/u/16632603?v=4","gravatar_id":"","url":"https://api.github.com/users/Rajiv2605","html_url":"https://github.com/Rajiv2605","followers_url":"https://api.github.com/users/Rajiv2605/followers","following_url":"https://api.github.com/users/Rajiv2605/following{/other_user}","gists_url":"https://api.github.com/users/Rajiv2605/gists{/gist_id}","starred_url":"https://api.github.com/users/Rajiv2605/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rajiv2605/subscriptions","organizations_url":"https://api.github.com/users/Rajiv2605/orgs","repos_url":"https://api.github.com/users/Rajiv2605/repos","events_url":"https://api.github.com/users/Rajiv2605/events{/privacy}","received_events_url":"https://api.github.com/users/Rajiv2605/received_events","type":"User","site_admin":false},"repo":{"id":111912894,"name":"mlpack","full_name":"Rajiv2605/mlpack","owner":{"login":"Rajiv2605","id":16632603,"avatar_url":"https://avatars1.githubusercontent.com/u/16632603?v=4","gravatar_id":"","url":"https://api.github.com/users/Rajiv2605","html_url":"https://github.com/Rajiv2605","followers_url":"https://api.github.com/users/Rajiv2605/followers","following_url":"https://api.github.com/users/Rajiv2605/following{/other_user}","gists_url":"https://api.github.com/users/Rajiv2605/gists{/gist_id}","starred_url":"https://api.github.com/users/Rajiv2605/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rajiv2605/subscriptions","organizations_url":"https://api.github.com/users/Rajiv2605/orgs","repos_url":"https://api.github.com/users/Rajiv2605/repos","events_url":"https://api.github.com/users/Rajiv2605/events{/privacy}","received_events_url":"https://api.github.com/users/Rajiv2605/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Rajiv2605/mlpack","description":"mlpack: a scalable C++ machine learning library -- ","fork":true,"url":"https://api.github.com/repos/Rajiv2605/mlpack","forks_url":"https://api.github.com/repos/Rajiv2605/mlpack/forks","keys_url":"https://api.github.com/repos/Rajiv2605/mlpack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Rajiv2605/mlpack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Rajiv2605/mlpack/teams","hooks_url":"https://api.github.com/repos/Rajiv2605/mlpack/hooks","issue_events_url":"https://api.github.com/repos/Rajiv2605/mlpack/issues/events{/number}","events_url":"https://api.github.com/repos/Rajiv2605/mlpack/events","assignees_url":"https://api.github.com/repos/Rajiv2605/mlpack/assignees{/user}","branches_url":"https://api.github.com/repos/Rajiv2605/mlpack/branches{/branch}","tags_url":"https://api.github.com/repos/Rajiv2605/mlpack/tags","blobs_url":"https://api.github.com/repos/Rajiv2605/mlpack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Rajiv2605/mlpack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Rajiv2605/mlpack/git/refs{/sha}","trees_url":"https://api.github.com/repos/Rajiv2605/mlpack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Rajiv2605/mlpack/statuses/{sha}","languages_url":"https://api.github.com/repos/Rajiv2605/mlpack/languages","stargazers_url":"https://api.github.com/repos/Rajiv2605/mlpack/stargazers","contributors_url":"https://api.github.com/repos/Rajiv2605/mlpack/contributors","subscribers_url":"https://api.github.com/repos/Rajiv2605/mlpack/subscribers","subscription_url":"https://api.github.com/repos/Rajiv2605/mlpack/subscription","commits_url":"https://api.github.com/repos/Rajiv2605/mlpack/commits{/sha}","git_commits_url":"https://api.github.com/repos/Rajiv2605/mlpack/git/commits{/sha}","comments_url":"https://api.github.com/repos/Rajiv2605/mlpack/comments{/number}","issue_comment_url":"https://api.github.com/repos/Rajiv2605/mlpack/issues/comments{/number}","contents_url":"https://api.github.com/repos/Rajiv2605/mlpack/contents/{+path}","compare_url":"https://api.github.com/repos/Rajiv2605/mlpack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Rajiv2605/mlpack/merges","archive_url":"https://api.github.com/repos/Rajiv2605/mlpack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Rajiv2605/mlpack/downloads","issues_url":"https://api.github.com/repos/Rajiv2605/mlpack/issues{/number}","pulls_url":"https://api.github.com/repos/Rajiv2605/mlpack/pulls{/number}","milestones_url":"https://api.github.com/repos/Rajiv2605/mlpack/milestones{/number}","notifications_url":"https://api.github.com/repos/Rajiv2605/mlpack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Rajiv2605/mlpack/labels{/name}","releases_url":"https://api.github.com/repos/Rajiv2605/mlpack/releases{/id}","deployments_url":"https://api.github.com/repos/Rajiv2605/mlpack/deployments","created_at":"2017-11-24T11:51:45Z","updated_at":"2018-04-12T19:38:55Z","pushed_at":"2018-04-12T19:38:52Z","git_url":"git://github.com/Rajiv2605/mlpack.git","ssh_url":"git@github.com:Rajiv2605/mlpack.git","clone_url":"https://github.com/Rajiv2605/mlpack.git","svn_url":"https://github.com/Rajiv2605/mlpack","homepage":"http://www.mlpack.org/","size":243354,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mlpack:master","ref":"master","sha":"617b9e529c046cefb577c2125f06f46719971271","user":{"login":"mlpack","id":10216045,"avatar_url":"https://avatars0.githubusercontent.com/u/10216045?v=4","gravatar_id":"","url":"https://api.github.com/users/mlpack","html_url":"https://github.com/mlpack","followers_url":"https://api.github.com/users/mlpack/followers","following_url":"https://api.github.com/users/mlpack/following{/other_user}","gists_url":"https://api.github.com/users/mlpack/gists{/gist_id}","starred_url":"https://api.github.com/users/mlpack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlpack/subscriptions","organizations_url":"https://api.github.com/users/mlpack/orgs","repos_url":"https://api.github.com/users/mlpack/repos","events_url":"https://api.github.com/users/mlpack/events{/privacy}","received_events_url":"https://api.github.com/users/mlpack/received_events","type":"Organization","site_admin":false},"repo":{"id":28149409,"name":"mlpack","full_name":"mlpack/mlpack","owner":{"login":"mlpack","id":10216045,"avatar_url":"https://avatars0.githubusercontent.com/u/10216045?v=4","gravatar_id":"","url":"https://api.github.com/users/mlpack","html_url":"https://github.com/mlpack","followers_url":"https://api.github.com/users/mlpack/followers","following_url":"https://api.github.com/users/mlpack/following{/other_user}","gists_url":"https://api.github.com/users/mlpack/gists{/gist_id}","starred_url":"https://api.github.com/users/mlpack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlpack/subscriptions","organizations_url":"https://api.github.com/users/mlpack/orgs","repos_url":"https://api.github.com/users/mlpack/repos","events_url":"https://api.github.com/users/mlpack/events{/privacy}","received_events_url":"https://api.github.com/users/mlpack/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mlpack/mlpack","description":"mlpack: a scalable C++ machine learning library -- ","fork":false,"url":"https://api.github.com/repos/mlpack/mlpack","forks_url":"https://api.github.com/repos/mlpack/mlpack/forks","keys_url":"https://api.github.com/repos/mlpack/mlpack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mlpack/mlpack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mlpack/mlpack/teams","hooks_url":"https://api.github.com/repos/mlpack/mlpack/hooks","issue_events_url":"https://api.github.com/repos/mlpack/mlpack/issues/events{/number}","events_url":"https://api.github.com/repos/mlpack/mlpack/events","assignees_url":"https://api.github.com/repos/mlpack/mlpack/assignees{/user}","branches_url":"https://api.github.com/repos/mlpack/mlpack/branches{/branch}","tags_url":"https://api.github.com/repos/mlpack/mlpack/tags","blobs_url":"https://api.github.com/repos/mlpack/mlpack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mlpack/mlpack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mlpack/mlpack/git/refs{/sha}","trees_url":"https://api.github.com/repos/mlpack/mlpack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mlpack/mlpack/statuses/{sha}","languages_url":"https://api.github.com/repos/mlpack/mlpack/languages","stargazers_url":"https://api.github.com/repos/mlpack/mlpack/stargazers","contributors_url":"https://api.github.com/repos/mlpack/mlpack/contributors","subscribers_url":"https://api.github.com/repos/mlpack/mlpack/subscribers","subscription_url":"https://api.github.com/repos/mlpack/mlpack/subscription","commits_url":"https://api.github.com/repos/mlpack/mlpack/commits{/sha}","git_commits_url":"https://api.github.com/repos/mlpack/mlpack/git/commits{/sha}","comments_url":"https://api.github.com/repos/mlpack/mlpack/comments{/number}","issue_comment_url":"https://api.github.com/repos/mlpack/mlpack/issues/comments{/number}","contents_url":"https://api.github.com/repos/mlpack/mlpack/contents/{+path}","compare_url":"https://api.github.com/repos/mlpack/mlpack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mlpack/mlpack/merges","archive_url":"https://api.github.com/repos/mlpack/mlpack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mlpack/mlpack/downloads","issues_url":"https://api.github.com/repos/mlpack/mlpack/issues{/number}","pulls_url":"https://api.github.com/repos/mlpack/mlpack/pulls{/number}","milestones_url":"https://api.github.com/repos/mlpack/mlpack/milestones{/number}","notifications_url":"https://api.github.com/repos/mlpack/mlpack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mlpack/mlpack/labels{/name}","releases_url":"https://api.github.com/repos/mlpack/mlpack/releases{/id}","deployments_url":"https://api.github.com/repos/mlpack/mlpack/deployments","created_at":"2014-12-17T18:16:59Z","updated_at":"2018-04-12T19:19:03Z","pushed_at":"2018-04-12T22:25:50Z","git_url":"git://github.com/mlpack/mlpack.git","ssh_url":"git@github.com:mlpack/mlpack.git","clone_url":"https://github.com/mlpack/mlpack.git","svn_url":"https://github.com/mlpack/mlpack","homepage":"http://www.mlpack.org/","size":243329,"stargazers_count":2142,"watchers_count":2142,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":799,"mirror_url":null,"archived":false,"open_issues_count":113,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":799,"open_issues":113,"watchers":2142,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mlpack/mlpack/pulls/1153"},"html":{"href":"https://github.com/mlpack/mlpack/pull/1153"},"issue":{"href":"https://api.github.com/repos/mlpack/mlpack/issues/1153"},"comments":{"href":"https://api.github.com/repos/mlpack/mlpack/issues/1153/comments"},"review_comments":{"href":"https://api.github.com/repos/mlpack/mlpack/pulls/1153/comments"},"review_comment":{"href":"https://api.github.com/repos/mlpack/mlpack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mlpack/mlpack/pulls/1153/commits"},"statuses":{"href":"https://api.github.com/repos/mlpack/mlpack/statuses/99ad9c17bfa0b36ec545e29cfd55f2b042657bb7"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"zoq"}}