spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nick Pentreath (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SPARK-19940) FPGrowthModel.transform should skip duplicated items
Date Tue, 16 May 2017 09:54:04 GMT

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

Nick Pentreath updated SPARK-19940:
-----------------------------------
    Description: 
Due to misplaced {{distinct}} {{FPGrowthModel.transform}} generates duplicated items in the
"prediction":

{code}
scala> val data = spark.read.text("data/mllib/sample_fpgrowth.txt").select(split($"value",
"\\s+").alias("features")) 
data: org.apache.spark.sql.DataFrame = [features: array<string>]

scala> val data = spark.read.text("data/mllib/sample_fpgrowth.txt").select(split($"value",
"\\s+").alias("features")) 
data: org.apache.spark.sql.DataFrame = [features: array<string>]

scala> fpm.transform(Seq(Array("t", "s")).toDF("features")).show(1, false)
+--------+---------------------+
|features|prediction           |
+--------+---------------------+
|[t, s]  |[y, x, z, x, y, x, z]|
+--------+---------------------+

{code}

  was:
Due to misplaced {{distinct}} {{FPGrowthModel.transform} generates duplicated items in the
"prediction":

{code}
scala> val data = spark.read.text("data/mllib/sample_fpgrowth.txt").select(split($"value",
"\\s+").alias("features")) 
data: org.apache.spark.sql.DataFrame = [features: array<string>]

scala> val data = spark.read.text("data/mllib/sample_fpgrowth.txt").select(split($"value",
"\\s+").alias("features")) 
data: org.apache.spark.sql.DataFrame = [features: array<string>]

scala> fpm.transform(Seq(Array("t", "s")).toDF("features")).show(1, false)
+--------+---------------------+
|features|prediction           |
+--------+---------------------+
|[t, s]  |[y, x, z, x, y, x, z]|
+--------+---------------------+

{code}


> FPGrowthModel.transform should skip duplicated items
> ----------------------------------------------------
>
>                 Key: SPARK-19940
>                 URL: https://issues.apache.org/jira/browse/SPARK-19940
>             Project: Spark
>          Issue Type: Bug
>          Components: ML
>    Affects Versions: 2.2.0
>            Reporter: Maciej Szymkiewicz
>            Assignee: Maciej Szymkiewicz
>            Priority: Minor
>             Fix For: 2.2.0
>
>
> Due to misplaced {{distinct}} {{FPGrowthModel.transform}} generates duplicated items
in the "prediction":
> {code}
> scala> val data = spark.read.text("data/mllib/sample_fpgrowth.txt").select(split($"value",
"\\s+").alias("features")) 
> data: org.apache.spark.sql.DataFrame = [features: array<string>]
> scala> val data = spark.read.text("data/mllib/sample_fpgrowth.txt").select(split($"value",
"\\s+").alias("features")) 
> data: org.apache.spark.sql.DataFrame = [features: array<string>]
> scala> fpm.transform(Seq(Array("t", "s")).toDF("features")).show(1, false)
> +--------+---------------------+
> |features|prediction           |
> +--------+---------------------+
> |[t, s]  |[y, x, z, x, y, x, z]|
> +--------+---------------------+
> {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


Mime
View raw message