コード例 #1
0
ファイル: walk_experiments.py プロジェクト: ataweel55/RDF2VEC
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)
コード例 #2
0
ファイル: walk_experiments.py プロジェクト: ataweel55/RDF2VEC
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)
コード例 #3
0
ファイル: walk_experiments.py プロジェクト: ataweel55/RDF2VEC
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)
コード例 #4
0
ファイル: walk_experiments.py プロジェクト: ataweel55/RDF2VEC
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)
コード例 #5
0
ファイル: walk_experiments.py プロジェクト: ataweel55/RDF2VEC
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)