Github user thvasilo commented on a diff in the pull request: https://github.com/apache/flink/pull/1587#discussion_r51909968 --- Diff: flink-libraries/flink-ml/src/test/scala/org/apache/flink/ml/regression/RegressionData.scala --- @@ -27,6 +27,21 @@ object RegressionData { val expectedWeight0: Double = 9.8158 val expectedSquaredResidualSum: Double = 49.7596/2 + val sparseData: Seq[LabeledVector] = Seq( + new LabeledVector(1.0, new SparseVector(10, Array(0, 2, 3), Array(1.0, 1.0, 1.0))), + new LabeledVector(1.0, new SparseVector(10, Array(0, 1, 5, 9), Array(1.0, 1.0, 1.0, 1.0))), + new LabeledVector(0.0, new SparseVector(10, Array(0, 2), Array(0.0, 1.0))), + new LabeledVector(0.0, new SparseVector(10, Array(0), Array(0.0))), + new LabeledVector(0.0, new SparseVector(10, Array(0, 2), Array(0.0, 1.0))), + new LabeledVector(0.0, new SparseVector(10, Array(0), Array(0.0)))) + + val expectedWeightsSparseInput = Array(0.5448906338353784, 0.15718880164669916, + 0.034001300318125725, 0.38770183218867915, 0.0, + 0.15718880164669916, 0.0, 0.0, 0.0, 0.15718880164669916) --- End diff -- Indentation seems a bit off here.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---