Github user sethah commented on a diff in the pull request:
https://github.com/apache/spark/pull/15721#discussion_r93481882
--- Diff:
mllib/src/test/scala/org/apache/spark/ml/regression/LinearRegressionSuite.scala
---
@@ -47,6 +49,11 @@ class LinearRegressionSuite
datasetWithDenseFeature =
sc.parallelize(LinearDataGenerator.generateLinearInput(
intercept = 6.3, weights = Array(4.7, 7.2), xMean = Array(0.9, -1.3),
xVariance = Array(0.7, 1.2), nPoints = 10000, seed, eps = 0.1),
2).map(_.asML).toDF()
+
+ weightedDatasetWithDenseFeature =
sc.parallelize(LinearDataGenerator.generateLinearInput(
--- End diff --
I added this small dataset with a higher noise value for weighted testing.
It's necessary because when we test oversampling vs weighting, we need the
noise to be high enough that the model learns incorrect coefficients when the
weights are not applied. The coefficients used to generate each point are the
same, but some points are emphasized more with weights. This dataset needs to
be small enough and have enough noise that it doesn't still learn the true
coefficients when the weights are not applied, if that makes sense.
---
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]