Last active
April 25, 2017 09:13
-
-
Save TomLous/5ac87182af917a825d62b903a5a80d31 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// edges are given the probabilty of the correctness of the edge | |
val edges: RDD[Edge[Double]] = predictedLinksDataset.rdd.map( | |
l => Edge(l.dossierNummer_left.toLong, l.dossierNummer_right.toLong, l.probability)) | |
// vertices are just tuples of the dossiernummer.toLong (VertexId is typed as Long) | |
val vertices: RDD[(VertexId, KvKRecord)] = predictedLinksDataset.rdd.map( | |
k => (k.dossierNummer.toLong, k)) | |
// the graph | |
val linkedGraph = Graph(vertices, edges) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment