{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/19026","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/19026/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/19026/comments","events_url":"https://api.github.com/repos/apache/spark/issues/19026/events","html_url":"https://github.com/apache/spark/pull/19026","id":252179070,"number":19026,"title":"[SPARK-21681][ML] fix bug of MLOR do not work correctly when featureStd contains zero (backport PR for 2.2)","user":{"login":"WeichenXu123","id":19235986,"avatar_url":"https://avatars0.githubusercontent.com/u/19235986?v=4","gravatar_id":"","url":"https://api.github.com/users/WeichenXu123","html_url":"https://github.com/WeichenXu123","followers_url":"https://api.github.com/users/WeichenXu123/followers","following_url":"https://api.github.com/users/WeichenXu123/following{/other_user}","gists_url":"https://api.github.com/users/WeichenXu123/gists{/gist_id}","starred_url":"https://api.github.com/users/WeichenXu123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WeichenXu123/subscriptions","organizations_url":"https://api.github.com/users/WeichenXu123/orgs","repos_url":"https://api.github.com/users/WeichenXu123/repos","events_url":"https://api.github.com/users/WeichenXu123/events{/privacy}","received_events_url":"https://api.github.com/users/WeichenXu123/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-08-23T06:55:07Z","updated_at":"2017-08-23T08:50:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/19026","html_url":"https://github.com/apache/spark/pull/19026","diff_url":"https://github.com/apache/spark/pull/19026.diff","patch_url":"https://github.com/apache/spark/pull/19026.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nThis is backport PR of https://github.com/apache/spark/pull/18896\r\n\r\nfix bug of MLOR do not work correctly when featureStd contains zero\t\r\n\r\nWe can reproduce the bug through such dataset (features including zero variance), will generate wrong result (all coefficients becomes 0)\r\n```\r\n    val multinomialDatasetWithZeroVar = {\r\n      val nPoints = 100\r\n      val coefficients = Array(\r\n        -0.57997, 0.912083, -0.371077,\r\n        -0.16624, -0.84355, -0.048509)\r\n\r\n      val xMean = Array(5.843, 3.0)\r\n      val xVariance = Array(0.6856, 0.0)  // including zero variance\r\n\r\n      val testData = generateMultinomialLogisticInput(\r\n        coefficients, xMean, xVariance, addIntercept = true, nPoints, seed)\r\n\r\n      val df = sc.parallelize(testData, 4).toDF().withColumn(\"weight\", lit(1.0))\r\n      df.cache()\r\n      df\r\n    }\r\n```\r\n## How was this patch tested?\r\n\r\ntestcase added."},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/324264895","html_url":"https://github.com/apache/spark/pull/19026#issuecomment-324264895","issue_url":"https://api.github.com/repos/apache/spark/issues/19026","id":324264895,"user":{"login":"SparkQA","id":8108735,"avatar_url":"https://avatars1.githubusercontent.com/u/8108735?v=4","gravatar_id":"","url":"https://api.github.com/users/SparkQA","html_url":"https://github.com/SparkQA","followers_url":"https://api.github.com/users/SparkQA/followers","following_url":"https://api.github.com/users/SparkQA/following{/other_user}","gists_url":"https://api.github.com/users/SparkQA/gists{/gist_id}","starred_url":"https://api.github.com/users/SparkQA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SparkQA/subscriptions","organizations_url":"https://api.github.com/users/SparkQA/orgs","repos_url":"https://api.github.com/users/SparkQA/repos","events_url":"https://api.github.com/users/SparkQA/events{/privacy}","received_events_url":"https://api.github.com/users/SparkQA/received_events","type":"User","site_admin":false},"created_at":"2017-08-23T08:50:57Z","updated_at":"2017-08-23T08:50:57Z","body":"**[Test build #81026 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/81026/testReport)** for PR 19026 at commit [`4221fc6`](https://github.com/apache/spark/commit/4221fc626e3ae63170f2a32241e41893df6a9cfa).\n * This patch passes all tests.\n * This patch merges cleanly.\n * This patch adds no public classes."}}
{"actor":{"display_login":"SparkQA"}}