Github user dbtsai commented on a diff in the pull request:
https://github.com/apache/spark/pull/9180#discussion_r43419153
--- Diff:
mllib/src/main/scala/org/apache/spark/mllib/util/LinearDataGenerator.scala ---
@@ -112,8 +139,13 @@ object LinearDataGenerator {
x.foreach { v =>
var i = 0
val len = v.length
+ val sparceRnd = new Random(seed)
--- End diff --
Since you seed `rnd` and `sparceRnd` with the same seed, both of them will
generate the same sequence of random numbers which is not what you want. You
should be able to use the same random number generator which will give you
uncorrelated random numbers in both creating the features and choice which
columns to zero out.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]