You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Joseph K. Bradley (JIRA)" <ji...@apache.org> on 2017/02/08 18:42:41 UTC

[jira] [Assigned] (SPARK-19400) GLM fails for intercept only model

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

Joseph K. Bradley reassigned SPARK-19400:
-----------------------------------------

    Assignee: Wayne Zhang

> GLM fails for intercept only model
> ----------------------------------
>
>                 Key: SPARK-19400
>                 URL: https://issues.apache.org/jira/browse/SPARK-19400
>             Project: Spark
>          Issue Type: Bug
>          Components: ML
>            Reporter: Wayne Zhang
>            Assignee: Wayne Zhang
>             Fix For: 2.2.0
>
>
> Intercept-only GLM fails for non-Gaussian family because of reducing an empty array in IWLS. 
> {code}
> val dataset = Seq(
>           (1.0, 1.0, 2.0, 0.0, 5.0),
>           (0.5, 2.0, 1.0, 1.0, 2.0),
>           (1.0, 3.0, 0.5, 2.0, 1.0),
>           (2.0, 4.0, 1.5, 3.0, 3.0)
>         ).toDF("y", "w", "off", "x1", "x2")
> val formula = new RFormula().setFormula("y ~ 1")
> val output = formula.fit(dataset).transform(dataset)
> val glr = new GeneralizedLinearRegression().setFamily("poisson")
> val model = glr.fit(output)
> java.lang.UnsupportedOperationException: empty.reduceLeft
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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