MCPcopy Index your code
hub / github.com/shenweichen/GraphEmbedding / evaluate_embeddings

Function evaluate_embeddings

examples/struc2vec_flight.py:23–28  ·  view source on GitHub ↗
(embeddings, label_path)

Source from the content-addressed store, hash-verified

21
22
23def evaluate_embeddings(embeddings, label_path):
24 x_data, y_data = read_node_label(str(label_path), skip_head=True)
25 train_fraction = 0.8
26 print("Training classifier using {:.2f}% nodes...".format(train_fraction * 100))
27 clf = Classifier(embeddings=embeddings, clf=LogisticRegression())
28 clf.split_train_evaluate(x_data, y_data, train_fraction)
29
30
31def plot_embeddings(embeddings, label_path, show=True):

Callers 1

mainFunction · 0.70

Calls 3

split_train_evaluateMethod · 0.95
read_node_labelFunction · 0.90
ClassifierClass · 0.90

Tested by

no test coverage detected