spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Ray (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-8853) FPGrowth is not Java-Friendly
Date Tue, 10 Jan 2017 20:19:58 GMT

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

Andrew Ray commented on SPARK-8853:
-----------------------------------

But there is no reason to directly create a {{FPGrowthModel}}, proper usage is something like:
{code}
    FPGrowthModel<String> model = new FPGrowth()
      .setMinSupport(0.5)
      .setNumPartitions(2)
      .run(rdd);
{code}

> FPGrowth is not Java-Friendly
> -----------------------------
>
>                 Key: SPARK-8853
>                 URL: https://issues.apache.org/jira/browse/SPARK-8853
>             Project: Spark
>          Issue Type: Improvement
>          Components: MLlib
>            Reporter: Feynman Liang
>
> {{FPGrowth[Item : ClassTag]}} has a public constructor but uses a parameterized type
with a context bound {{ClassTag}}, making it difficult to instantiate in Java.
> For example, to instantiate one needs to do
> {code:title=Foobar.java|borderStyle=solid}
> import scala.reflect.ClassTag;
> ClassTag<String> tag = scala.reflect.ClassTag$.MODULE$.apply(String.class)
> FPGrowthModel<String> model = new FPGrowthModel<String>(rdd, 35L, tag);
> {code}



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