You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Sean Owen (JIRA)" <ji...@apache.org> on 2016/09/20 21:54:20 UTC

[jira] [Comment Edited] (SPARK-11918) WLS can not resolve some kinds of equation

    [ https://issues.apache.org/jira/browse/SPARK-11918?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15021787#comment-15021787 ] 

Sean Owen edited comment on SPARK-11918 at 9/20/16 9:54 PM:
------------------------------------------------------------

[~yanboliang] yes this is true in general of ill-conditioned problems. What are you proposing? to propagate the error from lapack in a different way? check the condition number? it's roughly speaking the correct behavior in that there's no real answer here.

EDIT to my old comment: I don't think that's accurate. It's possible to return a 'best' answer in at least some cases that would trigger this problem, like two identical features.


was (Author: srowen):
[~yanboliang] yes this is true in general of ill-conditioned problems. What are you proposing? to propagate the error from lapack in a different way? check the condition number? it's roughly speaking the correct behavior in that there's no real answer here.

> WLS can not resolve some kinds of equation
> ------------------------------------------
>
>                 Key: SPARK-11918
>                 URL: https://issues.apache.org/jira/browse/SPARK-11918
>             Project: Spark
>          Issue Type: Improvement
>          Components: ML
>            Reporter: Yanbo Liang
>            Priority: Minor
>              Labels: starter
>         Attachments: R_GLM_output
>
>
> Weighted Least Squares (WLS) is one of the optimization method for solve Linear Regression (when #feature < 4096). But if the dataset is very ill condition (such as 0-1 based label used for classification and the equation is underdetermined), the WLS failed (But "l-bfgs" can train and get the model). The failure is caused by the underneath lapack library return error value when Cholesky decomposition.
> This issue is easy to reproduce, you can train a LinearRegressionModel by "normal" solver with the example dataset(https://github.com/apache/spark/blob/master/data/mllib/sample_libsvm_data.txt). The following is the exception:
> {code}
> assertion failed: lapack.dpotrs returned 1.
> java.lang.AssertionError: assertion failed: lapack.dpotrs returned 1.
> 	at scala.Predef$.assert(Predef.scala:179)
> 	at org.apache.spark.mllib.linalg.CholeskyDecomposition$.solve(CholeskyDecomposition.scala:42)
> 	at org.apache.spark.ml.optim.WeightedLeastSquares.fit(WeightedLeastSquares.scala:117)
> 	at org.apache.spark.ml.regression.LinearRegression.train(LinearRegression.scala:180)
> 	at org.apache.spark.ml.regression.LinearRegression.train(LinearRegression.scala:67)
> 	at org.apache.spark.ml.Predictor.fit(Predictor.scala:90)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org