-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_xgboost.py
39 lines (34 loc) · 1.01 KB
/
run_xgboost.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from grape import Graph
from src import run
from src.models import XGBoost
def main():
graph = Graph.from_csv(
name="full_graph_clean",
node_path="./data/full_graph_clean_nodes.csv",
edge_path="./data/full_graph_clean_edges.csv",
node_list_separator="\t",
node_list_header=True,
nodes_column_number=0,
node_list_node_types_column_number=1,
edge_list_separator="\t",
edge_list_header=True,
sources_column_number=0,
destinations_column_number=1,
edge_list_edge_types_column_number=2,
directed=False,
load_edge_list_in_parallel=False,
load_node_list_in_parallel=False,
)
print("The graph hash is: ", graph.hash())
run(
graph=graph,
number_of_external_holdouts=10,
number_of_internal_holdouts=3,
number_of_hops=2,
combination="addition",
normalize=False,
model_class=XGBoost,
max_evals=1,
)
if __name__ == "__main__":
main()