Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UMSTMO Main method #1

Open
jenanMoosa opened this issue Feb 27, 2021 · 9 comments
Open

UMSTMO Main method #1

jenanMoosa opened this issue Feb 27, 2021 · 9 comments

Comments

@jenanMoosa
Copy link

thank you for the great code, wanted to ask about main and how to add my own datasets?

@khawka
Copy link
Owner

khawka commented Feb 27, 2021 via email

@jenanMoosa
Copy link
Author

hi, thank you for your response
are you interested in working on a research paper?

@khawka
Copy link
Owner

khawka commented Mar 19, 2021 via email

@jenanMoosa
Copy link
Author

jenanMoosa commented Mar 19, 2021 via email

@khawka
Copy link
Owner

khawka commented Mar 23, 2021 via email

@jenanMoosa
Copy link
Author

unfortunately the email is hidden
please take it from my profile
it is jenan . moosa gmail

@rishi6789
Copy link

network.txt file pls share

@rishi6789
Copy link

Not able to understand this piece of code please help

if len(b)==1 :
if not k in up :
c.append([b[0]])
#print(b[0])
#up.append(k)
up.append(b[0])
for k2 in c:
if len(k2) >0:
k2.append(k)
k2.sort()
if not k2 in re:
re.append(k2)
#ll.remove(k)
for ll2 in k2:
up.append(ll2)
sup=list(set(G.nodes())-set(up))
#sup1=list(set(G.nodes())-set(G3.nodes()))
##print('sup', sup)
#print('nodes',G3.nodes())
re.sort(key=len,reverse=True)

#print('re',re)
res=re

r=0

#tr=G.nodes()
#G.clear()

   
print('assign nodes without local communities to the suitable group')
for k in sup:
        #print(k)
        #G3.neighbors(k)
        max=0
        ne=G.neighbors(k)
        #print(ne)
        i=0
        while i <len(res):
            aa=len(set(ne).intersection(res[i]))
           
            if aa>=max:
                max=aa
                temp=i
                if (aa)>len(ne)-aa:
                   
                    i=len(res)
            i=i+1
        if max>0:
            res[temp].append(k)
        else:
            res.append([k])

@khawka
Copy link
Owner

khawka commented Oct 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants