d3fd161765b9c9652fab403bcc59fcbc8e40cfe9,lexos/processors/analyze/topword.py,,analyze_group_to_group,#,190

Before Change


    assert np.size(words) > 0, EMPTY_NP_ARRAY_MESSAGE

    // initialize the value to return
    all_results = {}

    // find the total word count of each group
    group_lists = [np.sum(value, axis=0)
                   for _, value in enumerate(group_values)]

After Change


    comp_map = [(i_index, j_index)
                for (i_index, j_index) in comp_map if i_index < j_index]

    analysis_result = [_z_test_word_list_(count_list_i=group_lists[comp_index],
                                          count_list_j=group_lists[base_index],
                                          words=words)
                       for comp_index, base_index in comp_map]

    header_list = ["Class "" + class_labels[comp_index] +
                    "" compared to Class: " + class_labels[base_index]
                    for comp_index, base_index in comp_map]

    // put two lists together as a human readable result
    readable_results = list(zip(header_list, analysis_result))

    return readable_results
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: WheatonCS/Lexos
Commit Name: d3fd161765b9c9652fab403bcc59fcbc8e40cfe9
Time: 2017-08-07
Author: weltch1997@gmail.com
File Name: lexos/processors/analyze/topword.py
Class Name:
Method Name: analyze_group_to_group


Project Name: WheatonCS/Lexos
Commit Name: 1a8e10d0a88e25aa8b3ca9d7ea31225439d348a7
Time: 2017-08-07
Author: weltch1997@gmail.com
File Name: lexos/processors/analyze/topword.py
Class Name:
Method Name: analyze_para_to_group


Project Name: yahoo/TensorFlowOnSpark
Commit Name: 981e4266d4ea816b08a762193bd52f40cd1a3242
Time: 2019-08-07
Author: leewyang@verizonmedia.com
File Name: examples/mnist/keras/mnist_inference.py
Class Name:
Method Name: inference