[
https://issues.apache.org/jira/browse/SPARK-9005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14626815#comment-14626815
]
Ayman Farahat commented on SPARK-9005:
--------------------------------------
I compared the R2 and RMSE after fitting an ALS model . here are the results
rank 40 r2 = 0.993274964231 explained var = 0.993566133802 count =
94652197 meanres -0.0606718131255 meanres2 0.085020285731
rank 50 r2 = 0.993547408858 explained var = 0.993826795105 count =
94652197 meanres -0.0594314727572 meanres2 0.081575944201
> RegressionMetrics computing incorrect explainedVariance and r2
> --------------------------------------------------------------
>
> Key: SPARK-9005
> URL: https://issues.apache.org/jira/browse/SPARK-9005
> Project: Spark
> Issue Type: Bug
> Components: MLlib
> Reporter: Feynman Liang
> Assignee: Feynman Liang
>
> {{RegressionMetrics}} currently computes explainedVariance using
> {{summary.variance(1)}} (variance of the residuals) where the [Wikipedia
> definition|https://en.wikipedia.org/wiki/Fraction_of_variance_unexplained]
> uses the residual sum of squares {{math.pow(summary.normL2(1), 2)}}. The two
> coincide only when the predictor is unbiased (e.g. an intercept term is
> included in a linear model), but this is not always the case. We should
> change to be consistent.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]