spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kai Sasaki (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-11439) Optimization of creating sparse feature without dense one
Date Fri, 13 Nov 2015 01:48:11 GMT

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

Kai Sasaki commented on SPARK-11439:
------------------------------------

[~nakul02]
It seems to indicate the model in SparkR here. According to this documentation, you can create
SparkR linear model with `glm`.
https://spark.apache.org/docs/latest/sparkr.html#machine-learning

This will call {{SparkRWrapper#fitRModelFormula}. It returns LinearRegressionModel with Pipeline
when it receives "gaussian" as second parameter.
So in summary we can write the code like this to use {{LinearRegressionModel}} in SparkR.
{code}
df <- createDataFrame(sqlContext, iris)
fit <- glm(Sepal_Length ~ Sepal_Width + Species, data = df, family = "gaussian")
summary(fit)
{code}

In my environment, it seems to work.

> Optimization of creating sparse feature without dense one
> ---------------------------------------------------------
>
>                 Key: SPARK-11439
>                 URL: https://issues.apache.org/jira/browse/SPARK-11439
>             Project: Spark
>          Issue Type: Improvement
>          Components: ML
>            Reporter: Kai Sasaki
>            Priority: Minor
>
> Currently, sparse feature generated in {{LinearDataGenerator}} needs to create dense
vectors once. It is cost efficient to prevent from generating dense feature when creating
sparse features.



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


Mime
View raw message