Github user iyounus commented on the pull request:
https://github.com/apache/spark/pull/10702#issuecomment-178134675
For the case (3), I'm assuming that the label and features are not
standardized. So, in that case, the solution exists. Here is my perspective on
this.
The normal equation `X^T X \beta = X^T y` has a unique solution if matrix
`X` is full rank. If its not full rank, the `X^T X` becomes singular and hence
not invertible. With regularization, the equation `(X^T X + \lambda I) \beta =
X^T y` still has unique solution if the matrix `(X^T X + \lambda I)` is
invertible. This is true even if elements of `y` are constant. For the sample
data I'm using above, I can solve this equation by hand and obtain `\beta`
(with and without intercept). If I'm using any software, it must reproduce
these results. Note that standardization is completely independent operation.
Its not part of normal equation. So, if the user demands no standardization,
then the any software should produce the analytical solution.
---
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]