{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/66931502","id":66931502,"diff_hunk":"@@ -120,6 +120,13 @@ object AssociationRules {\n     @Since(\"1.5.0\")\n     def confidence: Double = freqUnion.toDouble / freqAntecedent\n \n+    /**\n+     * Returns the support of the rule. Current implementation would return the number of\n+     * co-occurrence of antecedent and consequent.\n+     */\n+    @Since(\"2.1.0\")\n+    def support: Double = freqUnion.toDouble\n+","path":"mllib/src/main/scala/org/apache/spark/mllib/fpm/AssociationRules.scala","position":10,"original_position":10,"commit_id":"60efd0520a3af52995c2d6b1a2abaeebe658bb32","original_commit_id":"60efd0520a3af52995c2d6b1a2abaeebe658bb32","user":{"login":"hhbyyh","id":7981698,"avatar_url":"https://avatars.githubusercontent.com/u/7981698?v=3","gravatar_id":"","url":"https://api.github.com/users/hhbyyh","html_url":"https://github.com/hhbyyh","followers_url":"https://api.github.com/users/hhbyyh/followers","following_url":"https://api.github.com/users/hhbyyh/following{/other_user}","gists_url":"https://api.github.com/users/hhbyyh/gists{/gist_id}","starred_url":"https://api.github.com/users/hhbyyh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hhbyyh/subscriptions","organizations_url":"https://api.github.com/users/hhbyyh/orgs","repos_url":"https://api.github.com/users/hhbyyh/repos","events_url":"https://api.github.com/users/hhbyyh/events{/privacy}","received_events_url":"https://api.github.com/users/hhbyyh/received_events","type":"User","site_admin":false},"body":"I find it hard to just deprecating the old constructor and still keep `support` as a fraction if no dataset size is passed in. ","created_at":"2016-06-14T08:51:57Z","updated_at":"2016-06-14T08:51:57Z","html_url":"https://github.com/apache/spark/pull/13656#discussion_r66931502","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/13656","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/66931502"},"html":{"href":"https://github.com/apache/spark/pull/13656#discussion_r66931502"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/13656"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/13656","id":73691458,"html_url":"https://github.com/apache/spark/pull/13656","diff_url":"https://github.com/apache/spark/pull/13656.diff","patch_url":"https://github.com/apache/spark/pull/13656.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/13656","number":13656,"state":"open","locked":false,"title":"[SPARK-15938]Adding \"support\" property to MLlib Association Rule","user":{"login":"hhbyyh","id":7981698,"avatar_url":"https://avatars.githubusercontent.com/u/7981698?v=3","gravatar_id":"","url":"https://api.github.com/users/hhbyyh","html_url":"https://github.com/hhbyyh","followers_url":"https://api.github.com/users/hhbyyh/followers","following_url":"https://api.github.com/users/hhbyyh/following{/other_user}","gists_url":"https://api.github.com/users/hhbyyh/gists{/gist_id}","starred_url":"https://api.github.com/users/hhbyyh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hhbyyh/subscriptions","organizations_url":"https://api.github.com/users/hhbyyh/orgs","repos_url":"https://api.github.com/users/hhbyyh/repos","events_url":"https://api.github.com/users/hhbyyh/events{/privacy}","received_events_url":"https://api.github.com/users/hhbyyh/received_events","type":"User","site_admin":false},"body":"## What changes were proposed in this pull request?\r\njira: https://issues.apache.org/jira/browse/SPARK-15938\r\n\r\n`Support` is an indication of how frequently the item-set appears in the database. Besides confidence, \"Support\" is another critical property for Association rule. \r\nReferences: \r\nhttps://en.wikipedia.org/wiki/Association_rule_learning\r\nhttp://www.philippe-fournier-viger.com/spmf/index.php?link=documentation.php#allassociationrules\r\nhttps://www-users.cs.umn.edu/~kumar/dmbook/ch6.pdf\r\n\r\n`Support` can be either the count of appearances or the fraction within the dataset. I choose to use the count as:\r\n1. API compatibility: Currently both FPGrowthModel and Association Rule does not have the information about size of the dataset. I'd try to avoid breaking a list of public APIs.\r\n2. This also refers to the API of SPMF. http://www.philippe-fournier-viger.com/spmf/index.php?link=documentation.php#allassociationrules.\r\n\r\nIn the next steps, we could add constraint like minSupport as in other libraries. FPGrowthModel should also contains the size of the dataset.\r\n\r\n\r\n## How was this patch tested?\r\nexisting ut. \r\n\r\n\r\n","created_at":"2016-06-14T07:23:53Z","updated_at":"2016-06-14T08:51:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"275639661b398a66499dda0a14a0381d8e505bd3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/13656/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/13656/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/13656/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/60efd0520a3af52995c2d6b1a2abaeebe658bb32","head":{"label":"hhbyyh:supportAsso","ref":"supportAsso","sha":"60efd0520a3af52995c2d6b1a2abaeebe658bb32","user":{"login":"hhbyyh","id":7981698,"avatar_url":"https://avatars.githubusercontent.com/u/7981698?v=3","gravatar_id":"","url":"https://api.github.com/users/hhbyyh","html_url":"https://github.com/hhbyyh","followers_url":"https://api.github.com/users/hhbyyh/followers","following_url":"https://api.github.com/users/hhbyyh/following{/other_user}","gists_url":"https://api.github.com/users/hhbyyh/gists{/gist_id}","starred_url":"https://api.github.com/users/hhbyyh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hhbyyh/subscriptions","organizations_url":"https://api.github.com/users/hhbyyh/orgs","repos_url":"https://api.github.com/users/hhbyyh/repos","events_url":"https://api.github.com/users/hhbyyh/events{/privacy}","received_events_url":"https://api.github.com/users/hhbyyh/received_events","type":"User","site_admin":false},"repo":{"id":29568485,"name":"spark","full_name":"hhbyyh/spark","owner":{"login":"hhbyyh","id":7981698,"avatar_url":"https://avatars.githubusercontent.com/u/7981698?v=3","gravatar_id":"","url":"https://api.github.com/users/hhbyyh","html_url":"https://github.com/hhbyyh","followers_url":"https://api.github.com/users/hhbyyh/followers","following_url":"https://api.github.com/users/hhbyyh/following{/other_user}","gists_url":"https://api.github.com/users/hhbyyh/gists{/gist_id}","starred_url":"https://api.github.com/users/hhbyyh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hhbyyh/subscriptions","organizations_url":"https://api.github.com/users/hhbyyh/orgs","repos_url":"https://api.github.com/users/hhbyyh/repos","events_url":"https://api.github.com/users/hhbyyh/events{/privacy}","received_events_url":"https://api.github.com/users/hhbyyh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hhbyyh/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/hhbyyh/spark","forks_url":"https://api.github.com/repos/hhbyyh/spark/forks","keys_url":"https://api.github.com/repos/hhbyyh/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hhbyyh/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hhbyyh/spark/teams","hooks_url":"https://api.github.com/repos/hhbyyh/spark/hooks","issue_events_url":"https://api.github.com/repos/hhbyyh/spark/issues/events{/number}","events_url":"https://api.github.com/repos/hhbyyh/spark/events","assignees_url":"https://api.github.com/repos/hhbyyh/spark/assignees{/user}","branches_url":"https://api.github.com/repos/hhbyyh/spark/branches{/branch}","tags_url":"https://api.github.com/repos/hhbyyh/spark/tags","blobs_url":"https://api.github.com/repos/hhbyyh/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hhbyyh/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hhbyyh/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/hhbyyh/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hhbyyh/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/hhbyyh/spark/languages","stargazers_url":"https://api.github.com/repos/hhbyyh/spark/stargazers","contributors_url":"https://api.github.com/repos/hhbyyh/spark/contributors","subscribers_url":"https://api.github.com/repos/hhbyyh/spark/subscribers","subscription_url":"https://api.github.com/repos/hhbyyh/spark/subscription","commits_url":"https://api.github.com/repos/hhbyyh/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/hhbyyh/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/hhbyyh/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/hhbyyh/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/hhbyyh/spark/contents/{+path}","compare_url":"https://api.github.com/repos/hhbyyh/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hhbyyh/spark/merges","archive_url":"https://api.github.com/repos/hhbyyh/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hhbyyh/spark/downloads","issues_url":"https://api.github.com/repos/hhbyyh/spark/issues{/number}","pulls_url":"https://api.github.com/repos/hhbyyh/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/hhbyyh/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/hhbyyh/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hhbyyh/spark/labels{/name}","releases_url":"https://api.github.com/repos/hhbyyh/spark/releases{/id}","deployments_url":"https://api.github.com/repos/hhbyyh/spark/deployments","created_at":"2015-01-21T03:08:12Z","updated_at":"2016-02-04T00:47:32Z","pushed_at":"2016-06-14T06:34:08Z","git_url":"git://github.com/hhbyyh/spark.git","ssh_url":"git@github.com:hhbyyh/spark.git","clone_url":"https://github.com/hhbyyh/spark.git","svn_url":"https://github.com/hhbyyh/spark","homepage":null,"size":170739,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"apache:master","ref":"master","sha":"688b6ef9dc0943d268fab7279ef50bfac1617f04","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":17165658,"name":"spark","full_name":"apache/spark","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/spark","description":"Mirror of Apache Spark","fork":false,"url":"https://api.github.com/repos/apache/spark","forks_url":"https://api.github.com/repos/apache/spark/forks","keys_url":"https://api.github.com/repos/apache/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/spark/teams","hooks_url":"https://api.github.com/repos/apache/spark/hooks","issue_events_url":"https://api.github.com/repos/apache/spark/issues/events{/number}","events_url":"https://api.github.com/repos/apache/spark/events","assignees_url":"https://api.github.com/repos/apache/spark/assignees{/user}","branches_url":"https://api.github.com/repos/apache/spark/branches{/branch}","tags_url":"https://api.github.com/repos/apache/spark/tags","blobs_url":"https://api.github.com/repos/apache/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/spark/languages","stargazers_url":"https://api.github.com/repos/apache/spark/stargazers","contributors_url":"https://api.github.com/repos/apache/spark/contributors","subscribers_url":"https://api.github.com/repos/apache/spark/subscribers","subscription_url":"https://api.github.com/repos/apache/spark/subscription","commits_url":"https://api.github.com/repos/apache/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/spark/contents/{+path}","compare_url":"https://api.github.com/repos/apache/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/spark/merges","archive_url":"https://api.github.com/repos/apache/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/spark/downloads","issues_url":"https://api.github.com/repos/apache/spark/issues{/number}","pulls_url":"https://api.github.com/repos/apache/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/spark/labels{/name}","releases_url":"https://api.github.com/repos/apache/spark/releases{/id}","deployments_url":"https://api.github.com/repos/apache/spark/deployments","created_at":"2014-02-25T08:00:08Z","updated_at":"2016-06-14T08:48:58Z","pushed_at":"2016-06-14T08:48:37Z","git_url":"git://github.com/apache/spark.git","ssh_url":"git@github.com:apache/spark.git","clone_url":"https://github.com/apache/spark.git","svn_url":"https://github.com/apache/spark","homepage":null,"size":495032,"stargazers_count":8905,"watchers_count":8905,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8271,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":440,"forks":8271,"open_issues":440,"watchers":8905,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/13656"},"html":{"href":"https://github.com/apache/spark/pull/13656"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/13656"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/13656/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/13656/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/13656/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/60efd0520a3af52995c2d6b1a2abaeebe658bb32"}}}}
{"actor":{"display_login":"hhbyyh"}}