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

Function evaluate_embeddings

examples/deepwalk_wiki.py:22–27  ·  view source on GitHub ↗
(embeddings, label_path)

Source from the content-addressed store, hash-verified

20
21
22def evaluate_embeddings(embeddings, label_path):
23 x_data, y_data = read_node_label(str(label_path))
24 train_fraction = 0.8
25 print("Training classifier using {:.2f}% nodes...".format(train_fraction * 100))
26 clf = Classifier(embeddings=embeddings, clf=LogisticRegression())
27 clf.split_train_evaluate(x_data, y_data, train_fraction)
28
29
30def 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