dgld.models.ONE.model
- class dgld.models.ONE.model.ONE(Outlier Aware Network Embedding for Attributed Networks)[source]
Bases:
object
- Parameters
node_num (int) – The number of the nodes in graph.
K (int, optional) – The embedding size, by default 8
- fit(graph, num_epoch=5)[source]
fit model
- Parameters
graph (dgl.DGLGraph) – The graph you want to embedding.
num_epoch (int, optional) – Number of epoch, you don’t need to much epoch, by default 5
alpha (float, optional) – Balance parameter , by default None
beta (float, optional) – Balance parameter , by default None
gamma (float, optional) – Balance parameter , by default None
- Returns
The embedding for all node
- Return type
np.array
- predict(graph, alpha=1.0, beta=1.0, gamma=1.0)[source]
Predict and return anomaly score of each node
- Parameters
graph (dgl.DGLGraph) – The graph
alpha (float, optional) – Balance parameter, by default 1.0
beta (float, optional) – Balance parameter, by default 1.0
gamma (float, optional) – Balance parameter, by default 1.0
- Returns
Anomaly score of each node
- Return type
np.array