You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Felix Cheung (JIRA)" <ji...@apache.org> on 2016/11/23 19:47:58 UTC

[jira] [Updated] (SPARK-18569) Support R formula arithmetic

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

Felix Cheung updated SPARK-18569:
---------------------------------
    Description: 
I think we should support arithmetic which makes it a lot more convenient to build model. Something like

{code}
  log(y) ~ a + log(x)
{code}

And to avoid resolution confusions we should support the I() operator:

{code}
I
 I(X∗Z) as is: include a new variable consisting of these variables multiplied
{code}

Such that this works:

{code}
y ~ a + I(b+c)
{code}

the term b+c is to be interpreted as the sum of b and c.


  was:
I think we should support arithmetic which makes it a lot more convenient to build model. Something like

{code}
  log(y) ~ a + log(x)
{code}

And to avoid resolution confusions we should support the I() operator:

I
 I(X∗Z) as is: include a new variable consisting of these variables multiplied

Such that this works:

{code}
y ~ a + I(b+c)
{code}

the term b+c is to be interpreted as the sum of b and c.



> Support R formula arithmetic 
> -----------------------------
>
>                 Key: SPARK-18569
>                 URL: https://issues.apache.org/jira/browse/SPARK-18569
>             Project: Spark
>          Issue Type: Sub-task
>          Components: ML, SparkR
>            Reporter: Felix Cheung
>
> I think we should support arithmetic which makes it a lot more convenient to build model. Something like
> {code}
>   log(y) ~ a + log(x)
> {code}
> And to avoid resolution confusions we should support the I() operator:
> {code}
> I
>  I(X∗Z) as is: include a new variable consisting of these variables multiplied
> {code}
> Such that this works:
> {code}
> y ~ a + I(b+c)
> {code}
> the term b+c is to be interpreted as the sum of b and c.



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