V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
willnill
V2EX  ›  问与答

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

  •  
  •   willnill · 2018-04-09 16:04:30 +08:00 · 974 次点击
    这是一个创建于 2215 天前的主题,其中的信息可能已经有所发展或是发生改变。
    现有 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)
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2241 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 03:46 · PVG 11:46 · LAX 20:46 · JFK 23:46
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.