6d3e4bdc22cc89fb7ecf188ccf0479632012026f,deeppavlov/models/evolution/check_binary_mask.py,,get_graph_and_plot,#Any#Any#Any#Any#,97

Before Change


    dg = nx.DiGraph()

    for i in range(total_nodes):
        dg.add_node(i)

    pos = {}

    for i in range(total_nodes):

After Change


    dg = get_digraph_from_binary_mask(nodes, binary_mask)

    pos = {}
    val_map = {}
    sources, sinks = find_sources_and_sinks(dg)

    for i in range(total_nodes):
        pos[i] = 2. * np.array(number_to_type_layer(i, n_types))[::-1]
        if i in sources:
            val_map[i] = 1.
        elif i in sinks:
            val_map[i] = 0.5
        else:
            val_map[i] = 0.

    plt.figure(figsize=(12, 12))
    values = [val_map.get(node, 0.25) for node in nodes]

    nx.draw(dg, pos, cmap=plt.get_cmap("jet"), node_color=values, node_size=7000, alpha=0.3)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: deepmipt/DeepPavlov
Commit Name: 6d3e4bdc22cc89fb7ecf188ccf0479632012026f
Time: 2018-04-18
Author: dilyara.rimovna@gmail.com
File Name: deeppavlov/models/evolution/check_binary_mask.py
Class Name:
Method Name: get_graph_and_plot


Project Name: pgmpy/pgmpy
Commit Name: c77025f3e13183782d19e0ff578df40cfc4c2d45
Time: 2014-05-16
Author: ankurankan@gmail.com
File Name: pgmpy/readwrite/ProbModelXML.py
Class Name: ProbModelXMLReader
Method Name: add_node


Project Name: deepmipt/DeepPavlov
Commit Name: 4fca544205a55010e8959bb760aece5be80dc3a5
Time: 2018-06-26
Author: dilyara.rimovna@gmail.com
File Name: deeppavlov/models/evolution/check_binary_mask.py
Class Name:
Method Name: get_graph_and_plot