Adding multiple values to the same label of a vertex in SGraph.addvertices

User 3091 | 1/21/2016, 6:58:39 AM

Q1. I have been trying to add vertices directly and not through SFrame to SGraph.addvertices(). I would like to know if adding multiple values to the same label is possible i.e., labelx should have multiple values 1 and 0

verts = [Vertex('H',attr={'labelx': [1,0]})]

g= g.add_vertices(verts)

Any hints on other ways of updating vertex label are welcome.

Q2. I am trying to add multiple label values to the vertex and construct the SGraph with the aim of doing labelpropagation when each vertex can have multiple label values. Does labelpropagation support multilable labelpropagation

Comments

User 16 | 1/25/2016, 9:25:50 PM

Hi Viva -

Q1 - It's not possible for a single label to have more than one value for a single vertex.

Q2 - Since this isn't even supported in the vertex data structure, it's not going to be supported in our label propagation algorithm.

You might want to consider trying one hot encoding. Essentially, do some preprocessing to create a new labels for each possible label and label value combination.

Hope that helps. Toby