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)
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)
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)
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)
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)