{"action":"created","comment":{"url":"https://api.github.com/repos/mlpack/mlpack/pulls/comments/125019096","pull_request_review_id":47368044,"id":125019096,"diff_hunk":"@@ -0,0 +1,781 @@\n+/**\n+ * @file cmaes_impl.hpp\n+ * @author Kartik Nighania (GSoC 17 mentor Marcus Edel)\n+ *\n+ * Covariance Matrix Adaptation Evolution Strategy\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+#ifndef MLPACK_CORE_OPTIMIZERS_CMAES_CMAES_IMPL_HPP\n+#define MLPACK_CORE_OPTIMIZERS_CMAES_CMAES_IMPL_HPP\n+\n+#include <cassert>\n+#include <cmath>\n+#include <cstdio>\n+#include <cstring>\n+#include <fstream>\n+#include <limits>\n+#include <iomanip>\n+#include <sstream>\n+#include <stdexcept>\n+#include <string>\n+#include <armadillo>\n+#include <iostream>\n+\n+#include \"cmaes.hpp\"\n+#include \"random.hpp\"\n+\n+namespace mlpack {\n+namespace optimization {\n+\n+  template<typename funcType>\n+  CMAES<funcType>::CMAES(funcType& function, arma::mat& start, arma::mat& stdDivs)\n+      : function(function),\n+        N(-1),\n+        typicalXcase(false),\n+        stopMaxFunEvals(-1),\n+        facmaxeval(1.0),\n+        stopMaxIter(-1.0),\n+        stopTolFun(1e-16),\n+        stopTolFunHist(1e-16),\n+        stopTolX(0), // 1e-11*insigma would also be reasonable\n+        stopTolUpXFactor(1e3),\n+        lambda(-1),\n+        mu(-1),\n+        mucov(-1),\n+        mueff(-1),\n+        damps(-1),\n+        cs(-1),\n+        ccumcov(-1),\n+        ccov(-1),\n+        facupdateCmode(1),\n+        weightMode(UNINITIALIZED_WEIGHTS)\n+  {\n+    stStopFitness.flg = false;\n+    stStopFitness.val = -std::numeric_limits<double>::max();\n+    updateCmode.modulo = -1;\n+    updateCmode.maxtime = -1;\n+\n+     N = function.NumFunctions();\n+    if ( N <= 0)\n+      throw std::runtime_error(\"Problem dimension N undefined.\");\n+    \n+    bool startP  = true;\n+    bool initDev = true;\n+\n+    for (int i=0; i<N; i++)\n+    {\n+     if (start[i]   < 1.0e-200) startP  = false;\n+     if (stdDivs[i] < 1.0e-200) initDev = false;\n+    }\n+\n+  \n+   if (!startP)\n+        std::cout << \" WARNING: initial start point undefined. Please specify if incorrect results detected. DEFAULT = 0.5...0.5.\" << std::endl;\n+   if (!initDev)\n+        std::cout << \"WARNING: initialStandardDeviations undefined. Please specify if incorrect results detected. DEFAULT = 0.3...0.3.\" << std::endl;\n+    \n+   \n+\n+    if (weightMode == UNINITIALIZED_WEIGHTS)\n+      weightMode = LOG_WEIGHTS;\n+\n+    diagonalCov = 0; // default is 0, but this might change in future\n+\n+      xstart.set_size(N);\n+      if (startP)\n+      {\n+        for (int i = 0; i < N; ++i) xstart[i] = start[i];\n+      }\n+     else\n+      {\n+        typicalXcase = true;\n+        for (int i = 0; i < N; i++) xstart[i] = 0.5;\n+      }\n+  \n+\n+    rgInitialStds.set_size(N);\n+    if (initDev)\n+      {\n+        for (int i = 0; i < N; ++i) rgInitialStds[i] = stdDivs[i];\n+      }\n+      else\n+      {\n+        for (int i = 0; i < N; ++i) rgInitialStds[i] = double(0.3);\n+      }\n+\n+\n+    if (lambda < 2)\n+      lambda = 4 + (int) (3.0*log((double) N));\n+    if (mu <= 0)\n+      mu = lambda / 2;\n+\n+      weights.set_size(mu);\n+      switch(weightMode)\n+      {\n+      case LINEAR_WEIGHTS:\n+        for (int i = 0; i < mu; ++i) weights[i] = mu - i;\n+        break;\n+      case EQUAL_WEIGHTS:\n+        for (int i = 0; i < mu; ++i) weights[i] = 1;\n+        break;\n+      case LOG_WEIGHTS:\n+      default:\n+        for (int i = 0; i < mu; ++i) weights[i] = log(mu + 1.) - log(i + 1.);\n+        break;\n+      }\n+\n+      // normalize weights vector and set mueff\n+      double s1 = 0, s2 = 0;\n+      for (int i = 0; i < mu; ++i)\n+      {\n+        s1 += weights[i];\n+        s2 += weights[i]*weights[i];\n+      }\n+      mueff = s1*s1/s2;\n+      for (int i = 0; i < mu; ++i)\n+        weights[i] /= s1;\n+\n+      if (mu < 1 || mu > lambda || (mu == lambda && weights[0] == weights[mu - 1]))\n+        throw std::runtime_error(\"setWeights(): invalid setting of mu or lambda\");\n+    \n+\n+    if (cs > 0)\n+      cs *= (mueff + 2.) / (N + mueff + 3.);\n+    if (cs <= 0 || cs >= 1)\n+      cs = (mueff + 2.) / (N + mueff + 3.);\n+\n+    if (ccumcov <= 0 || ccumcov > 1)\n+      ccumcov = 4. / (N + 4);\n+\n+    if (mucov < 1)\n+      mucov = mueff;\n+    double t1 = 2. / ((N + 1.4142)*(N + 1.4142));\n+    double t2 = (2.* mueff - 1.) / ((N + 2.)*(N + 2.) + mueff);\n+    t2 = (t2 > 1) ? 1 : t2;\n+    t2 = (1. / mucov)* t1 + (1. - 1. / mucov)* t2;\n+    if (ccov >= 0)\n+      ccov *= t2;\n+    if (ccov < 0 || ccov > 1)\n+      ccov = t2;\n+\n+    if (diagonalCov < 0)\n+      diagonalCov = 2 + 100. * N / sqrt((double) lambda);\n+\n+    if (stopMaxFunEvals <= 0)\n+      stopMaxFunEvals = facmaxeval * 900 * (N + 3)*(N + 3);\n+    else\n+      stopMaxFunEvals *= facmaxeval;\n+\n+    if (stopMaxIter <= 0)\n+      stopMaxIter = ceil((double) (stopMaxFunEvals / lambda));\n+\n+    if (damps < double(0))\n+      damps = double(1);\n+    damps = damps\n+        * (double(1) + double(2)*std::max(double(0), std::sqrt((mueff - double(1)) / (N + double(1))) - double(1)))\n+        * (double) std::max(double(0.3), double(1) - // modify for short runs\n+          (double) N / (double(1e-6) + std::min(stopMaxIter, stopMaxFunEvals / lambda)))\n+        + cs;\n+\n+    if (updateCmode.modulo < 0)\n+      updateCmode.modulo = 1. / ccov / (double) N / 10.;\n+    updateCmode.modulo *= facupdateCmode;\n+    if (updateCmode.maxtime < 0)\n+      updateCmode.maxtime = 0.20; // maximal 20% of CPU-time\n+  \n+  }\n+\n+  template<typename funcType>\n+  double CMAES<funcType>::Optimize(arma::mat& arr)\n+  {\n+    arFunvals.set_size(lambda);\n+    init(arFunvals);\n+\n+  while(!testForTermination())\n+  {\n+    // Generate lambda new search points, sample population\n+    samplePopulation();\n+\n+    arma::mat fit(1,N);\n+\n+    // evaluate the new search points using the given evaluate function by the user\n+    for (int i = 0; i < lambda; ++i)\n+    {\n+      for (int j=0; j<N; j++) fit(0,j) = population(i,j);\n+\n+      arFunvals[i] = function.Evaluate(fit);\n+    }\n+\n+    // update the search distribution used for sampleDistribution()\n+      updateDistribution(arFunvals);\n+  }\n+\n+  std::cout << \"Stop:\" << std::endl << getStopMessage();\n+\n+  // get best estimator for the optimum\n+  for (int i=0; i<N; i++) arr[i] = xmean[i]; \n+\n+  return xBestEver[N];\n+\n+  }\n+\n+  /** \n+   * Exhaustive test of the output of the eigendecomposition, needs O(n^3)\n+   * operations writes to error file.\n+   * @return number of detected inaccuracies\n+   */\n+   template<typename funcType>\n+  int CMAES<funcType>::checkEigen(arma::vec diag, arma::mat Q)\n+  {\n+    // compute Q diag Q^T and Q Q^T to check\n+    int res = 0;\n+    for (double i = 0; i < N; i+=1)\n+      for (double j = 0; j < N; j+=1) \n+      {\n+        double cc = 0., dd = 0.;\n+        for (int k = 0; k < N; ++k)\n+        {\n+          cc += diag[k]*Q(i,k)*Q(j,k);\n+          dd += Q(i,k)*Q(j,k);\n+        }\n+        // check here, is the normalization the right one?\n+        const bool cond1 = fabs(cc - C(i > j ? i : j , i > j ? j : i)) / sqrt(C(i,i)* C(j,j)) > double(1e-10);\n+        const bool cond2 = fabs(cc - C(i > j ? i : j , i > j ? j : i)) > double(3e-14);\n+        if (cond1 && cond2)\n+        {\n+          std::stringstream s;\n+          s << i << \" \" << j << \": \" << cc << \" \" << C(i > j ? i : j , i > j ? j : i)\n+              << \", \" << cc - C( i > j ? i : j , i > j ? j : i);\n+          \n+          std::cout << \"eigen(): imprecise result detected \" << s.str()\n+                << std::endl;\n+          ++res;\n+        }\n+        if (std::fabs(dd - (i == j)) > double(1e-10))\n+        {\n+          std::stringstream s;\n+          s << i << \" \" << j << \" \" << dd;\n+          \n+            std::cout << \"eigen(): imprecise result detected (Q not orthog.)\"\n+                << s.str() << std::endl;\n+          ++res;\n+        }\n+      }\n+    return res;\n+  }\n+\n+\n+   template<typename funcType>\n+  void CMAES<funcType>::sortIndex(const arma::vec rgFunVal, arma::vec& iindex, int n)\n+  {\n+    int i, j;\n+    for (i = 1, iindex[0] = 0; i < n; ++i)\n+    {\n+      for (j = i; j > 0; --j)\n+      {\n+        if (rgFunVal[iindex[j - 1]] < rgFunVal[i])\n+          break;\n+        iindex[j] = iindex[j - 1];\n+      }\n+      iindex[j] = i;\n+    }\n+  }\n+\n+  template<typename funcType>\n+  void CMAES<funcType>::adaptC2(const int hsig)\n+  {\n+    bool diag = diagonalCov == 1 || diagonalCov >= gen;\n+\n+    if (ccov != double(0))\n+    {\n+      // definitions for speeding up inner-most loop\n+      const double mucovinv = double(1)/mucov;\n+      const double commonFactor = ccov * (diag ? (N + double(1.5)) / double(3) : double(1));\n+      const double ccov1 = std::min(commonFactor*mucovinv, double(1));\n+      const double ccovmu = std::min(commonFactor*(double(1)-mucovinv), double(1)-ccov1);\n+      const double sigmasquare = sigma*sigma;\n+      const double onemccov1ccovmu = double(1)-ccov1-ccovmu;\n+      const double longFactor = (double(1)-hsig)*ccumcov*(double(2)-ccumcov);\n+\n+      eigensysIsUptodate = false;\n+\n+      // update covariance matrix\n+      for (int i = 0; i < N; ++i)\n+        for (int j = diag ? i : 0; j <= i; ++j)\n+        {\n+          double& Cij = C(i,j);\n+          Cij = onemccov1ccovmu*Cij + ccov1 * (pc[i]*pc[j] + longFactor*Cij);\n+          for (int k = 0; k < mu; ++k)\n+          { // additional rank mu update\n+            Cij += ccovmu*weights[k] * (population(index[k] , i) - xold[i])\n+                * (population(index[k] , j) - xold[j]) / sigmasquare;\n+          }\n+        }\n+      // update maximal and minimal diagonal value\n+      maxdiagC = arma::max(C.diag());\n+      mindiagC = arma::min(C.diag());\n+     \n+    }\n+  }\n+\n+\n+  /**\n+   * Adds the mutation sigma*B*(D*z).\n+   * @param x Search space vector.\n+   * @param eps Mutation factor.\n+   */\n+  template<typename funcType>\n+  void CMAES<funcType>::addMutation(double* x, double eps)\n+  {\n+    for (int i = 0; i < N; ++i)\n+      tempRandom[i] = rgD[i]*rand.gauss();\n+    for (int i = 0; i < N; ++i)\n+    {\n+      double sum = 0.0;\n+      for (int j = 0; j < N; ++j)\n+        sum += B(i,j)*tempRandom[j];\n+      x[i] = xmean[i] + eps*sigma*sum;\n+    }\n+  }\n+\n+  /**\n+   * Initializes the CMA-ES algorithm.\n+   * @param parameters The CMA-ES parameters in the parameters.h file\n+   * @return Array of size lambda that can be used to assign fitness values and\n+   *         pass them to updateDistribution()\n+   */\n+  template<typename funcType>\n+  void CMAES<funcType>::init(arma::vec& func)\n+  {\n+\n+    stopMessage = \"\";\n+\n+    double trace = arma::accu(arma::pow(rgInitialStds, 2));\n+    sigma = std::sqrt(trace/N);\n+\n+    chiN = std::sqrt((double) N) * (1 - 1/(4*N) + 1/(21*N*N));\n+    eigensysIsUptodate = true;\n+    doCheckEigen = false;\n+    genOfEigensysUpdate = 0;\n+\n+    double dtest;\n+    for (dtest = double(1); dtest && dtest < double(1.1)*dtest; dtest *= double(2))\n+      if (dtest == dtest + double(1))\n+        break;\n+    dMaxSignifKond = dtest / double(1000);\n+\n+    gen = 0;\n+    countevals = 0;\n+    state = INITIALIZED;\n+    dLastMinEWgroesserNull = double(1);\n+\n+    pc.set_size(N);\n+    ps.set_size(N);\n+    tempRandom.set_size(N+1);\n+    BDz.set_size(N);\n+    xmean.set_size(N+2);\n+    xmean[0] = N;\n+    ++xmean;\n+    xold.set_size(N+2);\n+    xold[0] = N;\n+    ++xold;\n+    xBestEver.set_size(N+3);\n+    xBestEver[0] = N;\n+    ++xBestEver;\n+    xBestEver[N] = std::numeric_limits<double>::max();\n+    rgD.set_size(N);\n+    C.set_size(N,N);\n+    B.set_size(N,N);\n+    publicFitness.set_size(lambda);\n+    functionValues = new double[lambda+1];\n+    functionValues[0] = lambda;\n+    ++functionValues;\n+    const int historySize = 10 + (int) ceil(3.*10.*N/lambda);\n+    funcValueHistory = new double[historySize + 1];\n+    funcValueHistory[0] = (double) historySize;\n+    funcValueHistory++;\n+    index = arma::linspace<arma::vec>(0, lambda-1, lambda);\n+    population.zeros(lambda, N+2);\n+    for (int i = 0; i < lambda; i++)\n+    {\n+      functionValues[i] = std::numeric_limits<double>::max();\n+    }\n+    for (int i = 0; i < historySize; i++)\n+    {\n+      funcValueHistory[i] = std::numeric_limits<double>::max();\n+    }\n+    \n+    C.zeros();\n+    B.zeros();\n+\n+    for (int i = 0; i < N; ++i)\n+    {\n+      B.diag().ones();\n+\n+      C(i,i) = rgD[i] = rgInitialStds[i]*std::sqrt(N/trace);\n+      C(i,i) *= C(i,i);\n+      pc[i] = ps[i] = double(0);\n+    }\n+    minEW = rgD.min();\n+    minEW = minEW*minEW;\n+    maxEW = rgD.max();\n+    maxEW = maxEW*maxEW;\n+\n+    maxdiagC = arma::max(C.diag());\n+    mindiagC = arma::min(C.diag());\n+\n+    for (int i = 0; i < N; ++i)\n+      xmean[i] = xold[i] = xstart[i];\n+    \n+    if (typicalXcase)\n+      for (int i = 0; i < N; ++i)\n+        xmean[i] += sigma*rgD[i]*rand.gauss();\n+\n+    for(int i=0; i<lambda; i++) func[i] = publicFitness[i];\n+  }\n+\n+  /**\n+   * The search space vectors have a special form: they are arrays with N+1\n+   * entries. Entry number -1 is the dimension of the search space N.\n+   * @return A pointer to a \"population\" of lambda N-dimensional multivariate\n+   * normally distributed samples.\n+   */\n+   template<typename funcType>\n+   void CMAES<funcType>::samplePopulation()\n+  {\n+    bool diag = diagonalCov == 1 || diagonalCov >= gen;\n+\n+    // calculate eigensystem\n+    if (!eigensysIsUptodate)\n+    {\n+      if (!diag)\n+        updateEigensystem(false);\n+      else\n+      {\n+        for (int i = 0; i < N; ++i)\n+          rgD[i] = std::sqrt(C(i,i));\n+        minEW = rgD.min();\n+        minEW *= minEW;\n+        maxEW = rgD.max();\n+        maxEW *= maxEW;\n+        eigensysIsUptodate = true;\n+      }\n+    }\n+\n+    for (int iNk = 0; iNk < lambda; ++iNk)\n+    { // generate scaled random vector D*z\n+      for (int i = 0; i < N; ++i)\n+        if (diag)\n+          population(iNk,i) = xmean[i] + sigma*rgD[i]*rand.gauss();\n+        else\n+          tempRandom[i] = rgD[i]*rand.gauss();\n+      if (!diag)\n+        for (int i = 0; i < N; ++i) // add mutation sigma*B*(D*z)\n+        {\n+          double sum = 0.0;\n+          for (int j = 0; j < N; ++j)\n+            sum += B(i,j)*tempRandom[j];\n+          population(iNk , i) = xmean[i] + sigma*sum;\n+        }\n+    }\n+\n+    if (state == UPDATED || gen == 0)\n+      ++gen;\n+    state = SAMPLED;\n+\n+  }\n+\n+  /**\n+   * Core procedure of the CMA-ES algorithm. Sets a new mean value and estimates\n+   * the new covariance matrix and a new step size for the normal search\n+   * distribution.\n+   * @param fitnessValues An array of \\f$\\lambda\\f$ function values.\n+   * @return Mean value of the new distribution.\n+   */\n+   template<typename funcType>\n+  void CMAES<funcType>::updateDistribution(arma::vec fitnessValues)\n+  {\n+\n+    bool diag = diagonalCov == 1 || diagonalCov >= gen;\n+\n+    assert(state != UPDATED && \"updateDistribution(): You need to call \"\n+          \"samplePopulation() before update can take place.\");\n+\n+    if (state == SAMPLED) // function values are delivered here\n+      countevals += lambda;\n+    else std::cout<<  \"updateDistribution(): unexpected state\" << std::endl;\n+\n+    // assign function values\n+    for (int i = 0; i < lambda; ++i)\n+      population(i,N) = functionValues[i] = fitnessValues[i];\n+\n+    // Generate index\n+    sortIndex(fitnessValues, index, lambda);","path":"src/mlpack/core/optimizers/cmaes/cmaes_impl.hpp","position":517,"original_position":517,"commit_id":"b27e3f6adbf651c07c46c24e187efd74ff2491e8","original_commit_id":"b27e3f6adbf651c07c46c24e187efd74ff2491e8","user":{"login":"zoq","id":4209744,"avatar_url":"https://avatars0.githubusercontent.com/u/4209744?v=3","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":"You can just use ``arma:: sort_index``  to spare another function.","created_at":"2017-06-30T11:34:24Z","updated_at":"2017-06-30T11:40:16Z","html_url":"https://github.com/mlpack/mlpack/pull/938#discussion_r125019096","pull_request_url":"https://api.github.com/repos/mlpack/mlpack/pulls/938","_links":{"self":{"href":"https://api.github.com/repos/mlpack/mlpack/pulls/comments/125019096"},"html":{"href":"https://github.com/mlpack/mlpack/pull/938#discussion_r125019096"},"pull_request":{"href":"https://api.github.com/repos/mlpack/mlpack/pulls/938"}}},"pull_request":{"url":"https://api.github.com/repos/mlpack/mlpack/pulls/938","id":110687902,"html_url":"https://github.com/mlpack/mlpack/pull/938","diff_url":"https://github.com/mlpack/mlpack/pull/938.diff","patch_url":"https://github.com/mlpack/mlpack/pull/938.patch","issue_url":"https://api.github.com/repos/mlpack/mlpack/issues/938","number":938,"state":"open","locked":false,"title":"Neuro CMAES-Algorithm","user":{"login":"kartik-nighania","id":12850602,"avatar_url":"https://avatars0.githubusercontent.com/u/12850602?v=3","gravatar_id":"","url":"https://api.github.com/users/kartik-nighania","html_url":"https://github.com/kartik-nighania","followers_url":"https://api.github.com/users/kartik-nighania/followers","following_url":"https://api.github.com/users/kartik-nighania/following{/other_user}","gists_url":"https://api.github.com/users/kartik-nighania/gists{/gist_id}","starred_url":"https://api.github.com/users/kartik-nighania/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kartik-nighania/subscriptions","organizations_url":"https://api.github.com/users/kartik-nighania/orgs","repos_url":"https://api.github.com/users/kartik-nighania/repos","events_url":"https://api.github.com/users/kartik-nighania/events{/privacy}","received_events_url":"https://api.github.com/users/kartik-nighania/received_events","type":"User","site_admin":false},"body":"I have used and modified Bang's genome and have implemeted cmaes into it .. \r\nTests are remaining for it ..","created_at":"2017-03-14T18:26:36Z","updated_at":"2017-06-30T11:40:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a2acdb5d4529d0c9eb607eabd40f1bcbf1ffa975","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/mlpack/mlpack/pulls/938/commits","review_comments_url":"https://api.github.com/repos/mlpack/mlpack/pulls/938/comments","review_comment_url":"https://api.github.com/repos/mlpack/mlpack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mlpack/mlpack/issues/938/comments","statuses_url":"https://api.github.com/repos/mlpack/mlpack/statuses/b27e3f6adbf651c07c46c24e187efd74ff2491e8","head":{"label":"kartik-nighania:master","ref":"master","sha":"b27e3f6adbf651c07c46c24e187efd74ff2491e8","user":{"login":"kartik-nighania","id":12850602,"avatar_url":"https://avatars0.githubusercontent.com/u/12850602?v=3","gravatar_id":"","url":"https://api.github.com/users/kartik-nighania","html_url":"https://github.com/kartik-nighania","followers_url":"https://api.github.com/users/kartik-nighania/followers","following_url":"https://api.github.com/users/kartik-nighania/following{/other_user}","gists_url":"https://api.github.com/users/kartik-nighania/gists{/gist_id}","starred_url":"https://api.github.com/users/kartik-nighania/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kartik-nighania/subscriptions","organizations_url":"https://api.github.com/users/kartik-nighania/orgs","repos_url":"https://api.github.com/users/kartik-nighania/repos","events_url":"https://api.github.com/users/kartik-nighania/events{/privacy}","received_events_url":"https://api.github.com/users/kartik-nighania/received_events","type":"User","site_admin":false},"repo":{"id":76486580,"name":"mlpack","full_name":"kartik-nighania/mlpack","owner":{"login":"kartik-nighania","id":12850602,"avatar_url":"https://avatars0.githubusercontent.com/u/12850602?v=3","gravatar_id":"","url":"https://api.github.com/users/kartik-nighania","html_url":"https://github.com/kartik-nighania","followers_url":"https://api.github.com/users/kartik-nighania/followers","following_url":"https://api.github.com/users/kartik-nighania/following{/other_user}","gists_url":"https://api.github.com/users/kartik-nighania/gists{/gist_id}","starred_url":"https://api.github.com/users/kartik-nighania/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kartik-nighania/subscriptions","organizations_url":"https://api.github.com/users/kartik-nighania/orgs","repos_url":"https://api.github.com/users/kartik-nighania/repos","events_url":"https://api.github.com/users/kartik-nighania/events{/privacy}","received_events_url":"https://api.github.com/users/kartik-nighania/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kartik-nighania/mlpack","description":"mlpack: a scalable C++ machine learning library","fork":true,"url":"https://api.github.com/repos/kartik-nighania/mlpack","forks_url":"https://api.github.com/repos/kartik-nighania/mlpack/forks","keys_url":"https://api.github.com/repos/kartik-nighania/mlpack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kartik-nighania/mlpack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kartik-nighania/mlpack/teams","hooks_url":"https://api.github.com/repos/kartik-nighania/mlpack/hooks","issue_events_url":"https://api.github.com/repos/kartik-nighania/mlpack/issues/events{/number}","events_url":"https://api.github.com/repos/kartik-nighania/mlpack/events","assignees_url":"https://api.github.com/repos/kartik-nighania/mlpack/assignees{/user}","branches_url":"https://api.github.com/repos/kartik-nighania/mlpack/branches{/branch}","tags_url":"https://api.github.com/repos/kartik-nighania/mlpack/tags","blobs_url":"https://api.github.com/repos/kartik-nighania/mlpack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kartik-nighania/mlpack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kartik-nighania/mlpack/git/refs{/sha}","trees_url":"https://api.github.com/repos/kartik-nighania/mlpack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kartik-nighania/mlpack/statuses/{sha}","languages_url":"https://api.github.com/repos/kartik-nighania/mlpack/languages","stargazers_url":"https://api.github.com/repos/kartik-nighania/mlpack/stargazers","contributors_url":"https://api.github.com/repos/kartik-nighania/mlpack/contributors","subscribers_url":"https://api.github.com/repos/kartik-nighania/mlpack/subscribers","subscription_url":"https://api.github.com/repos/kartik-nighania/mlpack/subscription","commits_url":"https://api.github.com/repos/kartik-nighania/mlpack/commits{/sha}","git_commits_url":"https://api.github.com/repos/kartik-nighania/mlpack/git/commits{/sha}","comments_url":"https://api.github.com/repos/kartik-nighania/mlpack/comments{/number}","issue_comment_url":"https://api.github.com/repos/kartik-nighania/mlpack/issues/comments{/number}","contents_url":"https://api.github.com/repos/kartik-nighania/mlpack/contents/{+path}","compare_url":"https://api.github.com/repos/kartik-nighania/mlpack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kartik-nighania/mlpack/merges","archive_url":"https://api.github.com/repos/kartik-nighania/mlpack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kartik-nighania/mlpack/downloads","issues_url":"https://api.github.com/repos/kartik-nighania/mlpack/issues{/number}","pulls_url":"https://api.github.com/repos/kartik-nighania/mlpack/pulls{/number}","milestones_url":"https://api.github.com/repos/kartik-nighania/mlpack/milestones{/number}","notifications_url":"https://api.github.com/repos/kartik-nighania/mlpack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kartik-nighania/mlpack/labels{/name}","releases_url":"https://api.github.com/repos/kartik-nighania/mlpack/releases{/id}","deployments_url":"https://api.github.com/repos/kartik-nighania/mlpack/deployments","created_at":"2016-12-14T18:36:06Z","updated_at":"2016-12-14T18:36:10Z","pushed_at":"2017-06-29T22:10:43Z","git_url":"git://github.com/kartik-nighania/mlpack.git","ssh_url":"git@github.com:kartik-nighania/mlpack.git","clone_url":"https://github.com/kartik-nighania/mlpack.git","svn_url":"https://github.com/kartik-nighania/mlpack","homepage":null,"size":239590,"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,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mlpack:master","ref":"master","sha":"483833e3243b7d333e1cd7085bb4b4e34e103e64","user":{"login":"mlpack","id":10216045,"avatar_url":"https://avatars3.githubusercontent.com/u/10216045?v=3","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://avatars3.githubusercontent.com/u/10216045?v=3","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":"2017-06-29T09:01:57Z","pushed_at":"2017-06-30T10:27:48Z","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":239589,"stargazers_count":1563,"watchers_count":1563,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":585,"mirror_url":null,"open_issues_count":91,"forks":585,"open_issues":91,"watchers":1563,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mlpack/mlpack/pulls/938"},"html":{"href":"https://github.com/mlpack/mlpack/pull/938"},"issue":{"href":"https://api.github.com/repos/mlpack/mlpack/issues/938"},"comments":{"href":"https://api.github.com/repos/mlpack/mlpack/issues/938/comments"},"review_comments":{"href":"https://api.github.com/repos/mlpack/mlpack/pulls/938/comments"},"review_comment":{"href":"https://api.github.com/repos/mlpack/mlpack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mlpack/mlpack/pulls/938/commits"},"statuses":{"href":"https://api.github.com/repos/mlpack/mlpack/statuses/b27e3f6adbf651c07c46c24e187efd74ff2491e8"}}}}
{"actor":{"display_login":"zoq"}}