Beispiel #1
0
def predicate_object_frequency_weight():
    weigher.freq_predicate_object(sub_pred_obj_dict, edge_weight_dict)
    weigher.normalization(edge_weight_dict, node_dict)
    generator = generate_random_walks(sub_pred_obj_dict, node_dict,
                                      edge_weight_dict,
                                      number_of_walks_per_resource, depth)
    write_to_gz(generator)
Beispiel #2
0
def click_stream_weight():
    weigher.click_stream_weigher(click_stream_file, edge_weight_dict)
    weigher.normalization(edge_weight_dict, node_dict)
    generator = generate_random_walks(sub_pred_obj_dict, node_dict,
                                      edge_weight_dict,
                                      number_of_walks_per_resource, depth)
    write_to_gz(generator)
Beispiel #3
0
def uniform_weight():
    # weighting and normalization
    weigher.normalization(edge_weight_dict, node_dict)
    generator = generate_random_walks(sub_pred_obj_dict, node_dict,
                                      edge_weight_dict,
                                      number_of_walks_per_resource, depth)
    write_to_gz(generator)
Beispiel #4
0
def page_rank_split_weight():
    page_rank = weigher.pagerank_dict(page_rank_file)
    weigher.split_down(edge_weight_dict, page_rank, node_dict)
    weigher.normalization(edge_weight_dict, node_dict)
    generator = generate_random_walks(sub_pred_obj_dict, node_dict,
                                      edge_weight_dict,
                                      number_of_walks_per_resource, depth)
    write_to_gz(generator)
Beispiel #5
0
def inverse_object_frequency_split_weight():
    object_frequency = weigher.freq_object(sub_pred_obj_dict)
    weigher.inverse_freq(object_frequency)
    weigher.split_down(edge_weight_dict, object_frequency, node_dict)
    weigher.normalization(edge_weight_dict, node_dict)
    generator = generate_random_walks(sub_pred_obj_dict, node_dict,
                                      edge_weight_dict,
                                      number_of_walks_per_resource, depth)
    write_to_gz(generator)