You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
where $\lambda$ is the regularization parameter, $\delta$ is the population standard deviation of the label
65
65
and $\sigma_j$ is the population standard deviation of the j-th feature column.
66
66
67
-
This objective function has an analytic solution and it requires only one pass over the data to collect necessary statistics to solve.
68
-
Unlike the original dataset which can only be stored in a distributed system,
69
-
these statistics can be loaded into memory on a single machine if the number of features is relatively small, and then we can solve the objective function through Cholesky factorization on the driver.
67
+
This objective function has an analytic solution and it requires only one pass over the data to collect necessary statistics to solve. For an
68
+
$n \times m$ data matrix, these statistics require only $O(m^2)$ storage and so can be stored on a single machine when $n$ (the number of features) is
69
+
relatively small. We can then solve the normal equations on a single machine using local methods like direct Cholesky factorization or iterative optimization programs.
70
70
71
-
WeightedLeastSquares only supports L2 regularization and provides options to enable or disable regularization and standardization.
72
-
In order to make the normal equation approach efficient, WeightedLeastSquares requires that the number of features be no more than 4096. For larger problems, use L-BFGS instead.
71
+
Spark ML currently supports two types of solvers for the normal equations: Cholesky factorization and Quasi-Newton methods (L-BFGS/OWL-QN). Cholesky factorization
72
+
depends on a positive definite covariance matrix (e.g. columns of the data matrix must be linearly independent) and will fail if this condition is violated. Quasi-Newton methods
73
+
are still capable of providing a reasonable solution even when the covariance matrix is not positive definite, so the normal equation solver can also fall back to
74
+
Quasi-Newton methods in this case. This fallback is currently always enabled for the `LinearRegression` estimator.
75
+
76
+
`WeightedLeastSquares` supports L1, L2, and elastic-net regularization and provides options to enable or disable regularization and standardization.
77
+
In order to make the normal equation approach efficient, `WeightedLeastSquares` requires that the number of features be no more than 4096. For larger problems, use L-BFGS instead.
73
78
74
79
## Iteratively reweighted least squares (IRLS)
75
80
@@ -83,6 +88,6 @@ It solves certain optimization problems iteratively through the following proced
83
88
* solve a weighted least squares (WLS) problem by WeightedLeastSquares.
84
89
* repeat above steps until convergence.
85
90
86
-
Since it involves solving a weighted least squares (WLS) problem by WeightedLeastSquares in each iteration,
91
+
Since it involves solving a weighted least squares (WLS) problem by `WeightedLeastSquares` in each iteration,
87
92
it also requires the number of features to be no more than 4096.
88
93
Currently IRLS is used as the default solver of [GeneralizedLinearRegression](api/scala/index.html#org.apache.spark.ml.regression.GeneralizedLinearRegression).
0 commit comments