Re: SparkR -Graphx Connected components

2015-08-11 Thread Robineast
To be part of a strongly connected component every vertex must be reachable
from every other vertex. Vertex 6 is not reachable from the other components
of scc 0. Same goes for 7. So both 6 and 7 form their own strongly connected
components. 6 and 7 are part of the connected components of 0 and 3
respectively.



--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/SparkR-Graphx-Connected-components-tp24165p24209.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org



Re: SparkR -Graphx Connected components

2015-08-10 Thread smagadi
Thanks for the response Robin
is this the same for both Directed and undirected graphs ?
val edges =
Array(0L - 1L, 1L - 2L, 2L - 0L) ++
Array(3L - 4L, 4L - 5L, 5L - 3L) ++
Array(6L - 0L, 5L - 7L)
  val rawEdges = sc.parallelize(edges)
  val graph = Graph.fromEdgeTuples(rawEdges, -1)
  val sccGraph = graph.stronglyConnectedComponents(20)
  for ((id, scc) - sccGraph.vertices.collect()) {
   println(id,scc)
   }
The answer it gave is .Any thoughts here please .
(4,3) -OK
(0,0)-OK
(1,0)-OK
(6,6)-This shd have been 6,0
(3,3)-OK
(7,7)-This shd have been 7,3 
(5,3)-OK
(2,0)-OK




--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/SparkR-Graphx-Connected-components-tp24165p24190.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org



Re: SparkR -Graphx Connected components

2015-08-07 Thread Robineast
Hi

The graph returned by SCC (strong_graphs in your code) has vertex data where
each vertex in a component is assigned the lowest vertex id of the
component. So if you have 6 vertices (1 to 6) and 2 strongly connected
components (1 and 3, and 2,4,5 and 6) then the strongly connected components
are 1 and 2 (the lowest vertices in each component). So vertices 1 and 3
will have vertex data = 1 and vertices 2,4,5 and 6 will have vertex data 2.

Robin
---
Robin East
Spark GraphX in Action Michael Malak and Robin East
Manning Publications Co.
http://www.manning.com/malak/ http://www.manning.com/malak/  



--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/SparkR-Graphx-Connected-components-tp24165p24166.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org



Re: SparkR -Graphx

2015-08-06 Thread Shivaram Venkataraman
+Xiangrui

I am not sure exposing the entire GraphX API would make sense as it
contains a lot of low level functions. However we could expose some
high level functions like PageRank etc. Xiangrui, who has been working
on similar techniques to expose MLLib functions like GLM might have
more to add.

Thanks
Shivaram

On Thu, Aug 6, 2015 at 6:21 AM, smagadi sudhindramag...@fico.com wrote:
 Wanted to use the GRaphX from SparkR , is there a way to do it ?.I think as
 of now it is not possible.I was thinking if one can write a wrapper in R
 that can call Scala Graphx libraries .
 Any thought on this please.



 --
 View this message in context: 
 http://apache-spark-user-list.1001560.n3.nabble.com/SparkR-Graphx-tp24152.html
 Sent from the Apache Spark User List mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
 For additional commands, e-mail: user-h...@spark.apache.org


-
To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org