MCPcopy Create free account
hub / github.com/Tencent/embedx / __standardized_feature

Method __standardized_feature

demo/data/scripts/dataset.py:223–233  ·  view source on GitHub ↗
(self, feature)

Source from the content-addressed store, hash-verified

221 return "train"
222
223 def __standardized_feature(self, feature):
224 train_nodes = [
225 node for node in self.nl_graph.nodes()
226 if not self.nl_graph.node[node]["val"] and
227 not self.nl_graph.node[node]["test"]
228 ]
229 train_feature = feature[train_nodes]
230 scaler = StandardScaler()
231 scaler.fit(train_feature)
232 feature = scaler.transform(feature)
233 return feature
234
235 @classmethod
236 def __get_node_stage(cls, node):

Callers 1

loadMethod · 0.95

Calls 1

nodesMethod · 0.80

Tested by

no test coverage detected