求助 Spark 问题,弄了一天了!!!!

2018-04-09 16:04:30 +08:00
 willnill
现有 dataDF 结构如下:
root
|-- asin: string (nullable = true)
|-- topic: array (nullable = true)
| |-- element: double (containsNull = true)

| t1 | t2 | t3 |
a1 | d11 | d12 | d13 |
a2 | d21 | d22 | d23 |
a3 | d31 | d32 | d33 |

请问怎么用 Statistics.corr 方法来计算两两的相似度,从而得到如下结构的 DF:
case class Corr(asin1: String, asin2: String, corr: Double)
984 次点击
所在节点    问与答
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/445392

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX