Question: def sweep _ louvain _ resolutions ( G: nx . Graph, min _ resolution: int = 1 , max _ resolution: int = 1 0

def sweep_louvain_resolutions(G: nx.Graph, min_resolution: int=1, max_resolution: int=10)-> Tuple[List[int], List[float]]:
"""
Inputs:
G: NetworkX graph object
min_resolution : integer
max_resolution : integer
Returns:
Tuple of list of resolutions and list of NMIs
"""
return resolutions, nmis
def plot_nmi_vs_resolution(resolutions: List[int], nmis: List[float], save: bool=False)-> None:
"""
Inputs:
min_resolution : integer
max_resolution : integer
save: boolean
Returns:
None
"""
if save:
plt.savefig('1_2_1.png')
plt.show()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!