{"action":"created","comment":{"url":"https://api.github.com/repos/GAA-UAM/fda/pulls/comments/257498793","pull_request_review_id":204555743,"id":257498793,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI1NzQ5ODc5Mw==","diff_hunk":"@@ -0,0 +1,388 @@\n+\"\"\"Depth Measures Module.\n+\n+This module includes different methods to order functional data,\n+from the center (larger values) outwards(smaller ones).\"\"\"\n+\n+import numpy as np\n+from scipy.stats import rankdata\n+from .grid import FDataGrid\n+\n+__author__ = \"Amanda Hernando Bernabé\"\n+__email__ = \"amanda.hernando@estudiante.uam.es\"\n+\n+\n+def _rank_samples(fdatagrid):\n+    \"\"\"Ranks the he samples in the FDataGrid at each point of discretisation.\n+\n+    Args:\n+        fdatagrid (FDataGrid): Object whose samples are ranked.\n+\n+    Returns:\n+        numpy.darray: Array containing the ranks of the sample points.\n+\n+    Examples:\n+        Univariate setting:\n+\n+        >>> data_matrix = [[1, 1, 2, 3, 2.5, 2], [0.5, 0.5, 1, 2, 1.5, 1],\n+        ...                [-1, -1, -0.5, 1, 1, 0.5], [-0.5, -0.5, -0.5, -1, -1, -1]]\n+        >>> sample_points = [0, 2, 4, 6, 8, 10]\n+        >>> fd = FDataGrid(data_matrix, sample_points)\n+        >>> _rank_samples(fd)\n+        array([[[4.],\n+                [4.],\n+                [4.],\n+                [4.],\n+                [4.],\n+                [4.]],\n+        <BLANKLINE>\n+               [[3.],\n+                [3.],\n+                [3.],\n+                [3.],\n+                [3.],\n+                [3.]],\n+        <BLANKLINE>\n+               [[1.],\n+                [1.],\n+                [2.],\n+                [2.],\n+                [2.],\n+                [2.]],\n+        <BLANKLINE>\n+               [[2.],\n+                [2.],\n+                [2.],\n+                [1.],\n+                [1.],\n+                [1.]]])\n+\n+        Multivariate Setting:\n+\n+        >>> data_matrix = [[[[1, 3], [2, 6]], [[23, 54], [43, 76]], [[2, 45], [12, 65]]],\n+        ...                [[[21, 34], [8, 16]], [[67, 43], [32, 21]], [[10, 24], [3, 12]]]]\n+        >>> sample_points = [[2, 4, 6], [3, 6]]\n+        >>> fd = FDataGrid(data_matrix, sample_points)\n+        >>> _rank_samples(fd)\n+        array([[[[1., 1.],\n+                 [1., 1.]],\n+        <BLANKLINE>\n+                [[1., 2.],\n+                 [2., 2.]],\n+        <BLANKLINE>\n+                [[1., 2.],\n+                 [2., 2.]]],\n+        <BLANKLINE>\n+        <BLANKLINE>\n+               [[[2., 2.],\n+                 [2., 2.]],\n+        <BLANKLINE>\n+                [[2., 1.],\n+                 [1., 1.]],\n+        <BLANKLINE>\n+                [[2., 1.],\n+                 [1., 1.]]]])\n+    \"\"\"\n+    ranks = np.zeros(fdatagrid.shape)\n+\n+    if fdatagrid.ndim_domain == 1:","path":"fda/depth_measures.py","position":null,"original_position":87,"commit_id":"7a7b3e96f9f590813c30372021225e597b2946d6","original_commit_id":"da45ee2cf43273e5f7486cd5d97ad36399079794","user":{"login":"amandaher","id":10870521,"node_id":"MDQ6VXNlcjEwODcwNTIx","avatar_url":"https://avatars2.githubusercontent.com/u/10870521?v=4","gravatar_id":"","url":"https://api.github.com/users/amandaher","html_url":"https://github.com/amandaher","followers_url":"https://api.github.com/users/amandaher/followers","following_url":"https://api.github.com/users/amandaher/following{/other_user}","gists_url":"https://api.github.com/users/amandaher/gists{/gist_id}","starred_url":"https://api.github.com/users/amandaher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amandaher/subscriptions","organizations_url":"https://api.github.com/users/amandaher/orgs","repos_url":"https://api.github.com/users/amandaher/repos","events_url":"https://api.github.com/users/amandaher/events{/privacy}","received_events_url":"https://api.github.com/users/amandaher/received_events","type":"User","site_admin":false},"body":"implemented","created_at":"2019-02-17T10:55:22Z","updated_at":"2019-02-17T10:55:23Z","html_url":"https://github.com/GAA-UAM/fda/pull/43#discussion_r257498793","pull_request_url":"https://api.github.com/repos/GAA-UAM/fda/pulls/43","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/GAA-UAM/fda/pulls/comments/257498793"},"html":{"href":"https://github.com/GAA-UAM/fda/pull/43#discussion_r257498793"},"pull_request":{"href":"https://api.github.com/repos/GAA-UAM/fda/pulls/43"}},"in_reply_to_id":253947522},"pull_request":{"url":"https://api.github.com/repos/GAA-UAM/fda/pulls/43","id":248183667,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQ4MTgzNjY3","html_url":"https://github.com/GAA-UAM/fda/pull/43","diff_url":"https://github.com/GAA-UAM/fda/pull/43.diff","patch_url":"https://github.com/GAA-UAM/fda/pull/43.patch","issue_url":"https://api.github.com/repos/GAA-UAM/fda/issues/43","number":43,"state":"open","locked":false,"title":"Feature/depth measures","user":{"login":"amandaher","id":10870521,"node_id":"MDQ6VXNlcjEwODcwNTIx","avatar_url":"https://avatars2.githubusercontent.com/u/10870521?v=4","gravatar_id":"","url":"https://api.github.com/users/amandaher","html_url":"https://github.com/amandaher","followers_url":"https://api.github.com/users/amandaher/followers","following_url":"https://api.github.com/users/amandaher/following{/other_user}","gists_url":"https://api.github.com/users/amandaher/gists{/gist_id}","starred_url":"https://api.github.com/users/amandaher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amandaher/subscriptions","organizations_url":"https://api.github.com/users/amandaher/orgs","repos_url":"https://api.github.com/users/amandaher/repos","events_url":"https://api.github.com/users/amandaher/events{/privacy}","received_events_url":"https://api.github.com/users/amandaher/received_events","type":"User","site_admin":false},"body":"Depth measures and two real datasets: Canadian and Spanish weather datasets, added.\r\nThis branch built on top plotting-grid and from which boxplot and MS-plot branches born.","created_at":"2019-01-28T15:34:16Z","updated_at":"2019-02-17T10:55:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"12e27c18bbf13af0628aa66eed6ad13db438668e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/GAA-UAM/fda/pulls/43/commits","review_comments_url":"https://api.github.com/repos/GAA-UAM/fda/pulls/43/comments","review_comment_url":"https://api.github.com/repos/GAA-UAM/fda/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GAA-UAM/fda/issues/43/comments","statuses_url":"https://api.github.com/repos/GAA-UAM/fda/statuses/7a7b3e96f9f590813c30372021225e597b2946d6","head":{"label":"GAA-UAM:feature/depth-measures","ref":"feature/depth-measures","sha":"7a7b3e96f9f590813c30372021225e597b2946d6","user":{"login":"GAA-UAM","id":40304337,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwMzA0MzM3","avatar_url":"https://avatars1.githubusercontent.com/u/40304337?v=4","gravatar_id":"","url":"https://api.github.com/users/GAA-UAM","html_url":"https://github.com/GAA-UAM","followers_url":"https://api.github.com/users/GAA-UAM/followers","following_url":"https://api.github.com/users/GAA-UAM/following{/other_user}","gists_url":"https://api.github.com/users/GAA-UAM/gists{/gist_id}","starred_url":"https://api.github.com/users/GAA-UAM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GAA-UAM/subscriptions","organizations_url":"https://api.github.com/users/GAA-UAM/orgs","repos_url":"https://api.github.com/users/GAA-UAM/repos","events_url":"https://api.github.com/users/GAA-UAM/events{/privacy}","received_events_url":"https://api.github.com/users/GAA-UAM/received_events","type":"Organization","site_admin":false},"repo":{"id":96133420,"node_id":"MDEwOlJlcG9zaXRvcnk5NjEzMzQyMA==","name":"fda","full_name":"GAA-UAM/fda","private":false,"owner":{"login":"GAA-UAM","id":40304337,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwMzA0MzM3","avatar_url":"https://avatars1.githubusercontent.com/u/40304337?v=4","gravatar_id":"","url":"https://api.github.com/users/GAA-UAM","html_url":"https://github.com/GAA-UAM","followers_url":"https://api.github.com/users/GAA-UAM/followers","following_url":"https://api.github.com/users/GAA-UAM/following{/other_user}","gists_url":"https://api.github.com/users/GAA-UAM/gists{/gist_id}","starred_url":"https://api.github.com/users/GAA-UAM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GAA-UAM/subscriptions","organizations_url":"https://api.github.com/users/GAA-UAM/orgs","repos_url":"https://api.github.com/users/GAA-UAM/repos","events_url":"https://api.github.com/users/GAA-UAM/events{/privacy}","received_events_url":"https://api.github.com/users/GAA-UAM/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/GAA-UAM/fda","description":"Functional Data Analysis Python package","fork":false,"url":"https://api.github.com/repos/GAA-UAM/fda","forks_url":"https://api.github.com/repos/GAA-UAM/fda/forks","keys_url":"https://api.github.com/repos/GAA-UAM/fda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GAA-UAM/fda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GAA-UAM/fda/teams","hooks_url":"https://api.github.com/repos/GAA-UAM/fda/hooks","issue_events_url":"https://api.github.com/repos/GAA-UAM/fda/issues/events{/number}","events_url":"https://api.github.com/repos/GAA-UAM/fda/events","assignees_url":"https://api.github.com/repos/GAA-UAM/fda/assignees{/user}","branches_url":"https://api.github.com/repos/GAA-UAM/fda/branches{/branch}","tags_url":"https://api.github.com/repos/GAA-UAM/fda/tags","blobs_url":"https://api.github.com/repos/GAA-UAM/fda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GAA-UAM/fda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GAA-UAM/fda/git/refs{/sha}","trees_url":"https://api.github.com/repos/GAA-UAM/fda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GAA-UAM/fda/statuses/{sha}","languages_url":"https://api.github.com/repos/GAA-UAM/fda/languages","stargazers_url":"https://api.github.com/repos/GAA-UAM/fda/stargazers","contributors_url":"https://api.github.com/repos/GAA-UAM/fda/contributors","subscribers_url":"https://api.github.com/repos/GAA-UAM/fda/subscribers","subscription_url":"https://api.github.com/repos/GAA-UAM/fda/subscription","commits_url":"https://api.github.com/repos/GAA-UAM/fda/commits{/sha}","git_commits_url":"https://api.github.com/repos/GAA-UAM/fda/git/commits{/sha}","comments_url":"https://api.github.com/repos/GAA-UAM/fda/comments{/number}","issue_comment_url":"https://api.github.com/repos/GAA-UAM/fda/issues/comments{/number}","contents_url":"https://api.github.com/repos/GAA-UAM/fda/contents/{+path}","compare_url":"https://api.github.com/repos/GAA-UAM/fda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GAA-UAM/fda/merges","archive_url":"https://api.github.com/repos/GAA-UAM/fda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GAA-UAM/fda/downloads","issues_url":"https://api.github.com/repos/GAA-UAM/fda/issues{/number}","pulls_url":"https://api.github.com/repos/GAA-UAM/fda/pulls{/number}","milestones_url":"https://api.github.com/repos/GAA-UAM/fda/milestones{/number}","notifications_url":"https://api.github.com/repos/GAA-UAM/fda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GAA-UAM/fda/labels{/name}","releases_url":"https://api.github.com/repos/GAA-UAM/fda/releases{/id}","deployments_url":"https://api.github.com/repos/GAA-UAM/fda/deployments","created_at":"2017-07-03T17:06:56Z","updated_at":"2019-01-22T17:37:02Z","pushed_at":"2019-02-17T10:53:37Z","git_url":"git://github.com/GAA-UAM/fda.git","ssh_url":"git@github.com:GAA-UAM/fda.git","clone_url":"https://github.com/GAA-UAM/fda.git","svn_url":"https://github.com/GAA-UAM/fda","homepage":null,"size":889,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":14,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":2,"open_issues":14,"watchers":1,"default_branch":"master"}},"base":{"label":"GAA-UAM:develop","ref":"develop","sha":"f83b9e4ecf1030adeabeeab6b4d50e0c518c3e88","user":{"login":"GAA-UAM","id":40304337,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwMzA0MzM3","avatar_url":"https://avatars1.githubusercontent.com/u/40304337?v=4","gravatar_id":"","url":"https://api.github.com/users/GAA-UAM","html_url":"https://github.com/GAA-UAM","followers_url":"https://api.github.com/users/GAA-UAM/followers","following_url":"https://api.github.com/users/GAA-UAM/following{/other_user}","gists_url":"https://api.github.com/users/GAA-UAM/gists{/gist_id}","starred_url":"https://api.github.com/users/GAA-UAM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GAA-UAM/subscriptions","organizations_url":"https://api.github.com/users/GAA-UAM/orgs","repos_url":"https://api.github.com/users/GAA-UAM/repos","events_url":"https://api.github.com/users/GAA-UAM/events{/privacy}","received_events_url":"https://api.github.com/users/GAA-UAM/received_events","type":"Organization","site_admin":false},"repo":{"id":96133420,"node_id":"MDEwOlJlcG9zaXRvcnk5NjEzMzQyMA==","name":"fda","full_name":"GAA-UAM/fda","private":false,"owner":{"login":"GAA-UAM","id":40304337,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwMzA0MzM3","avatar_url":"https://avatars1.githubusercontent.com/u/40304337?v=4","gravatar_id":"","url":"https://api.github.com/users/GAA-UAM","html_url":"https://github.com/GAA-UAM","followers_url":"https://api.github.com/users/GAA-UAM/followers","following_url":"https://api.github.com/users/GAA-UAM/following{/other_user}","gists_url":"https://api.github.com/users/GAA-UAM/gists{/gist_id}","starred_url":"https://api.github.com/users/GAA-UAM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GAA-UAM/subscriptions","organizations_url":"https://api.github.com/users/GAA-UAM/orgs","repos_url":"https://api.github.com/users/GAA-UAM/repos","events_url":"https://api.github.com/users/GAA-UAM/events{/privacy}","received_events_url":"https://api.github.com/users/GAA-UAM/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/GAA-UAM/fda","description":"Functional Data Analysis Python package","fork":false,"url":"https://api.github.com/repos/GAA-UAM/fda","forks_url":"https://api.github.com/repos/GAA-UAM/fda/forks","keys_url":"https://api.github.com/repos/GAA-UAM/fda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GAA-UAM/fda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GAA-UAM/fda/teams","hooks_url":"https://api.github.com/repos/GAA-UAM/fda/hooks","issue_events_url":"https://api.github.com/repos/GAA-UAM/fda/issues/events{/number}","events_url":"https://api.github.com/repos/GAA-UAM/fda/events","assignees_url":"https://api.github.com/repos/GAA-UAM/fda/assignees{/user}","branches_url":"https://api.github.com/repos/GAA-UAM/fda/branches{/branch}","tags_url":"https://api.github.com/repos/GAA-UAM/fda/tags","blobs_url":"https://api.github.com/repos/GAA-UAM/fda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GAA-UAM/fda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GAA-UAM/fda/git/refs{/sha}","trees_url":"https://api.github.com/repos/GAA-UAM/fda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GAA-UAM/fda/statuses/{sha}","languages_url":"https://api.github.com/repos/GAA-UAM/fda/languages","stargazers_url":"https://api.github.com/repos/GAA-UAM/fda/stargazers","contributors_url":"https://api.github.com/repos/GAA-UAM/fda/contributors","subscribers_url":"https://api.github.com/repos/GAA-UAM/fda/subscribers","subscription_url":"https://api.github.com/repos/GAA-UAM/fda/subscription","commits_url":"https://api.github.com/repos/GAA-UAM/fda/commits{/sha}","git_commits_url":"https://api.github.com/repos/GAA-UAM/fda/git/commits{/sha}","comments_url":"https://api.github.com/repos/GAA-UAM/fda/comments{/number}","issue_comment_url":"https://api.github.com/repos/GAA-UAM/fda/issues/comments{/number}","contents_url":"https://api.github.com/repos/GAA-UAM/fda/contents/{+path}","compare_url":"https://api.github.com/repos/GAA-UAM/fda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GAA-UAM/fda/merges","archive_url":"https://api.github.com/repos/GAA-UAM/fda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GAA-UAM/fda/downloads","issues_url":"https://api.github.com/repos/GAA-UAM/fda/issues{/number}","pulls_url":"https://api.github.com/repos/GAA-UAM/fda/pulls{/number}","milestones_url":"https://api.github.com/repos/GAA-UAM/fda/milestones{/number}","notifications_url":"https://api.github.com/repos/GAA-UAM/fda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GAA-UAM/fda/labels{/name}","releases_url":"https://api.github.com/repos/GAA-UAM/fda/releases{/id}","deployments_url":"https://api.github.com/repos/GAA-UAM/fda/deployments","created_at":"2017-07-03T17:06:56Z","updated_at":"2019-01-22T17:37:02Z","pushed_at":"2019-02-17T10:53:37Z","git_url":"git://github.com/GAA-UAM/fda.git","ssh_url":"git@github.com:GAA-UAM/fda.git","clone_url":"https://github.com/GAA-UAM/fda.git","svn_url":"https://github.com/GAA-UAM/fda","homepage":null,"size":889,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":14,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":2,"open_issues":14,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GAA-UAM/fda/pulls/43"},"html":{"href":"https://github.com/GAA-UAM/fda/pull/43"},"issue":{"href":"https://api.github.com/repos/GAA-UAM/fda/issues/43"},"comments":{"href":"https://api.github.com/repos/GAA-UAM/fda/issues/43/comments"},"review_comments":{"href":"https://api.github.com/repos/GAA-UAM/fda/pulls/43/comments"},"review_comment":{"href":"https://api.github.com/repos/GAA-UAM/fda/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GAA-UAM/fda/pulls/43/commits"},"statuses":{"href":"https://api.github.com/repos/GAA-UAM/fda/statuses/7a7b3e96f9f590813c30372021225e597b2946d6"}},"author_association":"NONE"}}
{"actor":{"display_login":"amandaher"}}