{"action":"created","comment":{"url":"https://api.github.com/repos/lamfo-unb/QRNN/pulls/comments/180607040","pull_request_review_id":111056806,"id":180607040,"diff_hunk":"@@ -0,0 +1,50 @@\n+# -*- coding: utf-8 -*-\r\n+\"\"\"\r\n+Created on Tue Apr  3 19:24:24 2018\r\n+\r\n+@author: Leonardo Galler\r\n+\r\n+Create two assesment functions:\r\n+    1 - quantile_loss_evaluator(df: DataFrame, predict_col: str, target_col: str, tau: float):\r\n+        return {\"quantile_loss\": quantile_loss}\r\n+    input: \r\n+        df: DataFrame\r\n+        predict_col: str\r\n+        target_col: str\r\n+        tau: float\r\n+    output:\r\n+        dictionary = {\"quantile_loss\": quantile_loss}\r\n+    \r\n+    \r\n+    2 - proportion_of_hits_evaluator(df: DataFrame, predict_col: str, target_col: str):\r\n+        return {\"proportion_of_hits\": proportion_of_hits}\r\n+    input:\r\n+        df: DataFrame\r\n+        predict_col: str\r\n+        target_col: str\r\n+    output:\r\n+        dictionary = {\"proportion_of_hits\": proportion_of_hits}\r\n+        \r\n+\"\"\"\r\n+import pandas as pd\r\n+import numpy as np\r\n+\r\n+# Structure for quantile loss evaluator\r\n+def quantile_loss_evaluator( df , predict_col , target_col , tau ):\r\n+    \r\n+    # assigning the values\r\n+    y_hat = df[predict_col]\r\n+    y_tru = df[target_col]\r\n+    \r\n+    # Calculating\r\n+    quantile_loss = { str(tau) : sum((tau - (y_tru - y_hat )) * (y_hat)) }\r","path":"tests/evaluation_galler.py","position":40,"original_position":40,"commit_id":"cb78f007f83005d304cbc1c815b4925524404cf0","original_commit_id":"cb78f007f83005d304cbc1c815b4925524404cf0","user":{"login":"matheusfacure","id":18542597,"avatar_url":"https://avatars0.githubusercontent.com/u/18542597?v=4","gravatar_id":"","url":"https://api.github.com/users/matheusfacure","html_url":"https://github.com/matheusfacure","followers_url":"https://api.github.com/users/matheusfacure/followers","following_url":"https://api.github.com/users/matheusfacure/following{/other_user}","gists_url":"https://api.github.com/users/matheusfacure/gists{/gist_id}","starred_url":"https://api.github.com/users/matheusfacure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matheusfacure/subscriptions","organizations_url":"https://api.github.com/users/matheusfacure/orgs","repos_url":"https://api.github.com/users/matheusfacure/repos","events_url":"https://api.github.com/users/matheusfacure/events{/privacy}","received_events_url":"https://api.github.com/users/matheusfacure/received_events","type":"User","site_admin":false},"body":"Melhor usar a média pra loss n ser sensível ao tamanho da amostra ","created_at":"2018-04-11T00:41:58Z","updated_at":"2018-04-11T00:41:58Z","html_url":"https://github.com/lamfo-unb/QRNN/pull/10#discussion_r180607040","pull_request_url":"https://api.github.com/repos/lamfo-unb/QRNN/pulls/10","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/lamfo-unb/QRNN/pulls/comments/180607040"},"html":{"href":"https://github.com/lamfo-unb/QRNN/pull/10#discussion_r180607040"},"pull_request":{"href":"https://api.github.com/repos/lamfo-unb/QRNN/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/lamfo-unb/QRNN/pulls/10","id":179270325,"html_url":"https://github.com/lamfo-unb/QRNN/pull/10","diff_url":"https://github.com/lamfo-unb/QRNN/pull/10.diff","patch_url":"https://github.com/lamfo-unb/QRNN/pull/10.patch","issue_url":"https://api.github.com/repos/lamfo-unb/QRNN/issues/10","number":10,"state":"open","locked":false,"title":"Code for evaluation functions","user":{"login":"LeoGaller","id":6628460,"avatar_url":"https://avatars2.githubusercontent.com/u/6628460?v=4","gravatar_id":"","url":"https://api.github.com/users/LeoGaller","html_url":"https://github.com/LeoGaller","followers_url":"https://api.github.com/users/LeoGaller/followers","following_url":"https://api.github.com/users/LeoGaller/following{/other_user}","gists_url":"https://api.github.com/users/LeoGaller/gists{/gist_id}","starred_url":"https://api.github.com/users/LeoGaller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LeoGaller/subscriptions","organizations_url":"https://api.github.com/users/LeoGaller/orgs","repos_url":"https://api.github.com/users/LeoGaller/repos","events_url":"https://api.github.com/users/LeoGaller/events{/privacy}","received_events_url":"https://api.github.com/users/LeoGaller/received_events","type":"User","site_admin":false},"body":"Code for assesment on quantile loss and proportion of hits.","created_at":"2018-04-04T02:59:28Z","updated_at":"2018-04-11T00:41:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b717c3098a2891b3e8676d8bdcce1212ef31f72a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/lamfo-unb/QRNN/pulls/10/commits","review_comments_url":"https://api.github.com/repos/lamfo-unb/QRNN/pulls/10/comments","review_comment_url":"https://api.github.com/repos/lamfo-unb/QRNN/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lamfo-unb/QRNN/issues/10/comments","statuses_url":"https://api.github.com/repos/lamfo-unb/QRNN/statuses/cb78f007f83005d304cbc1c815b4925524404cf0","head":{"label":"lamfo-unb:LeoGaller-evaluation","ref":"LeoGaller-evaluation","sha":"cb78f007f83005d304cbc1c815b4925524404cf0","user":{"login":"lamfo-unb","id":25709161,"avatar_url":"https://avatars2.githubusercontent.com/u/25709161?v=4","gravatar_id":"","url":"https://api.github.com/users/lamfo-unb","html_url":"https://github.com/lamfo-unb","followers_url":"https://api.github.com/users/lamfo-unb/followers","following_url":"https://api.github.com/users/lamfo-unb/following{/other_user}","gists_url":"https://api.github.com/users/lamfo-unb/gists{/gist_id}","starred_url":"https://api.github.com/users/lamfo-unb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lamfo-unb/subscriptions","organizations_url":"https://api.github.com/users/lamfo-unb/orgs","repos_url":"https://api.github.com/users/lamfo-unb/repos","events_url":"https://api.github.com/users/lamfo-unb/events{/privacy}","received_events_url":"https://api.github.com/users/lamfo-unb/received_events","type":"Organization","site_admin":false},"repo":{"id":112094200,"name":"QRNN","full_name":"lamfo-unb/QRNN","owner":{"login":"lamfo-unb","id":25709161,"avatar_url":"https://avatars2.githubusercontent.com/u/25709161?v=4","gravatar_id":"","url":"https://api.github.com/users/lamfo-unb","html_url":"https://github.com/lamfo-unb","followers_url":"https://api.github.com/users/lamfo-unb/followers","following_url":"https://api.github.com/users/lamfo-unb/following{/other_user}","gists_url":"https://api.github.com/users/lamfo-unb/gists{/gist_id}","starred_url":"https://api.github.com/users/lamfo-unb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lamfo-unb/subscriptions","organizations_url":"https://api.github.com/users/lamfo-unb/orgs","repos_url":"https://api.github.com/users/lamfo-unb/repos","events_url":"https://api.github.com/users/lamfo-unb/events{/privacy}","received_events_url":"https://api.github.com/users/lamfo-unb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lamfo-unb/QRNN","description":"Code for the Quantile RNN for VaR estimation","fork":false,"url":"https://api.github.com/repos/lamfo-unb/QRNN","forks_url":"https://api.github.com/repos/lamfo-unb/QRNN/forks","keys_url":"https://api.github.com/repos/lamfo-unb/QRNN/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lamfo-unb/QRNN/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lamfo-unb/QRNN/teams","hooks_url":"https://api.github.com/repos/lamfo-unb/QRNN/hooks","issue_events_url":"https://api.github.com/repos/lamfo-unb/QRNN/issues/events{/number}","events_url":"https://api.github.com/repos/lamfo-unb/QRNN/events","assignees_url":"https://api.github.com/repos/lamfo-unb/QRNN/assignees{/user}","branches_url":"https://api.github.com/repos/lamfo-unb/QRNN/branches{/branch}","tags_url":"https://api.github.com/repos/lamfo-unb/QRNN/tags","blobs_url":"https://api.github.com/repos/lamfo-unb/QRNN/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lamfo-unb/QRNN/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lamfo-unb/QRNN/git/refs{/sha}","trees_url":"https://api.github.com/repos/lamfo-unb/QRNN/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lamfo-unb/QRNN/statuses/{sha}","languages_url":"https://api.github.com/repos/lamfo-unb/QRNN/languages","stargazers_url":"https://api.github.com/repos/lamfo-unb/QRNN/stargazers","contributors_url":"https://api.github.com/repos/lamfo-unb/QRNN/contributors","subscribers_url":"https://api.github.com/repos/lamfo-unb/QRNN/subscribers","subscription_url":"https://api.github.com/repos/lamfo-unb/QRNN/subscription","commits_url":"https://api.github.com/repos/lamfo-unb/QRNN/commits{/sha}","git_commits_url":"https://api.github.com/repos/lamfo-unb/QRNN/git/commits{/sha}","comments_url":"https://api.github.com/repos/lamfo-unb/QRNN/comments{/number}","issue_comment_url":"https://api.github.com/repos/lamfo-unb/QRNN/issues/comments{/number}","contents_url":"https://api.github.com/repos/lamfo-unb/QRNN/contents/{+path}","compare_url":"https://api.github.com/repos/lamfo-unb/QRNN/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lamfo-unb/QRNN/merges","archive_url":"https://api.github.com/repos/lamfo-unb/QRNN/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lamfo-unb/QRNN/downloads","issues_url":"https://api.github.com/repos/lamfo-unb/QRNN/issues{/number}","pulls_url":"https://api.github.com/repos/lamfo-unb/QRNN/pulls{/number}","milestones_url":"https://api.github.com/repos/lamfo-unb/QRNN/milestones{/number}","notifications_url":"https://api.github.com/repos/lamfo-unb/QRNN/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lamfo-unb/QRNN/labels{/name}","releases_url":"https://api.github.com/repos/lamfo-unb/QRNN/releases{/id}","deployments_url":"https://api.github.com/repos/lamfo-unb/QRNN/deployments","created_at":"2017-11-26T15:31:44Z","updated_at":"2018-04-11T00:39:52Z","pushed_at":"2018-04-11T00:39:55Z","git_url":"git://github.com/lamfo-unb/QRNN.git","ssh_url":"git@github.com:lamfo-unb/QRNN.git","clone_url":"https://github.com/lamfo-unb/QRNN.git","svn_url":"https://github.com/lamfo-unb/QRNN","homepage":"","size":945,"stargazers_count":0,"watchers_count":0,"language":"Jupyter Notebook","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"lamfo-unb:master","ref":"master","sha":"3cb98d986c753092a088864282d19bed88e43970","user":{"login":"lamfo-unb","id":25709161,"avatar_url":"https://avatars2.githubusercontent.com/u/25709161?v=4","gravatar_id":"","url":"https://api.github.com/users/lamfo-unb","html_url":"https://github.com/lamfo-unb","followers_url":"https://api.github.com/users/lamfo-unb/followers","following_url":"https://api.github.com/users/lamfo-unb/following{/other_user}","gists_url":"https://api.github.com/users/lamfo-unb/gists{/gist_id}","starred_url":"https://api.github.com/users/lamfo-unb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lamfo-unb/subscriptions","organizations_url":"https://api.github.com/users/lamfo-unb/orgs","repos_url":"https://api.github.com/users/lamfo-unb/repos","events_url":"https://api.github.com/users/lamfo-unb/events{/privacy}","received_events_url":"https://api.github.com/users/lamfo-unb/received_events","type":"Organization","site_admin":false},"repo":{"id":112094200,"name":"QRNN","full_name":"lamfo-unb/QRNN","owner":{"login":"lamfo-unb","id":25709161,"avatar_url":"https://avatars2.githubusercontent.com/u/25709161?v=4","gravatar_id":"","url":"https://api.github.com/users/lamfo-unb","html_url":"https://github.com/lamfo-unb","followers_url":"https://api.github.com/users/lamfo-unb/followers","following_url":"https://api.github.com/users/lamfo-unb/following{/other_user}","gists_url":"https://api.github.com/users/lamfo-unb/gists{/gist_id}","starred_url":"https://api.github.com/users/lamfo-unb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lamfo-unb/subscriptions","organizations_url":"https://api.github.com/users/lamfo-unb/orgs","repos_url":"https://api.github.com/users/lamfo-unb/repos","events_url":"https://api.github.com/users/lamfo-unb/events{/privacy}","received_events_url":"https://api.github.com/users/lamfo-unb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lamfo-unb/QRNN","description":"Code for the Quantile RNN for VaR estimation","fork":false,"url":"https://api.github.com/repos/lamfo-unb/QRNN","forks_url":"https://api.github.com/repos/lamfo-unb/QRNN/forks","keys_url":"https://api.github.com/repos/lamfo-unb/QRNN/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lamfo-unb/QRNN/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lamfo-unb/QRNN/teams","hooks_url":"https://api.github.com/repos/lamfo-unb/QRNN/hooks","issue_events_url":"https://api.github.com/repos/lamfo-unb/QRNN/issues/events{/number}","events_url":"https://api.github.com/repos/lamfo-unb/QRNN/events","assignees_url":"https://api.github.com/repos/lamfo-unb/QRNN/assignees{/user}","branches_url":"https://api.github.com/repos/lamfo-unb/QRNN/branches{/branch}","tags_url":"https://api.github.com/repos/lamfo-unb/QRNN/tags","blobs_url":"https://api.github.com/repos/lamfo-unb/QRNN/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lamfo-unb/QRNN/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lamfo-unb/QRNN/git/refs{/sha}","trees_url":"https://api.github.com/repos/lamfo-unb/QRNN/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lamfo-unb/QRNN/statuses/{sha}","languages_url":"https://api.github.com/repos/lamfo-unb/QRNN/languages","stargazers_url":"https://api.github.com/repos/lamfo-unb/QRNN/stargazers","contributors_url":"https://api.github.com/repos/lamfo-unb/QRNN/contributors","subscribers_url":"https://api.github.com/repos/lamfo-unb/QRNN/subscribers","subscription_url":"https://api.github.com/repos/lamfo-unb/QRNN/subscription","commits_url":"https://api.github.com/repos/lamfo-unb/QRNN/commits{/sha}","git_commits_url":"https://api.github.com/repos/lamfo-unb/QRNN/git/commits{/sha}","comments_url":"https://api.github.com/repos/lamfo-unb/QRNN/comments{/number}","issue_comment_url":"https://api.github.com/repos/lamfo-unb/QRNN/issues/comments{/number}","contents_url":"https://api.github.com/repos/lamfo-unb/QRNN/contents/{+path}","compare_url":"https://api.github.com/repos/lamfo-unb/QRNN/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lamfo-unb/QRNN/merges","archive_url":"https://api.github.com/repos/lamfo-unb/QRNN/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lamfo-unb/QRNN/downloads","issues_url":"https://api.github.com/repos/lamfo-unb/QRNN/issues{/number}","pulls_url":"https://api.github.com/repos/lamfo-unb/QRNN/pulls{/number}","milestones_url":"https://api.github.com/repos/lamfo-unb/QRNN/milestones{/number}","notifications_url":"https://api.github.com/repos/lamfo-unb/QRNN/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lamfo-unb/QRNN/labels{/name}","releases_url":"https://api.github.com/repos/lamfo-unb/QRNN/releases{/id}","deployments_url":"https://api.github.com/repos/lamfo-unb/QRNN/deployments","created_at":"2017-11-26T15:31:44Z","updated_at":"2018-04-11T00:39:52Z","pushed_at":"2018-04-11T00:39:55Z","git_url":"git://github.com/lamfo-unb/QRNN.git","ssh_url":"git@github.com:lamfo-unb/QRNN.git","clone_url":"https://github.com/lamfo-unb/QRNN.git","svn_url":"https://github.com/lamfo-unb/QRNN","homepage":"","size":945,"stargazers_count":0,"watchers_count":0,"language":"Jupyter Notebook","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lamfo-unb/QRNN/pulls/10"},"html":{"href":"https://github.com/lamfo-unb/QRNN/pull/10"},"issue":{"href":"https://api.github.com/repos/lamfo-unb/QRNN/issues/10"},"comments":{"href":"https://api.github.com/repos/lamfo-unb/QRNN/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/lamfo-unb/QRNN/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/lamfo-unb/QRNN/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lamfo-unb/QRNN/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/lamfo-unb/QRNN/statuses/cb78f007f83005d304cbc1c815b4925524404cf0"}},"author_association":"NONE"}}
{"actor":{"display_login":"matheusfacure"}}