Exemple #1
0
def visualize_agr():
    """
    Visualize the agreement matrix.

    """
    write_json_graph(weights_matrix=agreement_matrix,\
                     thres=0.9,\
                     rescale=lambda x: x,\
                     graph_mps=nnc_mps,\
                     mps=mps,\
                     filename= "viz/agr/graph.json")
Exemple #2
0
def visualize_nnc():
    """

    Visualize the NNC graph.

    As usual, the filename reflects the method used for the adjacency matrix.

    """
    adj_matrix = top_k(nnc_k, nnc_mps, nnc_internal, agreement_matrix, nnc_arbit, mps)
    write_json_graph(weights_matrix=adj_matrix,
                    thres=0,
                    rescale=lambda x: x,
                    graph_mps=nnc_mps,
                    mps=mps,
                    filename= "viz/nnc/" + agr_method + '_' + str(start_session) +
                    '_' + str(end_session) + 'minsess' +
                    str(min_sessions) + '_' + 'k=' + str(nnc_k) +
                    '_' + str(nnc_arbit) + ".json")
Exemple #3
0
import cPickle as pickle
from agreement_matrix import filename_agr
from util import write_json_graph

f = open('full_voting_data.pkl', 'rb')
mps = pickle.load(f)
f.close()
f = open(filename_agr, 'rb')
agreement_matrix = pickle.load(f)
f.close()


write_json_graph(weights_matrix=agreement_matrix,\
                 thres=0.9,\
                 rescale=lambda x: x,\
                 graph_mps=mps[:50],\
                 mps=mps,\
                 filename= "viz/agr/graph.json")