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

Method train

ge/classify.py:29–33  ·  view source on GitHub ↗
(self, X, Y, Y_all)

Source from the content-addressed store, hash-verified

27 self.binarizer = MultiLabelBinarizer(sparse_output=True)
28
29 def train(self, X, Y, Y_all):
30 self.binarizer.fit(Y_all)
31 X_train = [self.embeddings[x] for x in X]
32 Y = self.binarizer.transform(Y)
33 self.clf.fit(X_train, Y)
34
35 def evaluate(self, X, Y):
36 top_k_list = [len(l) for l in Y]

Callers 1

split_train_evaluateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected