Created
December 1, 2018 20:09
-
-
Save yashgyy/90fa1cdf19808c6a331ceac4a01e027a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
from itertools import combinations | |
Mutate=[] | |
for Value1,Value2 in list(combinations(Listing),r=2): | |
nums=numpy.random.choice([0,1],size=34) | |
Tupple=[Value1[i] if nums[i]==0 else Value2[i] for i in range(len(nums))] | |
Mutate.append(Tupple) | |
Listing2=[] | |
for j in Mutate: | |
for key,value in j.items(): | |
Listing2.append((community.best_partition(key),community.modularity(communities1,key))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment