You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2016/01/11 20:45:39 UTC

[jira] [Assigned] (SPARK-12732) Fix LinearRegression.train for the case when label is constant and fitIntercept=false

     [ https://issues.apache.org/jira/browse/SPARK-12732?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Apache Spark reassigned SPARK-12732:
------------------------------------

    Assignee: Apache Spark

> Fix LinearRegression.train for the case when label is constant and fitIntercept=false
> -------------------------------------------------------------------------------------
>
>                 Key: SPARK-12732
>                 URL: https://issues.apache.org/jira/browse/SPARK-12732
>             Project: Spark
>          Issue Type: Bug
>          Components: MLlib
>            Reporter: Imran Younus
>            Assignee: Apache Spark
>            Priority: Minor
>
> If the target variable is constant, then the linear regression must check if the fitIntercept is true or false, and handle these two cases separately.
> If the fitIntercept is true, then there is no training needed and we set the intercept equal to the mean of y.
> But if the fit intercept is false, then the model should still train.
> Currently, LinearRegression handles both cases in the same way. It doesn't train the model and sets the intercept equal to the mean of y. Which, means that it returns a non-zero intercept even when the user forces the regression through the origin.



--
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