GitHub PullRequestReviewCommentEvent at 2014-08-28 06:47:15
Repository: nilearn
Actor: AlexandreAbraham
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/nilearn/nilearn/pulls/comments/16823384","id":16823384,"diff_hunk":"@@ -0,0 +1,439 @@\n+import warnings\n+from math import floor, sqrt\n+\n+import numpy as np\n+from scipy import linalg\n+\n+from sklearn.base import BaseEstimator, TransformerMixin, clone\n+from sklearn.covariance import EmpiricalCovariance\n+from .._utils.testing import is_spd\n+\n+\n+def check_mat(mat, prop):\n+    \"\"\"Raise a ValueError if the input matrix does not satisfy the property.\n+\n+    Parameters\n+    ----------\n+    mat : numpy.ndarray\n+        Input array.\n+\n+    prop : {'square', 'symmetric', 'spd'}\n+        Property to check.\n+    \"\"\"\n+    if prop == 'square':\n+        if mat.ndim != 2 or (mat.shape[0] != mat.shape[-1]):\n+            raise ValueError('Expected a square matrix, got array of shape' +\n+                             ' {0}.'.format(mat.shape))\n+    if prop == 'symmetric':\n+        if not np.allclose(mat, mat.T):\n+            raise ValueError('Expected a symmetric matrix.')\n+\n+    if prop == 'spd':\n+        if not is_spd(mat):\n+            raise ValueError('Expected a symmetric positive definite matrix.')\n+\n+\n+def map_eig(function, vals, vecs):\n+    \"\"\"Return the symmetric matrix with eigenvectors vecs and eigenvalues\n+    obtained by applying the function to vals.\n+\n+    Parameters\n+    ----------\n+    function : function\n+        The function to apply.\n+\n+    vals : numpy.ndarray, shape (M, )\n+        Input argument of the function.\n+\n+    vecs : numpy.ndarray, shape (M, M)\n+        Unitary matrix.\n+\n+    Returns\n+    -------\n+    output : numpy.ndarray, shape (M, M)\n+        The symmetric matrix obtained after transforming the eigenvalues, with\n+        eigenvectors the columns of vecs.\n+    \"\"\"\n+    return np.dot(vecs * function(vals), vecs.T)\n+\n+\n+def map_sym(function, sym):\n+    \"\"\"Matrix function, for real symmetric matrices. The function is applied\n+    to the eigenvalues of sym.\n+\n+    Parameters\n+    ----------\n+    function : function\n+        The function to apply.\n+\n+    sym : numpy.ndarray, shape (M, M)\n+        The matrix to be transformed.\n+\n+    Returns\n+    -------\n+    output : numpy.ndarray, shape (M, M)\n+        The new symmetric matrix obtained after transforming the eigenvalues.\n+\n+    Note\n+    ----\n+    If input matrix is not real symmetric, no error is reported but result will\n+    be wrong.\n+    \"\"\"\n+    vals, vecs = linalg.eigh(sym)\n+    return map_eig(function, vals, vecs)\n+\n+\n+def geometric_mean(mats, init=None, max_iter=10, tol=1e-7):\n+    \"\"\"Compute the geometric mean of symmetric positive definite matrices.\n+\n+    The geometric mean is the minimizer of the sum of squared distances from an\n+    arbitrary matrix to each input matrix in the manifold of symmetric positive\n+    definite matrices.\n+\n+    Minimization of the objective function is done by an intrinsic gradient\n+    descent in the manifold: moving from the current point to the next one\n+    along a short geodesic arc in the opposite direction of the\n+    covariant derivative.\n+\n+    See Algorithm 3 of:\n+        P. Thomas Fletcher, Sarang Joshi. Riemannian Geometry for the\n+        Statistical Analysis of Diffusion Tensor Data. Signal Processing, 2007.\n+\n+    Parameters\n+    ----------\n+    mats : list of numpy.ndarray, shape of each (n_features, n_features)\n+        List of matrices whose geometric mean to compute. Raise an error if the\n+        arrays are not all symmetric positive definite of the same shape.\n+\n+    init : numpy.ndarray, shape (n_features, n_features) or None, optional\n+        Initialization matrix. Raise an error if the array is not symmetric\n+        positive definite of the same shape as the elements of mats. Set to the\n+        arithmetic mean of mats if None.\n+\n+    max_iter : int, optional (default to 10)\n+        Maximal number of iterations.\n+\n+    tol : float, optional (default to 1e-7)\n+        Tolerance.\n+\n+    Returns\n+    -------\n+    geo : numpy.ndarray, shape (n_features, n_features)\n+        Geometric mean of the matrices.\n+    \"\"\"\n+    # Shape and symmetry positive definiteness checks\n+    n_features = mats[0].shape[0]\n+    for mat in mats:\n+        check_mat(mat, 'square')\n+        if mat.shape[0] != n_features:\n+            raise ValueError(\"Matrices are not of the same shape.\")\n+        check_mat(mat, 'spd')\n+\n+    # Initialization\n+    mats = np.array(mats)\n+    if init is None:\n+        geo = np.mean(mats, axis=0)\n+    else:\n+        check_mat(init, 'square')\n+        if init.shape[0] != n_features:\n+            raise ValueError(\"Initialization has not the correct shape.\")\n+        check_mat(init, 'spd')\n+        geo = init\n+\n+    norm_old = np.inf\n+    step = 1.\n+\n+    # Gradient descent\n+    for n in range(max_iter):\n+        # Computation of the gradient\n+        vals_geo, vecs_geo = linalg.eigh(geo)\n+        geo_inv_sqrt = map_eig(np.sqrt, 1. / vals_geo, vecs_geo)\n+        whitened_mats = [geo_inv_sqrt.dot(mat).dot(geo_inv_sqrt)\n+            for mat in mats]\n+        logs = [map_sym(np.log, w_mat) for w_mat in whitened_mats]\n+        logs_mean = np.mean(logs, axis=0)  # Covariant derivative is\n+                                           # - geo.dot(logms_mean)\n+        if np.any(np.isnan(logs_mean)):\n+            raise FloatingPointError(\"Nan value after logarithm operation.\")\n+\n+        norm = np.linalg.norm(logs_mean)  # Norm of the covariant derivative on\n+                                          # the tangent space at point geo\n+\n+        # Update of the minimizer\n+        vals_log, vecs_log = linalg.eigh(logs_mean)\n+        geo_sqrt = map_eig(np.sqrt, vals_geo, vecs_geo)\n+        geo = geo_sqrt.dot(map_eig(np.exp, vals_log * step, vecs_log)).dot(\n+            geo_sqrt)  # Move along the geodesic with step size step\n+\n+        # Update the norm and the step size\n+        if norm < norm_old:\n+            norm_old = norm\n+        if norm > norm_old:\n+            step = step / 2.\n+            norm = norm_old\n+        if tol is not None and norm / geo.size < tol:\n+            break\n+    if tol is not None and norm / geo.size >= tol:\n+        warnings.warn(\"Maximum number of iterations {0} reached without \" \\\n+                      \"getting to the requested tolerance level \" \\\n+                      \"{1}.\".format(max_iter, tol))\n+\n+    return geo\n+\n+\n+def grad_geometric_mean(mats, init=None, max_iter=10, tol=1e-7):\n+    \"\"\"Return the norm of the covariant derivative at each iteration step of\n+    geometric_mean. See its docstring for details.\n+\n+    Norm is intrinsic norm on the tangent space of the manifold of symmetric\n+    positive definite matrices.\n+\n+    Returns\n+    -------\n+    grad_norm : list of float\n+        Norm of the covariant derivative in the tangent space at each step.\n+    \"\"\"\n+    mats = np.array(mats)\n+\n+    # Initialization\n+    if init is None:\n+        geo = np.mean(mats, axis=0)\n+    else:\n+        geo = init\n+    norm_old = np.inf\n+    step = 1.\n+    grad_norm = []\n+    for n in range(max_iter):\n+        # Computation of the gradient\n+        vals_geo, vecs_geo = linalg.eigh(geo)\n+        geo_inv_sqrt = map_eig(np.sqrt, 1. / vals_geo, vecs_geo)\n+        whitened_mats = [geo_inv_sqrt.dot(mat).dot(geo_inv_sqrt)\n+            for mat in mats]\n+        logs = [map_sym(np.log, w_mat) for w_mat in whitened_mats]\n+        logs_mean = np.mean(logs, axis=0)  # Covariant derivative is\n+                                           # - geo.dot(logms_mean)\n+        norm = np.linalg.norm(logs_mean)  # Norm of the covariant derivative on\n+                                          # the tangent space at point geo\n+\n+        # Update of the minimizer\n+        vals_log, vecs_log = linalg.eigh(logs_mean)\n+        geo_sqrt = map_eig(np.sqrt, vals_geo, vecs_geo)\n+        geo = geo_sqrt.dot(map_eig(np.exp, vals_log * step, vecs_log)).dot(\n+            geo_sqrt)  # Move along the geodesic with step size step\n+\n+        # Update the norm and the step size\n+        if norm < norm_old:\n+            norm_old = norm\n+        if norm > norm_old:\n+            step = step / 2.\n+            norm = norm_old\n+\n+        grad_norm.append(norm / geo.size)\n+        if tol is not None and norm / geo.size < tol:\n+            break\n+\n+    return grad_norm\n+\n+\n+def sym_to_vec(sym, isometry=True):\n+    \"\"\"Return the flattened lower triangular part of an array.\n+\n+    Acts on the last two dimensions of the array if not 2-dimensional.\n+\n+    Parameters\n+    ----------\n+    sym : numpy.ndarray, shape (..., p, p)\n+        Input array.\n+\n+    isometry : bool, optional (default to True)\n+        If True, off diagonal terms of sym are multiplied by sqrt(2).\n+\n+    Returns\n+    -------\n+    output : numpy.ndarray, shape (..., p * (p + 1) / 2)\n+        The output flattened lower triangular part of sym.\n+    \"\"\"\n+    tril_mask = np.tril(np.ones(sym.shape[-2:]), -1).astype(np.bool)\n+    if isometry:\n+        sym = sym.copy()\n+        sym[..., tril_mask] *= sqrt(2)\n+\n+    tril_mask.flat[::sym.shape[-1] + 1] = True\n+    return sym[..., tril_mask]\n+\n+\n+def vec_to_sym(vec, isometry=True):\n+    \"\"\"Return the symmetric array given its flattened lower triangular part.\n+\n+    Acts on the last dimension of the array if not 1-dimensional.\n+\n+    Parameters\n+    ----------\n+    vec : numpy.ndarray, shape (..., p * (p + 1) /2)\n+        The input array.\n+\n+    isometry : bool, optional (default to True)\n+        If True, off diagonal terms of the output array are divided by sqrt(2).\n+\n+    Returns\n+    -------\n+    sym : numpy.ndarray, shape (..., p, p)\n+        The output symmetric array.\n+    \"\"\"\n+    n = vec.shape[-1]\n+    # solve p * (p + 1) / 2 = n subj. to p > 0\n+    # p ** 2 + p - 2n = 0 & p > 0\n+    # p = - 1 / 2 + sqrt( 1 + 8 * n) / 2\n+    p = (sqrt(8 * n + 1) - 1.) / 2\n+    if p > floor(p):\n+        raise ValueError(\"Vector size unsuitable, can not transform vector to \"\n+                         \"symmetric matrix.\")\n+\n+    p = int(p)\n+    mask = np.tril(np.ones((p, p))).astype(np.bool)\n+    sym = np.zeros(vec.shape[:-1] + (p, p))\n+    sym[..., mask] = vec\n+    sym.swapaxes(-1, -2)[..., mask] = vec\n+    if isometry:\n+        mask.flat[::p + 1] = False\n+        mask = mask + mask.T\n+        sym[..., mask] /= sqrt(2)\n+\n+    return sym\n+\n+\n+def cov_to_corr(cov):\n+    \"\"\"Return correlation matrix for a given covariance matrix.\n+\n+    Parameters\n+    ----------\n+    cov : 2D numpy.ndarray\n+        The input covariance matrix.\n+\n+    Returns\n+    -------\n+    corr : 2D numpy.ndarray\n+        The ouput correlation matrix.\n+    \"\"\"\n+    d = np.atleast_2d(1. / np.sqrt(np.diag(cov)))\n+    corr = cov * d * d.T\n+    return corr\n+\n+\n+def prec_to_partial(prec):\n+    \"\"\"Return partial correlation matrix for a given precision matrix.\n+\n+    Parameters\n+    ----------\n+    prec : 2D numpy.ndarray\n+        The input precision matrix.\n+\n+    Returns\n+    -------\n+    partial : 2D numpy.ndarray\n+        The 2D ouput partial correlation matrix.\n+    \"\"\"\n+    partial = -cov_to_corr(prec)","path":"nilearn/connectivity/embedding.py","position":336,"original_position":336,"commit_id":"344eb617df201529207daa5477f3b1b886bf465c","original_commit_id":"344eb617df201529207daa5477f3b1b886bf465c","user":{"login":"AlexandreAbraham","id":1647301,"avatar_url":"https://avatars.githubusercontent.com/u/1647301?v=2","gravatar_id":"2a8f3943c0be829d52e15fa24f13da0e","url":"https://api.github.com/users/AlexandreAbraham","html_url":"https://github.com/AlexandreAbraham","followers_url":"https://api.github.com/users/AlexandreAbraham/followers","following_url":"https://api.github.com/users/AlexandreAbraham/following{/other_user}","gists_url":"https://api.github.com/users/AlexandreAbraham/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexandreAbraham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexandreAbraham/subscriptions","organizations_url":"https://api.github.com/users/AlexandreAbraham/orgs","repos_url":"https://api.github.com/users/AlexandreAbraham/repos","events_url":"https://api.github.com/users/AlexandreAbraham/events{/privacy}","received_events_url":"https://api.github.com/users/AlexandreAbraham/received_events","type":"User","site_admin":false},"body":"Actually pep8 does not impose a whitespace here. I would write the same as Salma, it's clearer to me.","created_at":"2014-08-28T06:47:15Z","updated_at":"2014-08-28T06:47:15Z","html_url":"https://github.com/nilearn/nilearn/pull/227#discussion_r16823384","pull_request_url":"https://api.github.com/repos/nilearn/nilearn/pulls/227","_links":{"self":{"href":"https://api.github.com/repos/nilearn/nilearn/pulls/comments/16823384"},"html":{"href":"https://github.com/nilearn/nilearn/pull/227#discussion_r16823384"},"pull_request":{"href":"https://api.github.com/repos/nilearn/nilearn/pulls/227"}}},"pull_request":{"url":"https://api.github.com/repos/nilearn/nilearn/pulls/227","id":18674783,"html_url":"https://github.com/nilearn/nilearn/pull/227","diff_url":"https://github.com/nilearn/nilearn/pull/227.diff","patch_url":"https://github.com/nilearn/nilearn/pull/227.patch","issue_url":"https://api.github.com/repos/nilearn/nilearn/issues/227","number":227,"state":"open","locked":false,"title":"Tangent space embedding","user":{"login":"salma1601","id":7080143,"avatar_url":"https://avatars.githubusercontent.com/u/7080143?v=2","gravatar_id":"e9b251b0dee6ff922fa6a91eff814321","url":"https://api.github.com/users/salma1601","html_url":"https://github.com/salma1601","followers_url":"https://api.github.com/users/salma1601/followers","following_url":"https://api.github.com/users/salma1601/following{/other_user}","gists_url":"https://api.github.com/users/salma1601/gists{/gist_id}","starred_url":"https://api.github.com/users/salma1601/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salma1601/subscriptions","organizations_url":"https://api.github.com/users/salma1601/orgs","repos_url":"https://api.github.com/users/salma1601/repos","events_url":"https://api.github.com/users/salma1601/events{/privacy}","received_events_url":"https://api.github.com/users/salma1601/received_events","type":"User","site_admin":false},"body":"Different connectivity measures, including tangent space measure","created_at":"2014-07-21T19:37:25Z","updated_at":"2014-08-28T06:47:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c4ad0a24e93dd40b33403c219575ec67f47a505d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nilearn/nilearn/pulls/227/commits","review_comments_url":"https://api.github.com/repos/nilearn/nilearn/pulls/227/comments","review_comment_url":"https://api.github.com/repos/nilearn/nilearn/pulls/comments/{number}","comments_url":"https://api.github.com/repos/nilearn/nilearn/issues/227/comments","statuses_url":"https://api.github.com/repos/nilearn/nilearn/statuses/344eb617df201529207daa5477f3b1b886bf465c","head":{"label":"salma1601:tangent_salma","ref":"tangent_salma","sha":"344eb617df201529207daa5477f3b1b886bf465c","user":{"login":"salma1601","id":7080143,"avatar_url":"https://avatars.githubusercontent.com/u/7080143?v=2","gravatar_id":"e9b251b0dee6ff922fa6a91eff814321","url":"https://api.github.com/users/salma1601","html_url":"https://github.com/salma1601","followers_url":"https://api.github.com/users/salma1601/followers","following_url":"https://api.github.com/users/salma1601/following{/other_user}","gists_url":"https://api.github.com/users/salma1601/gists{/gist_id}","starred_url":"https://api.github.com/users/salma1601/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salma1601/subscriptions","organizations_url":"https://api.github.com/users/salma1601/orgs","repos_url":"https://api.github.com/users/salma1601/repos","events_url":"https://api.github.com/users/salma1601/events{/privacy}","received_events_url":"https://api.github.com/users/salma1601/received_events","type":"User","site_admin":false},"repo":{"id":18172102,"name":"nilearn","full_name":"salma1601/nilearn","owner":{"login":"salma1601","id":7080143,"avatar_url":"https://avatars.githubusercontent.com/u/7080143?v=2","gravatar_id":"e9b251b0dee6ff922fa6a91eff814321","url":"https://api.github.com/users/salma1601","html_url":"https://github.com/salma1601","followers_url":"https://api.github.com/users/salma1601/followers","following_url":"https://api.github.com/users/salma1601/following{/other_user}","gists_url":"https://api.github.com/users/salma1601/gists{/gist_id}","starred_url":"https://api.github.com/users/salma1601/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salma1601/subscriptions","organizations_url":"https://api.github.com/users/salma1601/orgs","repos_url":"https://api.github.com/users/salma1601/repos","events_url":"https://api.github.com/users/salma1601/events{/privacy}","received_events_url":"https://api.github.com/users/salma1601/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/salma1601/nilearn","description":"Machine learning for NeuroImaging in Python","fork":true,"url":"https://api.github.com/repos/salma1601/nilearn","forks_url":"https://api.github.com/repos/salma1601/nilearn/forks","keys_url":"https://api.github.com/repos/salma1601/nilearn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/salma1601/nilearn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/salma1601/nilearn/teams","hooks_url":"https://api.github.com/repos/salma1601/nilearn/hooks","issue_events_url":"https://api.github.com/repos/salma1601/nilearn/issues/events{/number}","events_url":"https://api.github.com/repos/salma1601/nilearn/events","assignees_url":"https://api.github.com/repos/salma1601/nilearn/assignees{/user}","branches_url":"https://api.github.com/repos/salma1601/nilearn/branches{/branch}","tags_url":"https://api.github.com/repos/salma1601/nilearn/tags","blobs_url":"https://api.github.com/repos/salma1601/nilearn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/salma1601/nilearn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/salma1601/nilearn/git/refs{/sha}","trees_url":"https://api.github.com/repos/salma1601/nilearn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/salma1601/nilearn/statuses/{sha}","languages_url":"https://api.github.com/repos/salma1601/nilearn/languages","stargazers_url":"https://api.github.com/repos/salma1601/nilearn/stargazers","contributors_url":"https://api.github.com/repos/salma1601/nilearn/contributors","subscribers_url":"https://api.github.com/repos/salma1601/nilearn/subscribers","subscription_url":"https://api.github.com/repos/salma1601/nilearn/subscription","commits_url":"https://api.github.com/repos/salma1601/nilearn/commits{/sha}","git_commits_url":"https://api.github.com/repos/salma1601/nilearn/git/commits{/sha}","comments_url":"https://api.github.com/repos/salma1601/nilearn/comments{/number}","issue_comment_url":"https://api.github.com/repos/salma1601/nilearn/issues/comments/{number}","contents_url":"https://api.github.com/repos/salma1601/nilearn/contents/{+path}","compare_url":"https://api.github.com/repos/salma1601/nilearn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/salma1601/nilearn/merges","archive_url":"https://api.github.com/repos/salma1601/nilearn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/salma1601/nilearn/downloads","issues_url":"https://api.github.com/repos/salma1601/nilearn/issues{/number}","pulls_url":"https://api.github.com/repos/salma1601/nilearn/pulls{/number}","milestones_url":"https://api.github.com/repos/salma1601/nilearn/milestones{/number}","notifications_url":"https://api.github.com/repos/salma1601/nilearn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/salma1601/nilearn/labels{/name}","releases_url":"https://api.github.com/repos/salma1601/nilearn/releases{/id}","created_at":"2014-03-27T10:26:53Z","updated_at":"2014-04-07T13:30:58Z","pushed_at":"2014-08-25T08:54:15Z","git_url":"git://github.com/salma1601/nilearn.git","ssh_url":"git@github.com:salma1601/nilearn.git","clone_url":"https://github.com/salma1601/nilearn.git","svn_url":"https://github.com/salma1601/nilearn","homepage":"http://nilearn.github.io","size":4117,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"nilearn:master","ref":"master","sha":"1b99144130032d896b70d926225ea65309d2e48e","user":{"login":"nilearn","id":4646912,"avatar_url":"https://avatars.githubusercontent.com/u/4646912?v=2","gravatar_id":"8b35c948467638a5527d0bad1de7880e","url":"https://api.github.com/users/nilearn","html_url":"https://github.com/nilearn","followers_url":"https://api.github.com/users/nilearn/followers","following_url":"https://api.github.com/users/nilearn/following{/other_user}","gists_url":"https://api.github.com/users/nilearn/gists{/gist_id}","starred_url":"https://api.github.com/users/nilearn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nilearn/subscriptions","organizations_url":"https://api.github.com/users/nilearn/orgs","repos_url":"https://api.github.com/users/nilearn/repos","events_url":"https://api.github.com/users/nilearn/events{/privacy}","received_events_url":"https://api.github.com/users/nilearn/received_events","type":"Organization","site_admin":false},"repo":{"id":1235740,"name":"nilearn","full_name":"nilearn/nilearn","owner":{"login":"nilearn","id":4646912,"avatar_url":"https://avatars.githubusercontent.com/u/4646912?v=2","gravatar_id":"8b35c948467638a5527d0bad1de7880e","url":"https://api.github.com/users/nilearn","html_url":"https://github.com/nilearn","followers_url":"https://api.github.com/users/nilearn/followers","following_url":"https://api.github.com/users/nilearn/following{/other_user}","gists_url":"https://api.github.com/users/nilearn/gists{/gist_id}","starred_url":"https://api.github.com/users/nilearn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nilearn/subscriptions","organizations_url":"https://api.github.com/users/nilearn/orgs","repos_url":"https://api.github.com/users/nilearn/repos","events_url":"https://api.github.com/users/nilearn/events{/privacy}","received_events_url":"https://api.github.com/users/nilearn/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nilearn/nilearn","description":"Machine learning for NeuroImaging in Python","fork":false,"url":"https://api.github.com/repos/nilearn/nilearn","forks_url":"https://api.github.com/repos/nilearn/nilearn/forks","keys_url":"https://api.github.com/repos/nilearn/nilearn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nilearn/nilearn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nilearn/nilearn/teams","hooks_url":"https://api.github.com/repos/nilearn/nilearn/hooks","issue_events_url":"https://api.github.com/repos/nilearn/nilearn/issues/events{/number}","events_url":"https://api.github.com/repos/nilearn/nilearn/events","assignees_url":"https://api.github.com/repos/nilearn/nilearn/assignees{/user}","branches_url":"https://api.github.com/repos/nilearn/nilearn/branches{/branch}","tags_url":"https://api.github.com/repos/nilearn/nilearn/tags","blobs_url":"https://api.github.com/repos/nilearn/nilearn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nilearn/nilearn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nilearn/nilearn/git/refs{/sha}","trees_url":"https://api.github.com/repos/nilearn/nilearn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nilearn/nilearn/statuses/{sha}","languages_url":"https://api.github.com/repos/nilearn/nilearn/languages","stargazers_url":"https://api.github.com/repos/nilearn/nilearn/stargazers","contributors_url":"https://api.github.com/repos/nilearn/nilearn/contributors","subscribers_url":"https://api.github.com/repos/nilearn/nilearn/subscribers","subscription_url":"https://api.github.com/repos/nilearn/nilearn/subscription","commits_url":"https://api.github.com/repos/nilearn/nilearn/commits{/sha}","git_commits_url":"https://api.github.com/repos/nilearn/nilearn/git/commits{/sha}","comments_url":"https://api.github.com/repos/nilearn/nilearn/comments{/number}","issue_comment_url":"https://api.github.com/repos/nilearn/nilearn/issues/comments/{number}","contents_url":"https://api.github.com/repos/nilearn/nilearn/contents/{+path}","compare_url":"https://api.github.com/repos/nilearn/nilearn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nilearn/nilearn/merges","archive_url":"https://api.github.com/repos/nilearn/nilearn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nilearn/nilearn/downloads","issues_url":"https://api.github.com/repos/nilearn/nilearn/issues{/number}","pulls_url":"https://api.github.com/repos/nilearn/nilearn/pulls{/number}","milestones_url":"https://api.github.com/repos/nilearn/nilearn/milestones{/number}","notifications_url":"https://api.github.com/repos/nilearn/nilearn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nilearn/nilearn/labels{/name}","releases_url":"https://api.github.com/repos/nilearn/nilearn/releases{/id}","created_at":"2011-01-09T19:02:23Z","updated_at":"2014-08-14T02:30:21Z","pushed_at":"2014-08-24T21:31:13Z","git_url":"git://github.com/nilearn/nilearn.git","ssh_url":"git@github.com:nilearn/nilearn.git","clone_url":"https://github.com/nilearn/nilearn.git","svn_url":"https://github.com/nilearn/nilearn","homepage":"http://nilearn.github.io","size":8745,"stargazers_count":59,"watchers_count":59,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":42,"mirror_url":null,"open_issues_count":43,"forks":42,"open_issues":43,"watchers":59,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nilearn/nilearn/pulls/227"},"html":{"href":"https://github.com/nilearn/nilearn/pull/227"},"issue":{"href":"https://api.github.com/repos/nilearn/nilearn/issues/227"},"comments":{"href":"https://api.github.com/repos/nilearn/nilearn/issues/227/comments"},"review_comments":{"href":"https://api.github.com/repos/nilearn/nilearn/pulls/227/comments"},"review_comment":{"href":"https://api.github.com/repos/nilearn/nilearn/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/nilearn/nilearn/pulls/227/commits"},"statuses":{"href":"https://api.github.com/repos/nilearn/nilearn/statuses/344eb617df201529207daa5477f3b1b886bf465c"}}}}